WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][HVM] fix migration from NX-capable machine to no

To: David Lively <dlively@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][HVM] fix migration from NX-capable machine to non-NX-capable machine
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 28 Sep 2007 07:58:47 +0100
Delivery-date: Thu, 27 Sep 2007 23:54:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46FC1CD4.6030905@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgBnQQUQseDAG2QEdyN5AAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH][HVM] fix migration from NX-capable machine to non-NX-capable machine
User-agent: Microsoft-Entourage/11.3.6.070618
On 27/9/07 22:12, "David Lively" <dlively@xxxxxxxxxxxxxxx> wrote:

> The attached patch (to 3.1.1-rc2) fixes a hypervisor crash that we're
> seeing when migrating a HVM guest from a machine that supports the NX
> bit to one that doesn't (e.g., because it's disabled in the BIOS).  It
> keeps the guest copy of EFER "as is", so the guest will see EFER_NX if
> it previously set it -- we just won't propagate this EFER bit to a
> non-NX-capable host.
> 
> Signed-off-by: David Lively <dlively@xxxxxxxxxxxxxxx>
> diff -r a1db76ddfa68 xen/arch/x86/hvm/vmx/vmx.c
> --- a/xen/arch/x86/hvm/vmx/vmx.c Thu Sep 27 13:21:28 2007 -0400
> +++ b/xen/arch/x86/hvm/vmx/vmx.c Thu Sep 27 16:13:06 2007 -0400
> @@ -369,6 +369,7 @@ static int long_mode_do_msr_write(struct
>      struct vcpu *v = current;
>      struct vmx_msr_state *guest_msr_state = &v->arch.hvm_vmx.msr_state;
>      struct vmx_msr_state *host_msr_state = &this_cpu(host_msr_state);
> +    u64 efer_mask = EFER_SCE || (cpu_has_nx ? EFER_NX : 0);

Wrong kind of OR?

As for AMD, are there any SVM CPUs that do not also support NX?

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel