From: "Jan Beulich" Subject: Re: [PATCH v2 2/4] x86/pvh: Set 32b PVH guest mode in XEN_DOMCTL_set_address_size Date: Tue, 07 Jul 2015 17:16:43 +0100 Message-ID: <559C178B020000780008DBB0@mail.emea.novell.com> References: <1435609282-1383-1-git-send-email-boris.ostrovsky@oracle.com> <1435609282-1383-3-git-send-email-boris.ostrovsky@oracle.com> <559BB4CF020000780008D3B3@mail.emea.novell.com> <559BF601.3070101@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <559BF601.3070101@oracle.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: Boris Ostrovsky Cc: elena.ufimtseva@oracle.com, tim@xen.org, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 07.07.15 at 17:53, wrote: > On 07/07/2015 05:15 AM, Jan Beulich wrote: >>>>> On 29.06.15 at 22:21, wrote: >>> @@ -6491,6 +6490,20 @@ enum hvm_intblk nhvm_interrupt_blocked(struct vcpu *v) >>> return hvm_funcs.nhvm_intr_blocked(v); >>> } >>> >>> +int hvm_set_mode(struct vcpu *v, int mode) >>> +{ >>> + if ( mode == 4 ) >>> + { >>> + v->arch.hvm_vcpu.guest_efer &= ~(EFER_LMA | EFER_LME); >>> + hvm_update_guest_efer(v); >>> + } >>> + >>> + if ( hvm_funcs.set_mode ) >>> + return hvm_funcs.set_mode(v, mode); >>> + >>> + return 0; >>> +} >> -EOPNOTSUPP? > > Why do you think this should be an error? I probably will need to update > this to handle mode==8 for calls from switch_native() as you pointed out > above but in general it seems to me it should be OK if this procedure > doesn't do anything. Below too. Because the function then didn't do what it was asked for. Jan