[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 07/32] xen/x86: fix arch_set_info_guest for HVM guests



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) are
> 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é <roger.pau@xxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
>  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 = !!(flags & VGCF_I387_VALID);
>  
> @@ -1064,15 +1073,14 @@ int arch_set_info_guest(
>      if ( v->vcpu_id == 0 )
>          update_domain_wallclock_time(d);
>  
> -    /* Don't redo final setup */
> -    v->is_initialised = 1;
> -
>      if ( paging_mode_enabled(d) )
>          paging_update_paging_modes(v);
>  
>      update_cr3(v);
>  
>   out:
> +    /* Don't redo final setup */
> +    v->is_initialised = 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@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.