Hello,

It is necessary to change some structure contents from xen.
I have access to the registers.
One of them keeps the physical address of the structure.
But this physical address is valid for Dom0 only.
Dom0 kernel gets it by the call dma_alloc_coherent
A lower mentioned scheme does not work.

            uint64_t paramaddr = (uint64_t)get_user_reg(regs, 2);
            uint64_t phyaddr = mfn_to_maddr(gfn_to_mfn(current->domain,
                gaddr_to_gfn(paramaddr)));
            phyaddr += (paramaddr & ~PAGE_MASK);

Regards,
Oleg Nikitenko

Reply via email to