KVM: x86: Don't report guest userspace emulation error to userspace
authorNadav Amit <namit@cs.technion.ac.il>
Tue, 16 Sep 2014 23:50:50 +0000 (02:50 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Sep 2014 12:07:49 +0000 (14:07 +0200)
commita2b9e6c1a35afcc0973acb72e591c714e78885ff
treef449ac080caccd5836befbe8efddeb9fcb11b9e2
parent1f755a827538226fff38aad128c4a6836bd89b48
KVM: x86: Don't report guest userspace emulation error to userspace

Commit fc3a9157d314 ("KVM: X86: Don't report L2 emulation failures to
user-space") disabled the reporting of L2 (nested guest) emulation failures to
userspace due to race-condition between a vmexit and the instruction emulator.
The same rational applies also to userspace applications that are permitted by
the guest OS to access MMIO area or perform PIO.

This patch extends the current behavior - of injecting a #UD instead of
reporting it to userspace - also for guest userspace code.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c