Re: [PATCH] make vfio and DAX cache work together

2021-05-04 Thread Dr. David Alan Gilbert
* Dev Audsin (dev.devaq...@gmail.com) wrote: > Thanks David. I did a quick test with the above patch and it seems to > work for me. With this patch, apparently I can create a VM with > SR-IOV VF and DAX cache ( virtio_fs_cache_size = 1024). Great! I'll put it in the next set of DAX patches I send

Re: [PATCH] make vfio and DAX cache work together

2021-04-30 Thread Dev Audsin
Thanks David. I did a quick test with the above patch and it seems to work for me. With this patch, apparently I can create a VM with SR-IOV VF and DAX cache ( virtio_fs_cache_size = 1024). Thanks Dev On Thu, Apr 29, 2021 at 6:55 PM Dr. David Alan Gilbert wrote: > > * Alex Williamson (alex.will

Re: [PATCH] make vfio and DAX cache work together

2021-04-29 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Thu, 29 Apr 2021 09:44:51 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > On Wed, 28 Apr 2021 20:17:23 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Dev Audsin (d

Re: [PATCH] make vfio and DAX cache work together

2021-04-29 Thread Alex Williamson
On Thu, 29 Apr 2021 09:44:51 +0100 "Dr. David Alan Gilbert" wrote: > * Alex Williamson (alex.william...@redhat.com) wrote: > > On Wed, 28 Apr 2021 20:17:23 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Dev Audsin (dev.devaq...@gmail.com) wrote: > > > > Thanks Dave for your explanati

Re: [PATCH] make vfio and DAX cache work together

2021-04-29 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Wed, 28 Apr 2021 20:17:23 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Dev Audsin (dev.devaq...@gmail.com) wrote: > > > Thanks Dave for your explanation. > > > Any suggestions on how to make VFIO not attempt to map into the > > > unacc

Re: [PATCH] make vfio and DAX cache work together

2021-04-28 Thread Alex Williamson
On Wed, 28 Apr 2021 20:17:23 +0100 "Dr. David Alan Gilbert" wrote: > * Dev Audsin (dev.devaq...@gmail.com) wrote: > > Thanks Dave for your explanation. > > Any suggestions on how to make VFIO not attempt to map into the > > unaccessible and unallocated RAM. > > I'm not sure;: > > static bool

Re: [PATCH] make vfio and DAX cache work together

2021-04-28 Thread Dr. David Alan Gilbert
* Dev Audsin (dev.devaq...@gmail.com) wrote: > Thanks Dave for your explanation. > Any suggestions on how to make VFIO not attempt to map into the > unaccessible and unallocated RAM. I'm not sure;: static bool vfio_listener_skipped_section(MemoryRegionSection *section) { return (!memory_regio

Re: [PATCH] make vfio and DAX cache work together

2021-04-28 Thread Dev Audsin
Thanks Dave for your explanation. Any suggestions on how to make VFIO not attempt to map into the unaccessible and unallocated RAM. Best Dev On Tue, Apr 27, 2021 at 8:00 PM Dr. David Alan Gilbert wrote: > > * Alex Williamson (alex.william...@redhat.com) wrote: > > On Tue, 27 Apr 2021 17:29:37 +0

Re: [PATCH] make vfio and DAX cache work together

2021-04-27 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Tue, 27 Apr 2021 17:29:37 +0100 > Dev Audsin wrote: > > > Hi Alex > > > > Based on your comments and thinking a bit, wonder if it makes sense to > > allow DMA map for the DAX cache but make unexpected mappings to be not > > fatal. Please

Re: [PATCH] make vfio and DAX cache work together

2021-04-27 Thread Alex Williamson
On Tue, 27 Apr 2021 17:29:37 +0100 Dev Audsin wrote: > Hi Alex > > Based on your comments and thinking a bit, wonder if it makes sense to > allow DMA map for the DAX cache but make unexpected mappings to be not > fatal. Please let me know your thoughts. I think you're still working on the assum

Re: [PATCH] make vfio and DAX cache work together

2021-04-27 Thread Dev Audsin
Hi Alex Based on your comments and thinking a bit, wonder if it makes sense to allow DMA map for the DAX cache but make unexpected mappings to be not fatal. Please let me know your thoughts. Dev On Mon, Apr 26, 2021 at 10:22 PM Alex Williamson wrote: > > On Mon, 26 Apr 2021 21:50:38 +0100 > Dev

Re: [PATCH] make vfio and DAX cache work together

2021-04-26 Thread Dev Audsin
Hi Alex and David @Alex: Justification on why this region cannot be a DMA target for the device, virtio-fs with DAX is currently not compatible with NIC Pass through. When a SR-IOV VF attaches to a qemu process, vfio will try to pin the entire DAX Window but it is empty when the guest boots and

Re: [PATCH] make vfio and DAX cache work together

2021-04-26 Thread Alex Williamson
On Mon, 26 Apr 2021 21:50:38 +0100 Dev Audsin wrote: > Hi Alex and David > > @Alex: > > Justification on why this region cannot be a DMA target for the device, > > virtio-fs with DAX is currently not compatible with NIC Pass through. > When a SR-IOV VF attaches to a qemu process, vfio will try

Re: [PATCH] make vfio and DAX cache work together

2021-04-26 Thread Alex Williamson
On Mon, 26 Apr 2021 13:19:05 +0100 "Dr. David Alan Gilbert" wrote: > * Edge NFV (edge...@gmail.com) wrote: > > Signed-off-by: Edge NFV > > Hi, > I take it that 'Edge NFV' isn't your real name; apologies if it is. > It's unusual not to use a real name; I would be interested to know > why yo

Re: [PATCH] make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add

2021-04-26 Thread Laurent Vivier
On 26/04/2021 07:45, Edge NFV wrote: > Signed-off-by: Edge NFV You must use your real name for a patch submission: https://wiki.qemu.org/Contribute/SubmitAPatch#Patch_emails_must_include_a_Signed-off-by:_line https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/

Re: [PATCH] make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add

2021-04-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210426054513.132980-2-edge...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210426054513.132980-2-edge...@gmail.com Subject: [PATCH] make vfio and DAX cache work

[PATCH] make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add

2021-04-26 Thread Edge NFV
Signed-off-by: Edge NFV --- 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

[PATCH] make vfio and DAX cache work together

2021-04-26 Thread Edge NFV
I am using Kata containers and create containers inside the virtual machine. The hypervisor used is QEMU. My workload is I/O and network intensive. So, I prefer SR-IOV VF (which provides better network isolation) and DAX caching to work together. However, I was unable to create a QEMU based vir

Re: [PATCH] make vfio and DAX cache work together

2021-04-26 Thread Dr. David Alan Gilbert
* Edge NFV (edge...@gmail.com) wrote: > Signed-off-by: Edge NFV Hi, I take it that 'Edge NFV' isn't your real name; apologies if it is. It's unusual not to use a real name; I would be interested to know why you feel uncomfortable not doing. > --- > hw/vfio/common.c | 9 + > 1 file ch

[PATCH] make vfio and DAX cache work together

2021-04-26 Thread Edge NFV
Signed-off-by: Edge NFV --- 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