Re: [RFC PATCH v2 5/6] hw/arm/virt-acpi-build: Add PPTT table

2021-04-28 Thread wangyanan (Y)
Hi Drew, On 2021/4/27 22:16, Andrew Jones wrote: On Tue, Apr 13, 2021 at 04:07:44PM +0800, Yanan Wang wrote: Add the Processor Properties Topology Table (PPTT) to present CPU topology information to ACPI guests. Note, while a DT boot Linux guest with a non-flat CPU topology will see socket and

[Bug 1925496] Re: nvme disk cannot be hotplugged after removal

2021-04-28 Thread Klaus Jensen
So, I had to investigate this a bit, since it is a part of QEMU that I'm not too familiar with. My understanding is that this is the expected behavior. The reason is that the drive cannot be deleted immediately when the device is hot- unplugged, since it might not be safe (other parts of QEMU coul

Re: [PATCH 0/4] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-04-28 Thread Mark Cave-Ayland
On 15/04/2021 11:23, Philippe Mathieu-Daudé wrote: Hi, The floppy disc controllers pulls in irrelevant devices (sysbus in an ISA-only machine, ISA bus + isa devices on a sysbus-only machine). This series clean that by extracting each device in its own file, adding the corresponding Kconfig sym

Re: [PATCH v3 08/33] block/nbd: drop thr->state

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
28.04.2021 01:23, Roman Kagan wrote: On Fri, Apr 16, 2021 at 11:08:46AM +0300, Vladimir Sementsov-Ogievskiy wrote: We don't need all these states. The code refactored to use two boolean variables looks simpler. Indeed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 125 +++

Re: [RFC PATCH v2 6/6] hw/arm/virt: Replace smp_parse with one that prefers cores

2021-04-28 Thread wangyanan (Y)
Hi Drew, On 2021/4/27 22:58, Andrew Jones wrote: On Tue, Apr 13, 2021 at 04:07:45PM +0800, Yanan Wang wrote: From: Andrew Jones The virt machine type has never used the CPU topology parameters, other than number of online CPUs and max CPUs. When choosing how to allocate those CPUs the default

Re: [PATCH v3 13/33] block/nbd: introduce nbd_client_connection_release()

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
28.04.2021 01:35, Roman Kagan wrote: On Fri, Apr 16, 2021 at 11:08:51AM +0300, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/blo

Re: [PATCH v3 14/33] nbd: move connection code from block/nbd to nbd/client-connection

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
28.04.2021 01:45, Roman Kagan wrote: On Fri, Apr 16, 2021 at 11:08:52AM +0300, Vladimir Sementsov-Ogievskiy wrote: We now have bs-independent connection API, which consists of four functions: nbd_client_connection_new() nbd_client_connection_unref() nbd_co_establish_connection() nbd

Re: [PATCH v3 15/33] nbd/client-connection: use QEMU_LOCK_GUARD

2021-04-28 Thread Vladimir Sementsov-Ogievskiy
28.04.2021 09:08, Roman Kagan wrote: On Fri, Apr 16, 2021 at 11:08:53AM +0300, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/client-connection.c | 94 ++--- 1 file changed, 42 insertions(+), 52 deletions(-) diff -

Re: [PATCH 1/2] hw/sparc: Allow building the leon3 machine stand-alone

2021-04-28 Thread Mark Cave-Ayland
On 28/04/2021 01:11, Richard Henderson wrote: On 4/27/21 12:26 PM, Philippe Mathieu-Daudé wrote: When building only the leon3 machine, we get this link failure:    /usr/bin/ld: target_sparc_win_helper.c.o: in function `cpu_put_psr':    target/sparc/win_helper.c:91: undefined reference to `cpu_

Re: [PATCH 0/2] hw/sparc: Kconfig fixes to build with/without the leon3 machine

2021-04-28 Thread Mark Cave-Ayland
On 27/04/2021 20:26, Philippe Mathieu-Daudé wrote: This series fixes link failure when building either the leon3 machine or the sun4m ones. The problem is we have hardware specific code in the architectural translation code. Move this code to hw/sparc/. The link failures can be reproduced doin

Re: [PATCH RFC 0/1] To add HMP interface to dump PCI MSI-X table/PBA

2021-04-28 Thread Dr. David Alan Gilbert
* Dongli Zhang (dongli.zh...@oracle.com) wrote: > Hi Jason, > > On 4/27/21 7:31 PM, Jason Wang wrote: > > > > 在 2021/4/27 下午4:53, Dr. David Alan Gilbert 写道: > >> * Dongli Zhang (dongli.zh...@oracle.com) wrote: > >>> > >>> On 4/22/21 11:01 PM, Jason Wang wrote: > 在 2021/4/23 下午12:47, Dongli Z

Re: socket.c added support for unix domain socket datagram transport

2021-04-28 Thread Daniel P . Berrangé
On Tue, Apr 27, 2021 at 11:52:29PM +0200, Stefano Brivio wrote: > On Mon, 26 Apr 2021 13:56:40 +0100 > Daniel P. Berrangé wrote: > > The pain we're feeling is largely because the design of the net > > option syntax is one of the oldest parts of QEMU and has only > > been very partially improved up

Re: [PATCH 0/2] hw/sparc: Kconfig fixes to build with/without the leon3 machine

2021-04-28 Thread Fred Konrad
Le 4/27/21 à 9:26 PM, Philippe Mathieu-Daudé a écrit : This series fixes link failure when building either the leon3 machine or the sun4m ones. The problem is we have hardware specific code in the architectural translation code. Move this code to hw/sparc/. The link failures can be reproduce

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Stefan Hajnoczi
On Tue, Apr 27, 2021 at 07:54:21PM +0200, Philippe Mathieu-Daudé wrote: > On 4/27/21 7:16 PM, John Snow wrote: > > On 4/27/21 9:54 AM, Stefan Hajnoczi wrote: > >> I suggest fixing this at the qdev level. Make piix3-ide have a > >> sub-device that inherits from ISA_DEVICE so it can only be instantia

Re: [PATCH v2 07/12] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-04-28 Thread Gerd Hoffmann
Hi, > diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c > index 2c0e7b2455..8bbce08550 100644 > --- a/hw/display/virtio-gpu-udmabuf.c > +++ b/hw/display/virtio-gpu-udmabuf.c > @@ -72,7 +72,10 @@ static void virtio_gpu_create_udmabuf(struct > virtio_gpu_simple_resour

Re: [RFC PATCH 2/2] hw/sparc: Allow building without the leon3 machine

2021-04-28 Thread Fred Konrad
Hi Philippe, Le 4/27/21 à 9:26 PM, Philippe Mathieu-Daudé a écrit : When building without the leon3 machine, we get this link failure: /usr/bin/ld: target_sparc_int32_helper.c.o: in function `leon3_irq_manager': target/sparc/int32_helper.c:172: undefined reference to `leon3_irq_ack' This

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Stefan Hajnoczi
On Tue, Apr 27, 2021 at 02:02:27PM -0400, John Snow wrote: > On 4/27/21 1:54 PM, Philippe Mathieu-Daudé wrote: > > On 4/27/21 7:16 PM, John Snow wrote: > > > On 4/27/21 9:54 AM, Stefan Hajnoczi wrote: > > > > I suggest fixing this at the qdev level. Make piix3-ide have a > > > > sub-device that inh

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Stefan Hajnoczi
On Fri, Apr 16, 2021 at 02:52:56PM +0200, Thomas Huth wrote: > @@ -158,7 +166,11 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error > **errp) > > vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); > > -pci_piix_init_ports(d); > +rc = pci_piix_init_ports(d); > +i

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Thomas Huth
On 28/04/2021 11.24, Stefan Hajnoczi wrote: On Fri, Apr 16, 2021 at 02:52:56PM +0200, Thomas Huth wrote: @@ -158,7 +166,11 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); -pci_piix_init_ports(d); +

Re: [RFC PATCH v2 6/6] hw/arm/virt: Replace smp_parse with one that prefers cores

2021-04-28 Thread wangyanan (Y)
On 2021/4/27 22:58, Andrew Jones wrote: On Tue, Apr 13, 2021 at 04:07:45PM +0800, Yanan Wang wrote: From: Andrew Jones The virt machine type has never used the CPU topology parameters, other than number of online CPUs and max CPUs. When choosing how to allocate those CPUs the default has bee

[Bug 1925496] Re: nvme disk cannot be hotplugged after removal

2021-04-28 Thread Oguz Bektas
> My understanding is that this is the expected behavior. The reason is that the drive cannot be deleted immediately when the device is hot- unplugged, since it might not be safe (other parts of QEMU could be using it, like background block jobs). > On the other hand, the fact that if the drive is

Re: [PATCH 0/2] block/export: Fix crash on error after iothread conflict

2021-04-28 Thread Stefan Hajnoczi
On Thu, Apr 22, 2021 at 04:53:33PM +0200, Max Reitz wrote: > Hi, > > By passing the @iothread option to block-export-add, the new export can > be moved to the given iothread. This may conflict with an existing > parent of the node in question. How this conflict is resolved, depends > on @fixed-i

Re: [RFC v9 15/29] vfio: Set up nested stage mappings

2021-04-28 Thread Kunkun Jiang
Hi Eric, On 2021/4/27 3:16, Auger Eric wrote: Hi Kunkun, On 4/15/21 4:03 AM, Kunkun Jiang wrote: Hi Eric, On 2021/4/14 16:05, Auger Eric wrote: Hi Kunkun, On 4/14/21 3:45 AM, Kunkun Jiang wrote: On 2021/4/13 20:57, Auger Eric wrote: Hi Kunkun, On 4/13/21 2:10 PM, Kunkun Jiang wrote: Hi

Re: [RFC v3 01/13] hw/s390x: rename tod-qemu.c to tod-tcg.c

2021-04-28 Thread David Hildenbrand
On 22.04.21 13:54, Claudio Fontana wrote: we stop short of renaming the actual qom object though, so type remains TYPE_QEMU_S390_TOD, ie "s390-tod-qemu". Signed-off-by: Claudio Fontana --- hw/s390x/{tod-qemu.c => tod-tcg.c} | 0 hw/s390x/meson.build | 2 +- 2 files changed, 1

Re: [RFC v3 02/13] hw/s390x: only build tod-tcg from the CONFIG_TCG build

2021-04-28 Thread David Hildenbrand
On 22.04.21 13:54, Claudio Fontana wrote: this will allow in later patches to remove unneeded stubs in target/s390x. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand --- hw/s390x/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/s390x/meson.b

Re: [RFC v3 05/13] target/s390x: start moving TCG-only code to tcg/

2021-04-28 Thread David Hildenbrand
On 22.04.21 13:54, Claudio Fontana wrote: move everything related to translate, as well as HELPER code in tcg/ mmu_helper.c stays put for now, as it contains both TCG and KVM code. The internal.h file is renamed to s390x-internal.h, because of the risk of collision with other files with the sam

Re: [RFC v3 03/13] hw/s390x: tod: make explicit checks for accelerators when initializing

2021-04-28 Thread David Hildenbrand
On 22.04.21 13:54, Claudio Fontana wrote: replace general "else" with specific checks for each possible accelerator. Handle qtest as a NOP, and error out for an unknown accelerator used in combination with tod. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand --- hw/s390x/tod.c

Re: [Bug 1925496] Re: nvme disk cannot be hotplugged after removal

2021-04-28 Thread Klaus Jensen
On Apr 28 09:31, Oguz Bektas wrote: My understanding is that this is the expected behavior. The reason is that the drive cannot be deleted immediately when the device is hot-unplugged, since it might not be safe (other parts of QEMU could be using it, like background block jobs). On the other ha

Re: [PATCH] virtio-net: failover: add missing remove_migration_state_change_notifier()

2021-04-28 Thread Michael S. Tsirkin
On Tue, Apr 27, 2021 at 03:02:34PM +0100, Dr. David Alan Gilbert wrote: > * Laurent Vivier (lviv...@redhat.com) wrote: > > In the failover case configuration, virtio_net_device_realize() uses an > > add_migration_state_change_notifier() to add a state notifier, but this > > notifier is not removed

Re: [RFC PATCH v2 6/6] hw/arm/virt: Replace smp_parse with one that prefers cores

2021-04-28 Thread Andrew Jones
On Wed, Apr 28, 2021 at 05:36:43PM +0800, wangyanan (Y) wrote: > > On 2021/4/27 22:58, Andrew Jones wrote: > > On Tue, Apr 13, 2021 at 04:07:45PM +0800, Yanan Wang wrote: > > > From: Andrew Jones > > > > > > The virt machine type has never used the CPU topology parameters, other > > > than numbe

Re: [RFC PATCH v2 1/4] vl.c: Add -smp, clusters=* command line support for ARM cpu

2021-04-28 Thread Andrew Jones
On Tue, Apr 13, 2021 at 04:31:44PM +0800, Yanan Wang wrote: > A cluster means a group of cores that share some resources (e.g. cache) > among them under the LLC. For example, ARM64 server chip Kunpeng 920 has > 6 or 8 clusters in each NUMA, and each cluster has 4 cores. All clusters > share L3 cach

Re: [RFC v3 13/13] MAINTAINERS: update s390x directories

2021-04-28 Thread Claudio Fontana
Hello Cornelia, On 4/27/21 5:00 PM, Cornelia Huck wrote: > On Thu, 22 Apr 2021 13:54:30 +0200 > Claudio Fontana wrote: > >> After the reshuffling, update MAINTAINERS accordingly. >> Make use of the new directories: >> >> target/s390x/kvm/ >> target/s390x/tcg/ > > Is there anything left in targe

Re: [RFC PATCH v2 2/4] hw/arm/virt: Parse -smp cluster parameter in virt_smp_parse

2021-04-28 Thread Andrew Jones
On Tue, Apr 13, 2021 at 04:31:45PM +0800, Yanan Wang wrote: > There is a separate function virt_smp_parse() in hw/virt/arm.c used > to parse cpu topology for the ARM machines. So add parsing of -smp > cluster parameter in it, then total number of logical cpus will be > calculated like: max_cpus = s

Re: [PATCH] vfio-ccw: Attempt to clean up all IRQs on error

2021-04-28 Thread Cornelia Huck
On Tue, 27 Apr 2021 16:25:11 +0200 Eric Farman wrote: > The vfio_ccw_unrealize() routine makes an unconditional attempt to > unregister every IRQ notifier, though they may not have been registered > in the first place (when running on an older kernel, for example). > > Let's mirror this behavior

Re: [RFC PATCH v2 3/4] hw/arm/virt-acpi-build: Add cluster level for PPTT table

2021-04-28 Thread Andrew Jones
On Tue, Apr 13, 2021 at 04:31:46PM +0800, Yanan Wang wrote: > Add a Processor Hierarchy Node of cluster level between core level > and package level for ARM PPTT table. > > Signed-off-by: Yanan Wang > --- > hw/arm/virt-acpi-build.c | 55 > 1 file changed,

Re: [RFC PATCH v2 4/4] hw/arm/virt: Add cluster level for device tree

2021-04-28 Thread Andrew Jones
On Tue, Apr 13, 2021 at 04:31:47PM +0800, Yanan Wang wrote: > Add a cluster level between core level and package level for > ARM device tree. > > Signed-off-by: Yanan Wang > --- > hw/arm/virt.c | 12 > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/hw/arm/virt.c b

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/28/21 11:32 AM, Thomas Huth wrote: > On 28/04/2021 11.24, Stefan Hajnoczi wrote: >> On Fri, Apr 16, 2021 at 02:52:56PM +0200, Thomas Huth wrote: >>> @@ -158,7 +166,11 @@ static void pci_piix_ide_realize(PCIDevice *dev, >>> Error **errp) >>>     vmstate_register(VMSTATE_IF(dev), 0, &vmstate

[PATCH v3 01/26] virtiofs: Fixup printf args

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fixup some fuse_log printf args for 32bit compatibility. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tool

[PATCH v3 00/26] virtiofs dax patches

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This series adds support for acceleration of virtiofs via DAX mapping, using features added in the 5.11 Linux kernel. DAX originally existed in the kernel for mapping real storage devices directly into memory, so that reads/writes turn into reads/writes directl

[PATCH v3 03/26] DAX: vhost-user: Rework slave return values

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" All the current slave handlers on the qemu side generate an 'int' return value that's squashed down to a bool (!!ret) and stuffed into a uint64_t (field of a union) to be returned. Move the uint64_t type back up through the individual handlers so that we can make o

[PATCH v3 07/26] DAX: virtio: Add shared memory capability

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' and the data structure 'virtio_pci_cap64' to go with it. They allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distingui

[PATCH v3 04/26] DAX: libvhost-user: Route slave message payload

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Route the uint64 payload from message replies on the slave back up through vu_process_message_reply and to the callers. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file c

[PATCH v3 02/26] virtiofsd: Don't assume header layout

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" virtiofsd incorrectly assumed a fixed set of header layout in the virt queue; assuming that the fuse and write headers were conveniently separated from the data; the spec doesn't allow us to take that convenience, so fix it up to deal with it the hard way. Signed-

[PATCH v3 09/26] DAX: virtio-fs: Add vhost-user slave commands for mapping

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The daemon may request that fd's be mapped into the virtio-fs cache visible to the guest. These mappings are triggered by commands sent over the slave fd from the daemon. Signed-off-by: Dr. David Alan Gilbert --- docs/interop/vhost-user.rst | 21 +++

Re: [PATCH v5 cxl2.0-v3-doe 2/6] include/hw/pci: headers for PCIe DOE

2021-04-28 Thread Jonathan Cameron
On Mon, 26 Apr 2021 13:16:43 -0400 Chris Browy wrote: > From: hchkuo > > Macros for the vender ID of PCI-SIG and the size of PCIe Data Object > Exchange. The PCI SIG vendor ID is a little tricky to track down as it's only called out indirectly in PCI specs. In a similar fashion to what Bjorn

[PATCH v3 10/26] DAX: virtio-fs: Fill in slave commands for mapping

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fill in definitions for map, unmap and sync commands. Signed-off-by: Dr. David Alan Gilbert with fix by misono.tomoh...@fujitsu.com --- hw/virtio/vhost-user-fs.c | 117 -- 1 file changed, 113 insertions(+), 4 deletions(-) diff

[PATCH v3 06/26] DAX subprojects/libvhost-user: Add virtio-fs slave types

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add virtio-fs definitions to libvhost-user Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 48 +++ subprojects/libvhost-user/libvhost-user.h | 40 +++ 2 files

[PATCH v3 11/26] DAX: virtiofsd Add cache accessor functions

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add low level functions that the clients can use to map/unmap cache areas. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.h | 21 + tools/virtiofsd/fuse_virtio.c | 18 ++

[PATCH v3 08/26] DAX: virtio-fs: Add cache BAR

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a cache BAR into which files will be directly mapped. The size can be set with the cache-size= property, e.g. -device vhost-user-fs-pci,chardev=char0,tag=myfs,cache-size=16G The default is no cache. Signed-off-by: Dr. David Alan Gilbert with PPC fixes by:

[PATCH v3 14/26] DAX: virtiofsd: Wire up passthrough_ll's lo_setupmapping

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up passthrough_ll's setupmapping to allocate, send to virtio and then reply OK. Guest might not pass file pointer. In that case using inode info, open the file again, mmap() and close fd. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal With

[PATCH v3 05/26] DAX: libvhost-user: Allow popping a queue element with bad pointers

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a daemon implemented with libvhost-user to accept an element with pointers to memory that aren't in the mapping table. The daemon might have some special way to deal with some special cases of this. The default behaviour doesn't change. Signed-off-by: Dr. Da

[PATCH v3 15/26] DAX: virtiofsd: Make lo_removemapping() work

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Let guest pass in the offset in dax window a mapping is currently mapped at and needs to be removed. Vivek added the initial support to remove single mapping and later Peng added patch to support removing multiple mappings in single command. Signed-off-by: Vivek Goyal Signed-

[PATCH v3 13/26] DAX: virtiofsd: Add setup/remove mapping handlers to passthrough_ll

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_ll.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 110f85a701..a

[PATCH v3 18/26] DAX/unmap: virtiofsd: Add VHOST_USER_SLAVE_FS_IO

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Define a new slave command 'VHOST_USER_SLAVE_FS_IO' for a client to ask qemu to perform a read/write from an fd directly to GPA. Signed-off-by: Dr. David Alan Gilbert --- docs/interop/vhost-user.rst | 16 hw/virtio/trace-events

[PATCH v3 12/26] DAX: virtiofsd: Add setup/remove mappings fuse commands

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add commands so that the guest kernel can ask the daemon to map file sections into a guest kernel visible cache. Note: Catherine Ho had sent a patch to fix an issue with multiple removemapping. It was a merge issue though. Signed-off-by: Dr. David Alan Gilbert Si

[PATCH v3 17/26] DAX: virtiofsd: Perform an unmap on destroy

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Force unmap all remaining dax cache entries on a destroy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_ll.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c

[PATCH v3 16/26] DAX: virtiofsd: route se down to destroy method

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We're going to need to pass the session down to destroy so that it can pass it back to do the remove mapping. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 6 +++--- tools/virtiofsd/fuse_lowlevel.h | 2

[PATCH v3 20/26] DAX/unmap virtiofsd: Parse unmappable elements

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For some read/writes the virtio queue elements are unmappable by the daemon; these are cases where the data is to be read/written from non-RAM. In viritofs's case this is typically a direct read/write into an mmap'd DAX file also on virtiofs (possibly on another in

[PATCH v3 21/26] DAX/unmap virtiofsd: Route unmappable reads

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When a read with unmappable buffers is found, map it to a slave read command. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/tools/virtiofsd/fuse_vir

[PATCH v3 22/26] DAX/unmap virtiofsd: route unmappable write to slave command

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When a fuse_buf_copy is performed on an element with FUSE_BUF_PHYS_ADDR route it to a fuse_virtio_write request that does a slave command to perform the write. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/buffer.c | 14 +++--- tools/v

[PATCH v3 19/26] DAX/unmap virtiofsd: Add wrappers for VHOST_USER_SLAVE_FS_IO

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a wrapper to send VHOST_USER_SLAVE_FS_IO commands and a further wrapper for sending a fuse_buf write using the FS_IO slave command. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.h | 25 ++

[PATCH v3 23/26] DAX:virtiofsd: implement FUSE_INIT map_alignment field

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Communicate the host page size to the FUSE client so that FUSE_SETUPMAPPING/FUSE_REMOVEMAPPING requests are aware of our alignment constraints. Signed-off-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 8 1 file changed, 8 insertions(+) diff --git a/t

[PATCH v3 24/26] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Extend VhostUserFSSlaveMsg so that slave can ask it to drop CAP_FSETID before doing I/O on fd. In some cases, virtiofsd takes the onus of clearing setuid bit on a file when WRITE happens. Generally virtiofsd does the WRITE to fd (from guest memory which is mapped in virtiofsd a

[PATCH v3 25/26] vhost-user-fs: Implement drop CAP_FSETID functionality

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal As part of slave_io message, slave can ask to do I/O on an fd. Additionally slave can ask for dropping CAP_FSETID (if master has it) before doing I/O. Implement functionality to drop CAP_FSETID and gain it back after the operation. This also creates a dependency on libcap-ng.

[PATCH v3 26/26] virtiofsd: Ask qemu to drop CAP_FSETID if client asked for it

2021-04-28 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If qemu guest asked to drop CAP_FSETID upon write, send that info to qemu in SLAVE_FS_IO message so that qemu can drop capability before WRITE. This is to make sure that any setuid bit is killed on fd (if there is one set). Signed-off-by: Vivek Goyal --- tools/virtiofsd/buffe

Re: [PATCH 0/4] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/28/21 9:57 AM, Mark Cave-Ayland wrote: > On 15/04/2021 11:23, Philippe Mathieu-Daudé wrote: > >> Hi, >> >> The floppy disc controllers pulls in irrelevant devices (sysbus in >> an ISA-only machine, ISA bus + isa devices on a sysbus-only machine). >> >> This series clean that by extracting eac

Re: Re: Re: [PATCH 0/3] Introduce vhost-vdpa block device

2021-04-28 Thread Yongji Xie
On Tue, Apr 27, 2021 at 10:28 PM Stefan Hajnoczi wrote: > > On Tue, Apr 27, 2021 at 06:24:55PM +0800, Yongji Xie wrote: > > On Mon, Apr 26, 2021 at 11:34 PM Stefan Hajnoczi > > wrote: > > > > > > On Thu, Apr 08, 2021 at 06:12:49PM +0800, Xie Yongji wrote: > > > > Since we already have some ways

Re: [PATCH v3 00/26] virtiofs dax patches

2021-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210428110100.27757-1-dgilb...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210428110100.27757-1-dgilb...@redhat.com Subject: [PATCH v3 00/26] virtiofs dax patches

Re: [PATCH v3 00/36] block: update graph permissions update

2021-04-28 Thread Kevin Wolf
Am 17.03.2021 um 15:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > Finally, I finished v3. Phew. > > Missed a soft-freeze. Should we consider it a bugfix? There are bugfixes > here but they are mostly theoretical. So, up to Kevin, should it go to > current release or to the next..

Re: [RFC PATCH] hw/s390x/ccw: Register qbus type in abstract TYPE_CCW_DEVICE parent

2021-04-28 Thread Cornelia Huck
On Sat, 24 Apr 2021 16:53:13 +0200 Philippe Mathieu-Daudé wrote: > Instead of having all TYPE_CCW_DEVICE children set the bus type to > TYPE_VIRTUAL_CSS_BUS, do it once in the abstract parent. > > Signed-off-by: Philippe Mathieu-Daudé > --- > RFC because I don't know these devices, maybe there

Re: X on old (non-x86) Linux guests

2021-04-28 Thread BALATON Zoltan
On Wed, 28 Apr 2021, Andrew Randrianasulu wrote: On Wednesday, April 28, 2021, Andrew Randrianasulu wrote: On Monday, April 26, 2021, BALATON Zoltan wrote: On Mon, 26 Apr 2021, Dr. David Alan Gilbert wrote: Over the weekend I got a Red Hat 6.x (not RHEL!) for Alpha booting under QEMU which

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 0/3] Introduce vhost-vdpa block device

2021-04-28 Thread Stefano Garzarella
On Wed, Apr 28, 2021 at 07:27:03PM +0800, Yongji Xie wrote: On Tue, Apr 27, 2021 at 10:28 PM Stefan Hajnoczi wrote: On Tue, Apr 27, 2021 at 06:24:55PM +0800, Yongji Xie wrote: > On Mon, Apr 26, 2021 at 11:34 PM Stefan Hajnoczi wrote: > > > > On Thu, Apr 08, 2021 at 06:12:49PM +0800, Xie Yongj

[RUST] Add crate for generic vhost-user-i2c backend daemon

2021-04-28 Thread Viresh Kumar
Hello, In my earlier attempt [1], I implemented the vhost-user-i2c backend deamon for QEMU (though the code was generic enough to be used with any hypervisor). And here is a Rust implementation of the vhost-user-i2c backend daemon. Again this is generic enough to be used with any hypervisor and c

[PATCH] target/riscv: Dump CSR mscratch/sscratch/satp

2021-04-28 Thread Changbin Du
This dumps the CSR mscratch/sscratch/satp and meanwhile aligns the output of CSR mtval/stval. Signed-off-by: Changbin Du --- target/riscv/cpu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7d6ed80f6b67..73af6f5445ba 1006

Re: [PATCH 4/4] hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/27/21 7:34 PM, John Snow wrote: > On 4/15/21 6:23 AM, Philippe Mathieu-Daudé wrote: >> Some machines use floppy controllers via the SysBus interface, >> and don't need to pull in all the SysBus code. >> Extract the SysBus specific code to a new unit: fdc-sysbus.c, >> and add a new Kconfig symb

Re: [PATCH 0/4] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-04-28 Thread Philippe Mathieu-Daudé
On 4/28/21 1:25 PM, Philippe Mathieu-Daudé wrote: > On 4/28/21 9:57 AM, Mark Cave-Ayland wrote: >> This basically looks good to me. You may be able to simplify this >> further by removing the global legacy init functions >> fdctrl_init_sysbus() and sun4m_fdctrl_init(): from what I can see >> fdctr

Re: [PATCH] spapr: Modify ibm, get-config-addr-info2 to set DEVNUM in PE config address.

2021-04-28 Thread Oliver O'Halloran
On Tue, Apr 27, 2021 at 9:56 PM Mahesh Salgaonkar wrote: > > With upstream kernel, especially after commit 98ba956f6a389 > ("powerpc/pseries/eeh: Rework device EEH PE determination") we see that KVM > guest isn't able to enable EEH option for PCI pass-through devices anymore. How are you passing

[PATCH v2 0/8] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-04-28 Thread Philippe Mathieu-Daudé
Hi, The floppy disc controllers pulls in irrelevant devices (sysbus in an ISA-only machine, ISA bus + isa devices on a sysbus-only machine). This series clean that by extracting each device in its own file, adding the corresponding Kconfig symbols: FDC_ISA and FDC_SYSBUS. Since v1: - added missi

[PATCH v2 3/8] hw/block/fdc: Extract ISA floppy controllers to fdc-isa.c

2021-04-28 Thread Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface, and don't need to pull in all the ISA code. Extract the ISA specific code to a new unit: fdc-isa.c, and add a new Kconfig symbol: "FDC_ISA". Reviewed-by: John Snow Acked-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v2 2/8] hw/block/fdc: Declare shared prototypes in fdc-internal.h

2021-04-28 Thread Philippe Mathieu-Daudé
We want to extract ISA/SysBus code from the generic fdc.c file. First, declare the prototypes we will access from the new units into a new local header: "fdc-internal.h". Acked-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc-internal.h | 156 +

[PATCH v2 7/8] hw/block/fdc-sysbus: Add 'dma-channel' property

2021-04-28 Thread Philippe Mathieu-Daudé
QDev properties to be set before the device is realized should be exposed as a Property with a DEFINE_PROP_XXX() macro, then accessed with the equivalent qdev_prop_set_xxx() API. Do this with the FDCtrlSysBus 'dma-channel' property: convert it to int32_t, default-initialize with DEFINE_PROP_INT32(

[PATCH v2 1/8] hw/block/fdc: Replace disabled fprintf() by trace event

2021-04-28 Thread Philippe Mathieu-Daudé
Reviewed-by: John Snow Acked-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c| 7 +-- hw/block/trace-events | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index a825c2acbae..1d3a0473678 100644 --- a/

[PATCH v2 6/8] hw/sparc/sun4m: Inline sun4m_fdctrl_init()

2021-04-28 Thread Philippe Mathieu-Daudé
There is only one call site for sun4m_fdctrl_init(), and this function is specific to the sun4m machines, not part of the SYSBUS_FDC API. Move it locally with the machine code, and remove its declaration in "hw/block/fdc.h". Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --

[PATCH v2 5/8] hw/block/fdc: Add sysbus_fdc_init_drives() method

2021-04-28 Thread Philippe Mathieu-Daudé
FDCtrlSysBus's FDCtrl state is a private field. However it is accessed by the public fdctrl_init_sysbus() and sun4m_fdctrl_init() methods. To be able to move them out of fdc-sysbus.c, first add the sysbus_fdc_init_drives() method and use it in these 2 functions. Signed-off-by: Philippe Mathieu-Dau

Re: [PATCH v3 19/26] DAX/unmap virtiofsd: Add wrappers for VHOST_USER_SLAVE_FS_IO

2021-04-28 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > Add a wrapper to send VHOST_USER_SLAVE_FS_IO commands and a > further wrapper for sending a fuse_buf write using the FS_IO > slave command. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: S

[PATCH v2 4/8] hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c

2021-04-28 Thread Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface, and don't need to pull in all the SysBus code. Extract the SysBus specific code to a new unit: fdc-sysbus.c, and add a new Kconfig symbol: "FDC_SYSBUS". Reviewed-by: John Snow Acked-by: Mark Cave-Ayland Signed-off-by: Philippe Mathie

[PATCH v2 8/8] hw/mips/jazz: Inline fdctrl_init_sysbus()

2021-04-28 Thread Philippe Mathieu-Daudé
There is only one call site for fdctrl_init_sysbus(), and this function is specific to the jazz machines, not part of the SYSBUS_FDC API. Move it locally with the machine code, and remove its declaration in "hw/block/fdc.h". Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --

Re: [PATCH v8 08/11] hw/core: deprecate old reset functions and introduce new ones

2021-04-28 Thread Peter Maydell
On Wed, 28 Apr 2021 at 06:03, Markus Armbruster wrote: > For what it's worth, Damien further explained the two helpers in > docs/devel/reset.rst: > > For Devices and Buses, the following helper functions exist: > > - ``device_cold_reset()`` > - ``bus_cold_reset()`` > > These are si

Re: [PATCH v3 09/12] target/hexagon: import lexer for idef-parser

2021-04-28 Thread Paolo Montesel
> > > +"fLSBNEW(P"{LOWER_PRE}"N)" { yylval->rvalue.type = PREDICATE; > > + yylval->rvalue.pre.id = yytext[9]; > > + yylval->rvalue.bit_width = 32; > > + yylval->rvalue.is_dotnew = true; > > + ret

Re: [PATCH] vfio-ccw: Attempt to clean up all IRQs on error

2021-04-28 Thread Eric Farman
On Wed, 2021-04-28 at 12:37 +0200, Cornelia Huck wrote: > On Tue, 27 Apr 2021 16:25:11 +0200 > Eric Farman wrote: > > > The vfio_ccw_unrealize() routine makes an unconditional attempt to > > unregister every IRQ notifier, though they may not have been > > registered > > in the first place (when r

Re: [Bug 1925496] Re: nvme disk cannot be hotplugged after removal

2021-04-28 Thread Max Reitz
On 28.04.21 12:12, Klaus Jensen wrote: On Apr 28 09:31, Oguz Bektas wrote: My understanding is that this is the expected behavior. The reason is that the drive cannot be deleted immediately when the device is hot-unplugged, since it might not be safe (other parts of QEMU could be using it, like

Re: [PATCH v4 09/12] target/hexagon: import lexer for idef-parser

2021-04-28 Thread Paolo Montesel
> > > +/** > > + * Semantic record of the IMM token, identifying an immediate constant > > + */ > > +typedef struct HexImm { > > +union { > > +char id;/**< Identifier of the immediate > */ > > +uint64_t value; /**< Immediate value (for VALUE type > immediate

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-04-28 Thread Bin Meng
Hi Cédric, On Tue, Apr 27, 2021 at 10:32 PM Cédric Le Goater wrote: > > Hello, > > On 4/27/21 10:54 AM, Francisco Iglesias wrote: > > On [2021 Apr 27] Tue 15:56:10, Alistair Francis wrote: > >> On Fri, Apr 23, 2021 at 4:46 PM Bin Meng wrote: > >>> > >>> On Mon, Feb 8, 2021 at 10:41 PM Bin Meng

[PATCH] docs: fix link in sbsa description

2021-04-28 Thread Alex Bennée
A trailing _ makes all the difference to the rendered link. Signed-off-by: Alex Bennée --- docs/system/arm/sbsa.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/arm/sbsa.rst b/docs/system/arm/sbsa.rst index b8ecfdb62f..27b0999aac 100644 --- a/docs/system/arm/sb

Re: X on old (non-x86) Linux guests

2021-04-28 Thread Andrew Randrianasulu
On Wednesday, April 28, 2021, BALATON Zoltan wrote: > On Wed, 28 Apr 2021, Andrew Randrianasulu wrote: > >> On Wednesday, April 28, 2021, Andrew Randrianasulu < >> randrianas...@gmail.com> >> wrote: >> >>> On Monday, April 26, 2021, BALATON Zoltan wrote: >>> On Mon, 26 Apr 2021, Dr. David A

Re: [PATCH v5 cxl2.0-v3-doe 3/6] hw/pci: PCIe Data Object Exchange implementation

2021-04-28 Thread Jonathan Cameron
On Mon, 26 Apr 2021 13:28:19 -0400 Chris Browy wrote: > From: hchkuo > > PCIe Data Object Exchange (DOE) implementation for QEMU referring to > "PCIe Data Object Exchange ECN, March 12, 2020". > > The patch supports multiple DOE capabilities for a single PCIe device in > QEMU. For each capabil

Re: [PATCH v8 08/11] hw/core: deprecate old reset functions and introduce new ones

2021-04-28 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 28 Apr 2021 at 06:03, Markus Armbruster wrote: >> For what it's worth, Damien further explained the two helpers in >> docs/devel/reset.rst: >> >> For Devices and Buses, the following helper functions exist: >> >> - ``device_cold_reset()`` >> - ``bus_co

Re: [PATCH v5 cxl2.0-v3-doe 4/6] cxl/compliance: CXL Compliance Data Object Exchange implementation

2021-04-28 Thread Jonathan Cameron
On Mon, 26 Apr 2021 13:33:08 -0400 Chris Browy wrote: > From: hchkuo > > The Data Object Exchange implementation of CXL Compliance Mode is > referring to "Compute Express Link (CXL) Specification, Rev. 2.0, Oct. > 2020". > > The data structure of CXL compliance request and response is added to

Re: [PATCH v2 11/15] target/ppc: Move D/DS/X-form integer loads to decodetree

2021-04-28 Thread Matheus K. Ferst
On 27/04/2021 14:16, Luis Pires wrote: From: Richard Henderson These are all connected by macros in the legacy decoding. Signed-off-by: Richard Henderson Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode | 37 target/ppc/translate.c | 13

  1   2   3   4   >