Re: [RFC 1/5] KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 September 2012 10:11, Avi Kivity <avi@xxxxxxxxxx> wrote:
> Other x86 state:
>   Control registers: ok.  Should userspace be careful to set registers
> in legal ways only? i.e. cannot set cr3[0:11] if cr4.pae=0, or vice
> versa, so need three writes?

The principle I'm hoping we can hold to for ARM is that the
kernel only exposes state in such a way that it's always
possible for userspace to migrate it with a simple "read
everything, send to destination, write everything", ie
without needing to know anything of the semantics of any
of these registers.

This means that registers which have access controls (eg
"can't write this unless you wrote to that other one first")
should not enforce those checks for userspace get/set.
More significantly, it means that registers with odd
behaviour, like "write 1 to clear" or "register A selects
which of an array of underlying registers is exposed
in register B" are not directly exposed at all. Instead
the kernel provides some other (ersatz) register indexes
which let userspace do plain get/set on the underlying
state.

The idea is that then migration depends only on whether
the destination kernel supports all the registers the
source kernel does, and we avoid extra dependencies
on the source and destination qemu. (Most of the state
being transferred is of no interest to userspace at all.)
[It also makes write-multiple easier to use.]

-- PMM
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux