Skip to contentSkip to conversation

p2m: p2m_mmio_direct set RW permissions

RFC PATCH Elena Ufimtseva 2 participants 2 messages Jan 22, 2015

lore
Share & tools
lore
#0 lore raw
Quoted 26 lines · ----- [email protected] wrote:
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.01.15 at 21:55, <[email protected]> wrote:

p2m_mmio_direct should result in setting IOMMUF_readable and

IOMMUF_writable

Quoted 2 lines

flags.
When pvh domain maps mmio regions, the EPT entries are not getting

mapped.

Quoted 1 line

This leads to IOMMU Page faults for some devices, as for example USB

Host

Quoted 1 line

controllers with embedded Debug devices. See

pvh-set-need_iommu-early RFC

Quoted 1 line

patch discussion fgor detail.

Even more so that the two patches aren't even a series, that part of the description belongs here, not in the other patch.

Quoted 1 line

I will appreciate your comments and ideas in regards to this

change.

Quoted 2 lines

Looking at Roger patches (xen/pvh: check permissions when adding

MMIO

Quoted 2 lines

regions)
the mmio memory type is proposed to be changed from p2m_mmio_direct

to

Quoted 2 lines

p2m_access_rw.
This type still does not have proper IOMMU flags mapping.

Quoted 8 lines

A fundamental question is what business devices have to DMA their own (or other devices') MMIO space. I could remotely see a need for this for e.g. frame buffers, but I have difficulty understanding this for USB devices. Please at the very least provide details on the MMIO regions that those devices have, and which of them you observed IOMMU faults on.

Jan

Hi Jan

The IOMMU Page fault addresses are 0xd5d45 and 0xd5d46 in case of ThinkCentre machine. If you would like to see any other details I am happy to send them as well.

With Dell Precision it is not known what addresses do trigger page faults because it just hangs.

I don't have an answer why the devices need to access DMA of their MMIOs. Will ask linux usb folks.

Elena

#1 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 22.01.15 at 16:11, <[email protected]> wrote:
Quoted 6 lines · ----- [email protected] wrote:

A fundamental question is what business devices have to DMA their own (or other devices') MMIO space. I could remotely see a need for this for e.g. frame buffers, but I have difficulty understanding this for USB devices. Please at the very least provide details on the MMIO regions that those devices have, and which of them you observed IOMMU faults on.

Quoted 3 lines

The IOMMU Page fault addresses are 0xd5d45 and 0xd5d46 in case of ThinkCentre machine.
If you would like to see any other details I am happy to send them as well.

Yes, the two numbers alone don't tell me anything - I can't even judge whether they're MFNs, GFNs, or host/guest physical addresses that way. I also specifically asked for providing the BAR values of the USB controller in question, to be able to match up the numbers. Logs and/or lspci output will be most useful for this purpose.

Jan