From: FelixCuioc <FelixCui-oc@zhaoxin.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>
Cc: TonyWWang-oc@zhaoxin.com, RockCui-oc@zhaoxin.com,
qemu-devel@nongnu.org, CobeChen-oc@zhaoxin.com
Subject: [PATCH 0/1] Skip flatview_simplify() for specific cpu vendor
Date: Thu, 3 Sep 2020 05:49:34 -0400 [thread overview]
Message-ID: <20200903094935.2361-1-FelixCui-oc@zhaoxin.com> (raw)
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
next reply other threads:[~2020-09-03 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 9:49 FelixCuioc [this message]
2020-09-03 9:49 ` [PATCH 1/1] Skip flatview_simplify() for specific cpu vendor FelixCuioc
2020-09-03 10:37 ` Paolo Bonzini
2020-09-03 11:24 ` 答复: " FelixCui-oc
2020-09-03 12:08 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200903094935.2361-1-FelixCui-oc@zhaoxin.com \
--to=felixcui-oc@zhaoxin.com \
--cc=CobeChen-oc@zhaoxin.com \
--cc=RockCui-oc@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).