Skip to contentSkip to conversation

hvm_copy_from_guest_virt

DISCUSSION Wu Bingzheng 2 participants 2 messages Sep 11, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

In Xen 3.3.0, hvm's shadow page fault handler: sh_page_fault():
I call 'hvm_copy_from_guest_virt' to read some guest's (Windows XP) memory. If I read user space, it works fine.
If I read kernel space, like 0x8xxxxxxx or 0xFxxxxxxx, it retures HVMCOPY_bad_gva_to_gfn. I am sure that the page I read is present in guest's page table.

Can I copy memory from kernel space?

Thanks,
Wu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 8 lines · Wu Bingzheng

In Xen 3.3.0, hvm's shadow page fault handler: sh_page_fault():
I call 'hvm_copy_from_guest_virt' to read some guest's (Windows XP) memory. If I read user space, it works fine.
If I read kernel space, like 0x8xxxxxxx or 0xFxxxxxxx, it retures HVMCOPY_bad_gva_to_gfn.
I am sure that the page I read is present in guest's page table.

Can I copy memory from kernel space?

Yes. Either the pages are not present in the pagetable, or you passed PFEC_user_mode flag in the fourth argument to hvm_copy_from_guest_virt().

-- Keir