From: "Jan Beulich" Subject: Re: [PATCH] x86/HVM: only kill guest when unknown VM exit occurred in guest kernel mode Date: Thu, 30 Oct 2014 15:14:16 +0000 Message-ID: <545263D802000078000439A8@mail.emea.novell.com> References: <54525C990200007800043915@mail.emea.novell.com> <545251CA.1040907@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XjrQX-0007QM-7J for xen-devel@lists.xenproject.org; Thu, 30 Oct 2014 15:14:17 +0000 In-Reply-To: <545251CA.1040907@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Kevin Tian , suravee.suthikulpanit@amd.com, Eddie Dong , Aravind Gopalakrishnan , Jun Nakajima , xen-devel , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 30.10.14 at 15:57, wrote: > On 30/10/14 14:43, Jan Beulich wrote: >> A recent KVM change by Nadav Amit 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 >> Signed-off-by: Jan Beulich > > Reviewed-by: Andrew Cooper > > The gdprintk() in vmx.c is not true for some entries via the > exit_and_crash label, but it is probably worth deferring fixing it to a > separate patch. Right - several would better bypass the logging. The same applies to svm.c afaict. And yes, logically a separate change, so better also a separate patch. Jan