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][VT] Patch to allow VMX domainsto be destroyedor

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH][VT] Patch to allow VMX domainsto be destroyedor shut down cleanly
From: Khoa Huynh <khoa@xxxxxxxxxx>
Date: Mon, 19 Sep 2005 02:57:21 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 19 Sep 2005 07:55:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <FFEFE1749526634699CD3AC2EDB7627A454381@pdsmsx406>
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
Sensitivity:
Jiang, Yunhong wrote:
>> I think the Xin Xiaohui's patch resolved most problem for the page
>> left issue.
>>
>> Also another small issue found is the on vmx_set_cr0. On Windows, the
>> guest will enter/leave protected mode many times.  Following code
>> cause problem.
>>     if ((value & X86_CR0_PE) && (value & X86_CR0_PG) &&
>> !paging_enabled) {
>>         /*
>>          * The guest CR3 must be pointing to the guest physical.
>>          */
>>         if ( !VALID_MFN(mfn = get_mfn_from_pfn(
>>             d->arch.arch_vmx.cpu_cr3 >> PAGE_SHIFT)) ||
>>              !get_page(pfn_to_page(mfn), d->domain) )
>>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>         {
>>             printk("Invalid CR3 value = %lx",
>>             d->arch.arch_vmx.cpu_cr3); domain_crash_synchronous(); /*
>>         need to take a clean path */ }
>>
>> We should place the get_page to when guest set cr3 when not paging,
>> i.e
>>
>>    case 3:
>>     {
>>         unsigned long old_base_mfn, mfn;
>>
>>         /*
>>          * If paging is not enabled yet, simply copy the value to CR3.
>>          */
>>         if (!vmx_paging_enabled(d)) {
>>                       ..... get page here....
>>
>
>More exactly should be:
>            if (!vmx_paging_enabled(d)) {
>                                    get_page for new mfn
>                                    put_page for old mfn
>            }

Xin's patch works for some of my Windows XP scenarios,
but there are still cases where there were still pages remaining.
I tried to implement a second patch based on your suggestion above,
but that did not work.

Do you happen to have a complete patch to fix this ?  Thanks.

Khoa H.



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