From: "Jan Beulich" Subject: Re: [PATCH] Nested VMX: prohabit virtual vmentry/vmexit during IO emulaiton Date: Fri, 17 Jan 2014 10:15:10 +0000 Message-ID: <52D910BE02000078001147DC@nat28.tlf.novell.com> References: <1389940742-2275-1-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389940742-2275-1-git-send-email-yang.z.zhang@intel.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: Yang Zhang Cc: andrew.cooper3@citrix.com, chegger@amazon.de, eddie.dong@intel.com, jun.nakajima@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 17.01.14 at 07:39, Yang Zhang wrote: > Sometimes, L0 need to decode the L2's instruction to handle IO access > directly. > And L0 may get X86EMUL_RETRY when handling this IO request. At same time, if > there is a virtual vmexit pending (for example, an interrupt pending to > inject > to L1) and hypervisor will switch the VCPU context from L2 to L1. Now we > already > in L1's context, but since we got a X86EMUL_RETRY just now and this means > hyprevisor > will retry to handle the IO request later and unfortunately, the retry will > happen > in L1's context. And it will cause the problem. > The fixing is that if there is a pending IO request, no virtual > vmexit/vmentry > is allowed. > > Signed-off-by: Yang Zhang > --- > xen/arch/x86/hvm/vmx/vvmx.c | 8 ++++++++ Didn't we agree earlier on to do this in common code? Jan