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

Re: [Xen-devel] [PATCH 1/3] Nested VMX: update nested paging mode when vmswitch is in progress



On 12.12.13 03:06, Yang Zhang wrote:
> From: Yang Zhang <yang.z.zhang@xxxxxxxxx>
> 
> virtual vmentry will change paging related stucture, so corrensponding
> nested mode need to be updated which is missing currently.
> 
> Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>

I weakly remember the "!nestedhvm_vmswitch_in_progress" is needed
to avoid a nested pagefault loop on AMD. I do not remember the
actual reproduction case. Unfortunately, I do not have a setup
to verify.

Christoph

> ---
>  xen/arch/x86/hvm/hvm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> This patch fixed RHEL6 guest installation problem with L1 hyper-v.
> 
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index 69f7e74..1f62e00 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -1925,7 +1925,7 @@ int hvm_set_cr0(unsigned long value)
>      hvm_update_cr(v, 0, value);
>  
>      if ( (value ^ old_value) & X86_CR0_PG ) {
> -        if ( !nestedhvm_vmswitch_in_progress(v) && 
> nestedhvm_vcpu_in_guestmode(v) )
> +        if ( nestedhvm_vcpu_in_guestmode(v) )
>              paging_update_nestedmode(v);
>          else
>              paging_update_paging_modes(v);
> @@ -2014,7 +2014,7 @@ int hvm_set_cr4(unsigned long value)
>            (X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE | X86_CR4_SMEP)) ||
>           (!(value & X86_CR4_PCIDE) && (old_cr & X86_CR4_PCIDE)) )
>      {
> -        if ( !nestedhvm_vmswitch_in_progress(v) && 
> nestedhvm_vcpu_in_guestmode(v) )
> +        if ( nestedhvm_vcpu_in_guestmode(v) )
>              paging_update_nestedmode(v);
>          else
>              paging_update_paging_modes(v);
> 


_______________________________________________
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®.