|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [PATCH][VT] Patch to allow VMX domainsto be destroyedor
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
|
|
|
|
|