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] hvm svm: Bug fix for page allocation when

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm svm: Bug fix for page allocation when HAP is being used
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Mar 2007 16:10:37 -0700
Delivery-date: Tue, 27 Mar 2007 16:22:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1175012474 -3600
# Node ID c1bfe329f7ffd46a69264d10b790f2998345bb7b
# Parent  d4ddaff75afd0231e5d832d591196b32f8a7ecc7
hvm svm: Bug fix for page allocation when HAP is being used

Initialise count_info of newly allocated hap page with 0, and removes
unnecessary page deallcation when destroying monitor table. Without
this patch, destroying hap domain will fail.

Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
---
 xen/arch/x86/mm/hap/hap.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff -r d4ddaff75afd -r c1bfe329f7ff xen/arch/x86/mm/hap/hap.c
--- a/xen/arch/x86/mm/hap/hap.c Tue Mar 27 16:56:20 2007 +0100
+++ b/xen/arch/x86/mm/hap/hap.c Tue Mar 27 17:21:14 2007 +0100
@@ -135,6 +135,7 @@ void hap_free_p2m_page(struct domain *d,
         HAP_ERROR("Odd p2m page count c=%#x t=%"PRtype_info"\n",
                   pg->count_info, pg->u.inuse.type_info);
     }
+    pg->count_info = 0;
     /* Free should not decrement domain's total allocation, since 
      * these pages were allocated without an owner. */
     page_set_owner(pg, NULL); 
@@ -182,6 +183,7 @@ hap_set_allocation(struct domain *d, uns
             list_del(&sp->list);
             d->arch.paging.hap.free_pages -= 1;
             d->arch.paging.hap.total_pages -= 1;
+            sp->count_info = 0;
             free_domheap_pages(sp, 0);
         }
         
@@ -367,17 +369,7 @@ void hap_destroy_monitor_table(struct vc
 {
     struct domain *d = v->domain;
 
-#if CONFIG_PAGING_LEVELS == 4
-    /* Need to destroy the l3 monitor page in slot 0 too */
-    {
-        mfn_t m3mfn;
-        l4_pgentry_t *l4e = hap_map_domain_page(mmfn);
-        ASSERT(l4e_get_flags(l4e[0]) & _PAGE_PRESENT);
-        m3mfn = _mfn(l4e_get_pfn(l4e[0]));
-        hap_free(d, m3mfn);
-        hap_unmap_domain_page(l4e);
-    }
-#elif CONFIG_PAGING_LEVELS == 3
+#if CONFIG_PAGING_LEVELS == 3
     /* Need to destroy the l2 monitor page in slot 4 too */
     {
         l3_pgentry_t *l3e = hap_map_domain_page(mmfn);
@@ -632,10 +624,6 @@ void hap_update_paging_modes(struct vcpu
 
     v->arch.paging.translate_enabled = !!hvm_paging_enabled(v);    
 
-    /* use p2m map */
-    v->arch.guest_table =
-        pagetable_from_pfn(pagetable_get_pfn(d->arch.phys_table));
-
     if ( pagetable_is_null(v->arch.monitor_table) ) {
         mfn_t mmfn = hap_make_monitor_table(v);
         v->arch.monitor_table = pagetable_from_mfn(mmfn);

_______________________________________________
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] hvm svm: Bug fix for page allocation when HAP is being used, Xen patchbot-unstable <=