Skip to contentSkip to conversation

convert guest va to ma in xen?

DISCUSSION Bryan D. Payne 1 participant 1 message Oct 25, 2007

lore
Share & tools
lore
#0 lore raw

I have a dom0 kernel virtual address in xen. I'd like to convert it to a machine address. What are the best function(s) to use for making this conversion? I've tried the code below, but this only seems to work for hvm guest domains, and not for dom0:

mfn = get_mfn_from_gpfn(shadow_gva_to_gfn(current, vaddr); maddr = (mfn << PAGE_SHIFT) + (vaddr & ~PAGE_MASK);

Is there equivalent code that will work for virtual addresses from dom0?

Thanks,
bryan

Signature · 4 lines
Bryan D. Payne
Graduate Student, Computer Science
Georgia Tech Information Security Center
http://www.bryanpayne.org