KVM: Add accessor for reading cr4 (or some bits of cr4)
authorAvi Kivity <avi@redhat.com>
Mon, 7 Dec 2009 10:16:48 +0000 (12:16 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:35:39 +0000 (12:35 -0300)
commitfc78f51938e1ea866daa2045851b2e5681371668
treebf46fdc9daca6cab3b42d102ec12c133a62cb2ff
parentcdc0e24456bf5678f63497569c3676c9019f82c1
KVM: Add accessor for reading cr4 (or some bits of cr4)

Some bits of cr4 can be owned by the guest on vmx, so when we read them,
we copy them to the vcpu structure.  In preparation for making the set of
guest-owned bits dynamic, use helpers to access these bits so we don't need
to know where the bit resides.

No changes to svm since all bits are host-owned there.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/kvm_cache_regs.h
arch/x86/kvm/mmu.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c