Skip to contentSkip to conversation

How can i get VA from a pfn in HVM guest

DISCUSSION 胡少龙 2 participants 2 messages Aug 5, 2010 – Aug 6, 2010

lore
Share & tools
lore

胡少龙

author
#0 lore raw

Hi,
    After i get the pfn in a hvm guest using following code, how can i use it? Simply using __va() seems wrong, for the ( param.value << PAGE_SHIFT ) is feffc000 in my test module, using __va() will overflow.
    xen_hvm_param_t param;
    param.domid = DOMID_SELF;
    param.index = HVM_PARAM_STORE_PFN;
    hypercall_hvm_op(HVMOP_get_param, &param);

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

#1 lore raw
Quoted 8 lines · 胡少龙

Hi,
After i get the pfn in a hvm guest using following code, how can i
use it? Simply using __va() seems wrong, for the ( param.value << PAGE_SHIFT ) is feffc000 in my test module, using __va() will overflow.

    xen_hvm_param_t param;
    param.domid = DOMID_SELF;
    param.index = HVM_PARAM_STORE_PFN;
    hypercall_hvm_op(HVMOP_get_param, &param);

You need to ioremap it.

J