From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Egger, Christoph" Subject: Re: [PATCH 1/3] Nested VMX: update nested paging mode when vmswitch is in progress Date: Tue, 21 Jan 2014 10:46:05 +0100 Message-ID: <52DE41DD.70502@amazon.de> References: <1386814004-5574-1-git-send-email-yang.z.zhang@intel.com> <1386814004-5574-2-git-send-email-yang.z.zhang@intel.com> <52B18213020000780010E98C@nat28.tlf.novell.com> <52B18F89.1070309@amazon.de> <52D4F57F020000780011362C@nat28.tlf.novell.com> <52DCE753.1040507@amazon.de> 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 1W5Y9o-0000bY-KX for xen-devel@lists.xenproject.org; Tue, 21 Jan 2014 10:02:08 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zhang, Yang Z" , Jan Beulich , "Dong, Eddie" Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 21.01.14 09:49, Zhang, Yang Z wrote: > Egger, Christoph wrote on 2014-01-20: >> On 14.01.14 08:38, Zhang, Yang Z wrote: >>> Jan Beulich wrote on 2014-01-14: >>>>>>> On 14.01.14 at 03:33, "Zhang, Yang Z" >> wrote: >>>>> Zhang, Yang Z wrote on 2013-12-24: >>>>> >>>>> Any comments ? >>>> >>>> Considering Christoph's comments and reservations, if you can't >>>> alone deal with this I think you should work with the AMD people to >>>> eliminate or address his concerns. >>>> >>> >>> Yes. But the problem puzzled me is that Christoph said nested SVM works >>> well w/o my patch which I cannot understand. Because according my >>> analysis in previous thread, it also buggy in AMD side. But if they >>> really solved the issue in their side, I wonder how they fix it. >>> Perhaps I can use the same solution in VMX side without touch the >>> common code. >>> >>> Christoph, can you help to check it? thanks. >> >> The fix I mentioned solves the vmswitch problem on AMD side. > > But the current code is buggy with your fixing even in AMD side, see below scenario: > virtual vmentry: > Expected result: nested mode is being updated. > Current result in SVM: > !vcpu_in_guestmode and vmswitch_in_progress: L1's paging mode is updated. Wrong. > > I cannot understand why you said it is working. This page mode problem you discovered that needs to be addressed for both SVM and VMX. The fix I am saying is working solves the problem of emulating an MMIO instruction which is finished in the softirq while an interrupt can cause a vmswitch during instruction emulation. We are talking about two different issues. One is fixed on AMD side and one not. Christoph