All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Skip flatview_simplify() for specific cpu vendor
@ 2020-09-03  9:49 FelixCuioc
  2020-09-03  9:49 ` [PATCH 1/1] " FelixCuioc
  0 siblings, 1 reply; 5+ messages in thread
From: FelixCuioc @ 2020-09-03  9:49 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, Eduardo Habkost
  Cc: TonyWWang-oc, RockCui-oc, qemu-devel, CobeChen-oc

The reason we want to skip flatview_simplify() is
to prevent unnecessary IOVA address range mapping
from being unmapped.

The actual situation we encountered is:
When assign EHCI device to the virtual machine,
after initializing EHCI in seabios, it will continuously
send dma cycles.And EHCI dma buffer is allocated from
the range 0xd9000-0xexxxx belonging to zonelow.
But in seabios, make_bios_readonly_intel() will modify
the attributes in the range of 0xc0000-0x100000,except
for the zonelow range.
Before these ranges attributes are not changed,qemu will
perform flatview_simplify(),and the actual address range
formed in flatview is 0xc0000-0xbfffffff.When the properties
of this large range are modified to readonly,qemu will
unmap all the IOVA mappings in the address range 0xc0000-0xbfffffff.
But EHCI device still send dma cycle.

So dma cycles of the EHCI device will be blocked by the IOMMU.
And we want to skip flatview_simplify().

Error log when starting the virtual machine:
DMAR: [DMA Read] Request device [00:10.7] fault addr eb000 [fault reason 06] PTE Read access is not set
DMAR: [DMA Read] Request device [00:10.7] fault addr eb000 [fault reason 06] PTE Read access is not set

FelixCuioc (1):
  Skip flatview_simplify() for specific cpu vendor

 softmmu/memory.c  | 16 +++++++++++++++-
 target/i386/cpu.c |  8 ++++++++
 target/i386/cpu.h |  3 +++
 3 files changed, 26 insertions(+), 1 deletion(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-03 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03  9:49 [PATCH 0/1] Skip flatview_simplify() for specific cpu vendor FelixCuioc
2020-09-03  9:49 ` [PATCH 1/1] " FelixCuioc
2020-09-03 10:37   ` Paolo Bonzini
2020-09-03 11:24     ` 答复: " FelixCui-oc
2020-09-03 12:08       ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.