From: Edge NFV <edgenfv@gmail.com>
To: qemu-devel@nongnu.org
Cc: edgenfv@gmail.com
Subject: [PATCH] make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add
Date: Sun, 25 Apr 2021 22:45:13 -0700 [thread overview]
Message-ID: <20210426054513.132980-2-edgenfv@gmail.com> (raw)
In-Reply-To: <20210426054513.132980-1-edgenfv@gmail.com>
Signed-off-by: Edge NFV <edgenfv@gmail.com>
---
hw/vfio/common.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index ae5654fcdb..83e15bf7a3 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -668,6 +668,15 @@ static void vfio_listener_region_add(MemoryListener *listener,
int128_get64(int128_sub(section->size, int128_one())));
return;
}
+
+ /* Do not add virtio fs cache section */
+ if (!strcmp(memory_region_name(section->mr), "virtio-fs-cache")) {
+ trace_vfio_listener_region_add_skip(
+ section->offset_within_address_space,
+ section->offset_within_address_space +
+ int128_get64(int128_sub(section->size, int128_one())));
+ return;
+ }
if (unlikely((section->offset_within_address_space &
~qemu_real_host_page_mask) !=
--
2.25.1
next prev parent reply other threads:[~2021-04-26 13:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 5:45 [PATCH] make vfio and DAX cache work together Edge NFV
2021-04-26 5:45 ` Edge NFV [this message]
2021-04-26 13:18 ` [PATCH] make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add no-reply
2021-04-26 13:32 ` Laurent Vivier
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=20210426054513.132980-2-edgenfv@gmail.com \
--to=edgenfv@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).