From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features Date: Fri, 9 Jan 2015 15:36:50 +0000 Message-ID: <54AFF592.9070308@citrix.com> References: <54AEAD2C0200007800052B56@mail.emea.novell.com> <54AEAEFD0200007800052B81@mail.emea.novell.com> <54AED122.8090603@citrix.com> <54AFC7A502000078000531CD@mail.emea.novell.com> <54AFEF35.5010002@citrix.com> <54B002E40200007800053372@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 1Y9bcQ-000616-Bm for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 15:36:58 +0000 In-Reply-To: <54B002E40200007800053372@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 09/01/15 15:33, Jan Beulich wrote: >>>> On 09.01.15 at 16:09, wrote: >> On 09/01/15 11:20, Jan Beulich wrote: >>>>>> On 08.01.15 at 19:49, wrote: >>>> I think hvm_efer_valid() also needs the current EFER and CR0 to work out >>>> what the current LMA should be, and reject any attempt to change it. >>> I.e. this would be needed only for the restore path (and it not being >>> done hasn't caused problems for me because guests don't normally >>> get migrated before they fully enabled long mode). >> Urgh. In the restore case we don't have a current EFER to use. In this >> case I think it is acceptable to check that new_lma is (new_lme && >> !cr4.pg), which allows us to declare that the restore state is >> consistent (presuming we have already validated cr4). > I suppose you mean cr0 here, and also new_lma == new_lme && cr0.pg? Oops yes - I do on both counts. ~Andrew