linux/drivers/kvm
Dan Kenigsberg 0771671749 KVM: Enhance guest cpuid management
The current cpuid management suffers from several problems, which inhibit
passing through the host feature set to the guest:

 - No way to tell which features the host supports

  While some features can be supported with no changes to kvm, others
  need explicit support.  That means kvm needs to vet the feature set
  before it is passed to the guest.

 - No support for indexed or stateful cpuid entries

  Some cpuid entries depend on ecx as well as on eax, or on internal
  state in the processor (running cpuid multiple times with the same
  input returns different output).  The current cpuid machinery only
  supports keying on eax.

 - No support for save/restore/migrate

  The internal state above needs to be exposed to userspace so it can
  be saved or migrated.

This patch adds extended cpuid support by means of three new ioctls:

 - KVM_GET_SUPPORTED_CPUID: get all cpuid entries the host (and kvm)
   supports

 - KVM_SET_CPUID2: sets the vcpu's cpuid table

 - KVM_GET_CPUID2: gets the vcpu's cpuid table, including hidden state

[avi: fix original KVM_SET_CPUID not removing nx on non-nx hosts as it did
      before]

Signed-off-by: Dan Kenigsberg <danken@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-01-30 17:53:13 +02:00
..
Kconfig
Makefile KVM: Move x86 msr handling to new files x86.[ch] 2008-01-30 17:52:51 +02:00
i8259.c KVM: Export PIC reset for kernel device reset 2008-01-30 17:52:55 +02:00
ioapic.c KVM: Split IOAPIC reset function and export for kernel RESET 2008-01-30 17:52:55 +02:00
irq.c KVM: Portability: Split kvm_vcpu into arch dependent and independent parts (part 1) 2008-01-30 17:52:54 +02:00
irq.h KVM: Split IOAPIC reset function and export for kernel RESET 2008-01-30 17:52:55 +02:00
kvm.h KVM: Disallow fork() and similar games when using a VM 2008-01-30 17:53:13 +02:00
kvm_main.c KVM: Disallow fork() and similar games when using a VM 2008-01-30 17:53:13 +02:00
kvm_svm.h
lapic.c KVM: Portability: Split kvm_vcpu into arch dependent and independent parts (part 1) 2008-01-30 17:52:54 +02:00
mmu.c KVM: MMU: Rename 'release_page' 2008-01-30 17:53:12 +02:00
paging_tmpl.h KVM: MMU: Introduce gfn_to_gpa() 2008-01-30 17:53:11 +02:00
segment_descriptor.h KVM: Portability: Move memory segmentation to x86.c 2008-01-30 17:52:57 +02:00
svm.c KVM: Make unloading of FPU state when putting vcpu arch-independent 2008-01-30 17:53:05 +02:00
svm.h KVM: CodingStyle cleanup 2008-01-30 17:52:50 +02:00
vmx.c KVM: VMX: Force seg.base == (seg.sel << 4) in real mode 2008-01-30 17:53:06 +02:00
vmx.h KVM: VMX: wbinvd exiting 2008-01-30 17:53:01 +02:00
x86.c KVM: Enhance guest cpuid management 2008-01-30 17:53:13 +02:00
x86.h KVM: Enhance guest cpuid management 2008-01-30 17:53:13 +02:00
x86_emulate.c KVM: x86 emulator: prefetch up to 15 bytes of the instruction executed 2008-01-30 17:53:09 +02:00
x86_emulate.h KVM: x86 emulator: prefetch up to 15 bytes of the instruction executed 2008-01-30 17:53:09 +02:00