From: "Jan Beulich" Subject: Re: Bisected Xen-unstable: "Segment register inaccessible for d1v0" when starting HVM guest on intel Date: Tue, 01 Jul 2014 10:49:37 +0100 Message-ID: <53B2A051020000780001EF1B@mail.emea.novell.com> References: <1057886355.20140628222158@eikelenboom.it> <53B1A244020000780001EA4D@mail.emea.novell.com> <1081819750.20140630183750@eikelenboom.it> <53B19EEB.4060603@citrix.com> <53B27902020000780001ED8B@mail.emea.novell.com> <53B29E03020000780001EF03@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1uh4-0006fU-TN for xen-devel@lists.xenproject.org; Tue, 01 Jul 2014 09:49:43 +0000 In-Reply-To: <53B29E03020000780001EF03@mail.emea.novell.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: Feng Wu Cc: Andrew Cooper , "xen-devel@lists.xenproject.org" , Sander Eikelenboom List-Id: xen-devel@lists.xenproject.org >>> On 01.07.14 at 11:39, wrote: >>>> On 01.07.14 at 11:03, wrote: >> Also, for SMAP hardware behaves differently between CPL=3 and CPL<3, >> >> " If CPL < 3, SMAP protections are disabled if EFLAGS.AC = 1. If CPL = 3, >> SMAP applies to all supervisor-mode data accesses (these are implicit >> supervisor accesses) regardless of the value of EFLAGS.AC." > > Ah, right, I mis-read the combination of conditions. Which implies > that in the spirit of this we mustn't bypass the CPL check by way > of the flag suggested by Andrew (or else the hypervisor copy/clear > operations wouldn't be treated as supervisor mode accesses in the > sense above anymore). Which in the end raises the question why the VMCS loading gets done in vmx_do_resume() instead of vmx_ctxt_switch_to(). Jan