From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= Subject: Re: [PATCH RFC v2] pvh: clearly specify used parameters in vcpu_guest_context Date: Tue, 19 Nov 2013 11:44:27 +0100 Message-ID: <528B410B.50402@citrix.com> References: <1384798711-4255-1-git-send-email-roger.pau@citrix.com> <528B3EA3.9090008@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ViinF-0001Ov-Nw for xen-devel@lists.xenproject.org; Tue, 19 Nov 2013 10:44:29 +0000 In-Reply-To: <528B3EA3.9090008@eu.citrix.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: George Dunlap Cc: xen-devel@lists.xenproject.org, Keir Fraser , Tim Deegan , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 19/11/13 11:34, George Dunlap wrote: > On 11/18/2013 06:18 PM, Roger Pau Monne wrote: >> if ( has_hvm_container_vcpu(v) ) >> { >> - /* >> - * NB: TF_kernel_mode is set unconditionally for HVM guests, >> - * so we always use the gs_base_kernel here. If we change this >> - * function to imitate the PV functionality, we'll need to >> - * make it pay attention to the kernel bit. >> - */ >> - hvm_set_info_guest(v, compat ? 0 : c.nat->gs_base_kernel); > > I think we still need to call hvm_set_info_guest() here -- there is > other stuff being set up, and it was called (without the extra argument > for gs_base_kernel) before the PVH patch series went in. > > (See c/s 35b1e07.) I see, I will restore the hvm_set_info_guest call, good catch. > >> >> if ( is_hvm_vcpu(v) || v->is_initialised ) >> goto out; >> >> + if ( c.nat->ctrlreg[0] ) { >> + v->arch.hvm_vcpu.guest_cr[0] |= c.nat->ctrlreg[0]; >> + hvm_update_guest_cr(v, 0); >> + } >> + >> + if ( c.nat->ctrlreg[4] ) { >> + v->arch.hvm_vcpu.guest_cr[4] |= c.nat->ctrlreg[4]; >> + hvm_update_guest_cr(v, 4); >> + } > > I thought the idea was that he would set cr0, cr3, and cr4 for all HVM > guests, rather than special-casing PVH guests? Well, I was just trying to make the PVH AP bringup interface stable, without messing much with HVM (not that we shouldn't aim to do it for HVM guests also), but I think the main concern now is releasing 4.4 with a stable interface for PVH guests. Thanks, Roger.