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-changelog

[Xen-changelog] [xen-unstable] nestedsvm: fix tlb_control

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] nestedsvm: fix tlb_control
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:12:08 +0100
Delivery-date: Thu, 16 Jun 2011 03:22:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1306846550 -3600
# Node ID 01ba8829585cde752916a19bd7c5f677e0dcb921
# Parent  773a6ce557f70ac8505dad52f1fd9f45f37c267a
nestedsvm: fix tlb_control

On VMRUN emulation evaluate the virtual tlb_control only to match
hw behaviour. Deal with l1 guests which use flush-by-asid w/o
checking cpuid bits or fill tlb_control with random data.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---


diff -r 773a6ce557f7 -r 01ba8829585c xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c  Tue May 31 13:53:54 2011 +0100
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c  Tue May 31 13:55:50 2011 +0100
@@ -460,7 +460,7 @@
     /* ASID - Emulation handled in hvm_asid_handle_vmenter() */
 
     /* TLB control */
-    n2vmcb->tlb_control = n1vmcb->tlb_control | ns_vmcb->tlb_control;
+    n2vmcb->tlb_control = ns_vmcb->tlb_control;
 
     /* Virtual Interrupts */
     if (!vcleanbit_set(tpr)) {
@@ -655,7 +655,9 @@
     svm->ns_vmcb_guestcr3 = ns_vmcb->_cr3;
     svm->ns_vmcb_hostcr3 = ns_vmcb->_h_cr3;
 
-    nv->nv_flushp2m = ns_vmcb->tlb_control;
+    /* Convert explicitely to boolean. Deals with l1 guests
+     * that use flush-by-asid w/o checking the cpuid bits */
+    nv->nv_flushp2m = !!ns_vmcb->tlb_control;
     if ( svm->ns_guest_asid != ns_vmcb->_guest_asid )
     {
         nv->nv_flushp2m = 1;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] nestedsvm: fix tlb_control, Xen patchbot-unstable <=