From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 07/32] xen/x86: fix arch_set_info_guest for HVM guests Date: Fri, 10 Jul 2015 14:47:13 -0400 Message-ID: <20150710184713.GB30788@l.oracle.com> References: <1435923310-9019-1-git-send-email-roger.pau@citrix.com> <1435923310-9019-8-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZDdKT-0004Vq-AM for xen-devel@lists.xenproject.org; Fri, 10 Jul 2015 18:47:21 +0000 Content-Disposition: inline In-Reply-To: <1435923310-9019-8-git-send-email-roger.pau@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: Roger Pau Monne Cc: xen-devel@lists.xenproject.org, Jan Beulich , Andrew Cooper List-Id: xen-devel@lists.xenproject.org On Fri, Jul 03, 2015 at 01:34:45PM +0200, Roger Pau Monne wrote: > Add checks for ignored vcpu fields in HVM mode. HVM vCPUs (BSP and APs) a= re > always started in 32bit protected mode with paging disabled. This is kind of odd in the placement of the series. The next couple of patches deal with the restructure of the HVM guests and the previous ones were too. And it is quite salient on the PVH/HVMLite protocol. I would think you would want to also update the documentation/misc/pvh as part of this patch. Perhaps move this further out in the patch series? > = > Signed-off-by: Roger Pau Monn=E9 > Cc: Jan Beulich > Cc: Andrew Cooper > --- > xen/arch/x86/domain.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > = > diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c > index a8fe046..a112953 100644 > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -795,6 +795,15 @@ int arch_set_info_guest( > c.nat->fs_base || c.nat->gs_base_user)) ) > return -EINVAL; > } > + else if ( is_hvm_domain(d) ) > + { > + if ( c(ctrlreg[0]) || c(ctrlreg[1]) || c(ctrlreg[2]) || > + c(ctrlreg[3]) || c(ctrlreg[4]) || c(ctrlreg[5]) || > + c(ctrlreg[6]) || c(ctrlreg[7]) || c(ldt_base) || > + c(ldt_ents) || c(kernel_ss) || c(kernel_sp) || > + c(gdt_ents) ) > + return -EINVAL; > + } > = > v->fpu_initialised =3D !!(flags & VGCF_I387_VALID); > = > @@ -1064,15 +1073,14 @@ int arch_set_info_guest( > if ( v->vcpu_id =3D=3D 0 ) > update_domain_wallclock_time(d); > = > - /* Don't redo final setup */ > - v->is_initialised =3D 1; > - > if ( paging_mode_enabled(d) ) > paging_update_paging_modes(v); > = > update_cr3(v); > = > out: > + /* Don't redo final setup */ > + v->is_initialised =3D 1; > if ( flags & VGCF_online ) > clear_bit(_VPF_down, &v->pause_flags); > else > -- = > 1.9.5 (Apple Git-50.3) > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel