linux/arch/x86/kvm
Avi Kivity 33e3885de2 KVM: x86 emulator: fix hypercall return value on AMD
The hypercall instructions on Intel and AMD are different.  KVM allows the
guest to choose one or the other (the default is Intel), and if the guest
chooses incorrectly, KVM will patch it at runtime to select the correct
instruction.  This allows live migration between Intel and AMD machines.

This patching occurs in the x86 emulator.  The current code also executes
the hypercall.  Unfortunately, the tail end of the x86 emulator code also
executes, overwriting the return value of the hypercall with the original
contents of rax (which happens to be the hypercall number).

Fix not by executing the hypercall in the emulator context; instead let the
guest reissue the patched instruction and execute the hypercall via the
normal path.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-06-06 21:08:25 +03:00
..
Kconfig KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
Makefile KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
i8254.c KVM: PIT: take inject_pending into account when emulating hlt 2008-05-18 14:34:15 +03:00
i8254.h KVM: Add reset support for in kernel PIT 2008-04-27 12:00:23 +03:00
i8259.c KVM: Move arch dependent files to new directory arch/x86/kvm/ 2008-01-30 18:01:18 +02:00
irq.c KVM: hlt emulation should take in-kernel APIC/PIT timers into account 2008-04-27 12:04:11 +03:00
irq.h KVM: hlt emulation should take in-kernel APIC/PIT timers into account 2008-04-27 12:04:11 +03:00
kvm_svm.h KVM: SVM: allocate the MSR permission map per VCPU 2008-04-27 11:53:21 +03:00
lapic.c KVM: LAPIC: ignore pending timers if LVTT is disabled 2008-05-18 14:39:39 +03:00
lapic.h KVM: Accelerated apic support 2008-01-30 18:01:20 +02:00
mmu.c namespacecheck: automated fixes 2008-05-23 14:08:06 +02:00
mmu.h KVM: Add kvm_x86_ops get_tdp_level() 2008-05-04 14:44:34 +03:00
paging_tmpl.h KVM: MMU: Don't assume struct page for x86 2008-04-27 12:01:15 +03:00
svm.c KVM: Add kvm_x86_ops get_tdp_level() 2008-05-04 14:44:34 +03:00
svm.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: Enable EPT feature for KVM 2008-05-04 14:44:42 +03:00
vmx.h KVM: VMX: Enable EPT feature for KVM 2008-05-04 14:44:42 +03:00
x86.c KVM: avoid fx_init() schedule in atomic 2008-05-04 14:44:48 +03:00
x86_emulate.c KVM: x86 emulator: fix hypercall return value on AMD 2008-06-06 21:08:25 +03:00