]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commit
x86/HVM: only kill guest when unknown VM exit occurred in guest kernel mode
authorJan Beulich <jbeulich@suse.com>
Fri, 31 Oct 2014 10:32:27 +0000 (11:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 31 Oct 2014 10:32:27 +0000 (11:32 +0100)
commit5283b310e14884341f51be35253cdd59c4cb034c
tree4ba933cefaca475ca71ef75b53ab5f1207efcc00
parent93cc5c6f1641e90eb120826d42f103b7726efb8e
x86/HVM: only kill guest when unknown VM exit occurred in guest kernel mode

A recent KVM change by Nadav Amit <namit@cs.technion.ac.il> pointed out
that unconditional VM exits (like VMX'es ones for the INVEPT, INVVPID,
and XSETBV instructions) may result from guest user mode activity (in
the example cases, e.g. prior to a privilege level check being done).
Consequently convert the unconditional domain_crash() to a conditional
one (when guest is in kernel mode) with the alternative of injecting
#UD (when in user mode).

This is meant to be a precaution against in-guest security issues
introduced when any such VM exit becomes possible (on newer hardware)
without the hypervisor immediately being aware of it. There are no such
unhandled VM exits currently (and hence this is not an active security
issue), but old (no longer security maintained) versions exhibit issues
in the cases given as examples above.

Suggested-by: Tim Deegan <tim@xen.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c