[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] HYBRID: memory mapped IO



On Wed, 15 Feb 2012, Mukesh Rathor wrote:
> Hi Guys,
> 
> ich_force_enable_hpet() in linux wants to do mmio. It calls ioremap_pte_range
> to map phys addr to a VA. Xen then updates the PV dom0's L1 with
> requested io attributes. I'm trying to figure how to do this for PV in
> HVM container. I was hoping to update the EPT directly.

This issue is going to come up with all the PCI devices too, isn't it?
Dom0 is going to read/write the PCI config space and ioremap the memory
of the device, memory that is not part of the EPT pagetables yet.
This issue also happens every time an HVM guest tries to remap a memory
region of a passed through PCI device.
In this case QEMU calls xc_domain_memory_mapping, that in Xen becomes
XEN_DOMCTL_memory_mapping, that is implemented as set_mmio_p2m_entry.
So maybe you just need to call set_mmio_p2m_entry.



> I was thinking of just doing guest_physmap_add_entry() but the mfn is not
> going to be valid. Is there any other code path that will let me do this?

Why the mfn is not going to be valid?
Shouldn't dom0 be able to find out exactly where the hpet is?


> Another possiblity would be handle_mmio(). 

I would avoid that if possible.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.