[RFC PATCH] KVM: arm/arm64: Don't let userspace update CNTVOFF once guest is running

Peter Maydell peter.maydell at linaro.org
Wed Jul 8 12:13:59 PDT 2015

On 8 July 2015 at 17:37, Marc Zyngier <marc.zyngier at arm.com> wrote:
> On 08/07/15 17:06, Peter Maydell wrote:
>> I'd prefer it if somebody could investigate to see why QEMU
>> is actually doing this -- so far we just have speculation.
> I'd prefer that too, but so far people seem to be more comfortable
> waiting for the issue to fix itself. In the meantime, VMs are broken in
> weird and wonderful ways, and I don't think the current status-quo helps
> anyone.

Putting in a patch which might not be the right fix isn't
necessarily a good plan either...

Does has_run_once get cleared if we do a re-VCPU_INIT
of a CPU that's run before? (We need to allow rewriting
of guest state at that point so that "reset VM and
load migration state" behaves correctly.)

I suspect Jan is right and we really need to distinguish
the KVM_PUT_*_STATE levels in ARM QEMU. This probably
implies some kind of whitelist/override mechanism, since
by and large we neither know nor want to know the
semantics for system registers, we leave that up to the

Q: if you have a running VM, and you pause it for
an hour, what should the CNTVCT register do? Presumably
it should not advance, but how do we arrange for that
to happen?

-- PMM

More information about the linux-arm-kernel mailing list