Re: [PATCH v1 05/24] vfio-user: add device IO ops vector

2022-12-12 Thread Cédric Le Goater
On 11/9/22 00:13, John Johnson wrote: Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson I would keep the short rw handling for a subsequent patch to make sure the changes do not introduce any functional chang

Re: [PATCH-for-8.0 1/7] hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 01:13, Bernhard Beschow wrote: Am 9. Dezember 2022 15:15:27 UTC schrieb "Philippe Mathieu-Daudé" : From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/Kconfig | 6 ++ hw/mips/meson.build | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)

Re: [PATCH v3] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 08:56, Thomas Huth wrote: The only reason for this code being target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). Since these apic functions are rather simple, we can easily move them into a new, separate file (apic_irqcount.c) which will always be compiled and

Re: [PATCH 06/30] meson: tweak hardening options for Windows

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:36 PM Paolo Bonzini wrote: > > -Wl,--dynamicbase has been enabled for DLLs upstream for roughly 2 > years (https://sourceware.org/bugzilla/show_bug.cgi?id=19011), and > also by some distros including Debian for 6 years even > (https://bugs.debian.org/cgi-bin/bugreport.

Re: [PATCH 07/30] meson: support meson 0.64 -Doptimization=plain

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:31 PM Paolo Bonzini wrote: > > In Meson 0.64, the optimization built-in option now accepts the "plain" value, > which will not set any optimization flags. While QEMU does not check the > contents of the option and therefore does not suffer any ill effect > from the ne

Re: [PATCH 09/30] meson: use prefer_static option

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:42 PM Paolo Bonzini wrote: > > The option is new in Meson 0.63 and removes the need to pass "static: > true" to all dependency and find_library invocation. Actually cleaning > up the invocations is left for a separate patch. > > Signed-off-by: Paolo Bonzini Reviewed-by:

Re: [PATCH 10/30] meson: remove static_kwargs

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:31 PM Paolo Bonzini wrote: > > After static_kwargs has been changed to an empty dictionary, it has > no functional effect and can be removed. > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > meson.build | 212 +++

Re: [PATCH 0/3] s390x/pci: rpcit fixes and enhancements

2022-12-12 Thread Thomas Huth
On 28/10/2022 21.47, Matthew Rosato wrote: The following series fixes an issue with guest RPCIT processing discovered during development of [1] as well as proposes a few additional optimizations to the current RPCIT codepath. [1] https://lore.kernel.org/linux-s390/20221019144435.369902-1-schne.

Re: [PATCH 11/30] meson: cleanup dummy-cpus.c rules

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:48 PM Paolo Bonzini wrote: > > Now that qtest is available on all targets including Windows, dummy-cpus.c > is included unconditionally in the build. > > Signed-off-by: Paolo Bonzini (and doesn't have to be target specific) Reviewed-by: Marc-André Lureau > --- >

Re: [PATCH 12/30] modinfo: lookup compile_commands.json by object

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:43 PM Paolo Bonzini wrote: > > With Meson 0.63 having fixed various issues with extract_objects, the > compile_commands.json lookups can be simplified. If the lookup uses > the object file as key, there is no need to use the command line to > distinguish among all entries

Re: [PATCH 06/30] meson: tweak hardening options for Windows

2022-12-12 Thread Paolo Bonzini
On 12/12/22 09:18, Marc-André Lureau wrote: - # Disable ASLR for debug builds to allow debugging with gdb - if get_option('optimization') == '0' -qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase') - endif + qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicba

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-12 Thread Pierre Morel
On 12/9/22 14:32, Thomas Huth wrote: On 08/12/2022 10.44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since the S390_FEAT_CONFIGURATION_TOPOLOGY is already in the CPU model for old QEMU we could not activate it as usual from KVM but n

Re: [PATCH v13 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-12 Thread Pierre Morel
On 12/9/22 14:50, Thomas Huth wrote: On 08/12/2022 10.44, Pierre Morel wrote: We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre Morel --- [...] diff --git a/

Re: [PATCH 13/30] configure: remove backwards-compatibility code

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:28 PM Paolo Bonzini wrote: > > The cmd_line.txt mangling is only needed when rebuilding from very old > trees and is kept mostly as an example of how to extend it. However, > Meson 0.63 introduces a deprecation mechanism for meson_options.txt > that can be used instea

Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-12-12 Thread Cédric Le Goater
On 11/9/22 00:13, John Johnson wrote: New class for vfio-user with its class and instance constructors and destructors, and its pci ops. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/Kconfig | 10 +++ hw/vfio/common.c | 5 ++

Re: [PATCH 15/30] meson: cleanup compiler detection

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:29 PM Paolo Bonzini wrote: > > Detect all compilers at the beginning of meson.build, and store > the available languages in an array. > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > meson.build | 62 ++---

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-12 Thread Thomas Huth
On 12/12/2022 09.51, Pierre Morel wrote: On 12/9/22 14:32, Thomas Huth wrote: On 08/12/2022 10.44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since the S390_FEAT_CONFIGURATION_TOPOLOGY is already in the CPU model for old QEMU we coul

Re: [PATCH 18/30] configure, meson: move --enable-modules to Meson

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:44 PM Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini On Fri, Dec 9, 2022 at 3:39 PM Paolo Bonzini wrote: > > All uses of pkg-config have been moved to Meson. > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > configure

Re: [PATCH 17/30] configure: remove pkg-config functions

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:39 PM Paolo Bonzini wrote: > > All uses of pkg-config have been moved to Meson. > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > configure | 19 +++ > docs/devel/build-system.rst | 4 > 2 files changed, 3

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-12-12 Thread Paolo Bonzini
On 12/9/22 17:53, Paolo Bonzini wrote: On 11/18/22 18:41, Kevin Wolf wrote: In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the parent is already draine

Re: [PATCH v13 4/7] s390x/cpu_topology: CPU topology migration

2022-12-12 Thread Pierre Morel
On 12/9/22 15:56, Cédric Le Goater wrote: On 12/8/22 10:44, Pierre Morel wrote: The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the

Re: [PATCH 03/11] RISC-V: Adding T-Head SYNC instructions

2022-12-12 Thread LIU Zhiwei
On 2022/9/8 15:29, Richard Henderson wrote: On 9/6/22 13:22, Christoph Muellner wrote: +NOP_PRIVCHECK(th_sfence_vmas, REQUIRE_PRIV_MHS) +NOP_PRIVCHECK(th_sync, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_i, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_is, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_s

Re: [RFC PATCH v2 01/22] include: import xen public headers

2022-12-12 Thread Paul Durrant
On 09/12/2022 09:55, David Woodhouse wrote: From: Joao Martins Signed-off-by: Joao Martins [dwmw2: Update to Xen public headers from 4.16.2 release] Signed-off-by: David Woodhouse --- include/standard-headers/xen/arch-x86/cpuid.h | 118 ++ .../xen/arch-x86/xen-x86_32.h |

Re: [RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-12 Thread Paul Durrant
On 09/12/2022 09:55, David Woodhouse wrote: From: David Woodhouse The XEN_EMU option will cover core Xen support in target/, which exists only for x86 with KVM today but could theoretically also be implemented on Arm/Aarch64 and with TCG or other accelerators. It will also cover the support for

Re: [PATCH v13 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-12-12 Thread Pierre Morel
On 12/9/22 16:43, Cédric Le Goater wrote: On 12/8/22 10:44, Pierre Morel wrote: The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- ... +#define S390

Re: [PATCH 03/11] RISC-V: Adding T-Head SYNC instructions

2022-12-12 Thread LIU Zhiwei
On 2022/9/8 15:29, Richard Henderson wrote: On 9/6/22 13:22, Christoph Muellner wrote: +NOP_PRIVCHECK(th_sfence_vmas, REQUIRE_PRIV_MHS) +NOP_PRIVCHECK(th_sync, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_i, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_is, REQUIRE_PRIV_MHSU) +NOP_PRIVCHECK(th_sync_s

Re: [PATCH v1 03/24] vfio-user: add container IO ops vector

2022-12-12 Thread Philippe Mathieu-Daudé
On 9/12/22 17:10, Cédric Le Goater wrote: Hello John, On 11/9/22 00:13, John Johnson wrote: Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson ---   hw/vfio/common.c  | 126

Re: [PATCH v1 00/24] vfio-user client

2022-12-12 Thread Philippe Mathieu-Daudé
Cc'ing Mark & Edgar. On 9/11/22 00:13, John Johnson wrote: Hello, This is the 6th revision of the vfio-user client implementation. It is the first patch series (the previous revisions were RFCs) First of all, thank you for your time reviewing the RFC versions. The vfio-user framework consists

[Bug 1523246] Re: Virtio-blk does not support TRIM

2022-12-12 Thread mohammadreza nasrabadi
On which version of qemu the discard option is supported? I have emulated a VM with below qemu options related to disk type: -drive file=disk.img,if=none,id=disk0,l2-cache- size=8M,format=qcow2,discard=on,detect-zeroes=unmap,aio=io_uring -device virtio-blk-pci,drive=disk0,scsi=off,bootindex=2 th

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Klaus Jensen
On Dec 8 12:39, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > > kernel. The kernel is in it's good

Re: [PATCH v2 11/14] ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c

2022-12-12 Thread Markus Armbruster
Markus Armbruster writes: > This moves these commands from MAINTAINERS section "Human > Monitor (HMP)" to "Graphics". > > Signed-off-by: Markus Armbruster > Reviewed-by: Daniel P. Berrangé > Reviewed-by: Philippe Mathieu-Daudé [...] > diff --git a/ui/ui-hmp-cmds.c b/ui/ui-hmp-cmds.c > new fi

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-12 Thread Pierre Morel
On 12/12/22 10:07, Thomas Huth wrote: On 12/12/2022 09.51, Pierre Morel wrote: On 12/9/22 14:32, Thomas Huth wrote: On 08/12/2022 10.44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since the S390_FEAT_CONFIGURATION_TOPOLOGY is alr

Re: [PATCH 1/1] qemu-iotests/stream-under-throttle: do not shutdown QEMU

2022-12-12 Thread Christian Borntraeger
Am 07.12.22 um 14:14 schrieb Christian Borntraeger: Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390. Signed-off-by: Christian Borntraeger --- tests/qemu-iotests/tests/s

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-12 Thread Pierre Morel
On 12/9/22 15:45, Cédric Le Goater wrote: On 12/8/22 10:44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since the S390_FEAT_CONFIGURATION_TOPOLOGY is already in the CPU model for old QEMU we could not activate it as usual from KVM but

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-12 Thread Thomas Huth
On 12/12/2022 11.10, Pierre Morel wrote: On 12/12/22 10:07, Thomas Huth wrote: On 12/12/2022 09.51, Pierre Morel wrote: On 12/9/22 14:32, Thomas Huth wrote: On 08/12/2022 10.44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since th

[PATCH v4] riscv: Allow user to set the satp mode

2022-12-12 Thread Alexandre Ghiti
RISC-V specifies multiple sizes for addressable memory and Linux probes for the machine's support at startup via the satp CSR register (done in csr.c:validate_vm). As per the specification, sv64 must support sv57, which in turn must support sv48...etc. So we can restrict machine support by simply

Re: [PATCH] include: Don't include qemu/osdep.h

2022-12-12 Thread Bin Meng
On Mon, Dec 12, 2022 at 3:05 PM Markus Armbruster wrote: > > docs/devel/style.rst mandates: > > The "qemu/osdep.h" header contains preprocessor macros that affect > the behavior of core system headers like . It must be > the first include so that core system headers included by extern

Re: [PATCH 2/5] include/hw/cxl: Include hw/cxl/*.h where needed

2022-12-12 Thread Jonathan Cameron via
On Fri, 9 Dec 2022 14:47:59 +0100 Markus Armbruster wrote: > hw/cxl/cxl_component.h needs CDATObject from hw/cxl/cxl_cdat.h. > > hw/cxl/cxl_device.h needs CXLComponentState from > hw/cxl/cxl_component.h. > > Signed-off-by: Markus Armbruster Acked-by: Jonathan Cameron Thanks, > --- > incl

Re: [PATCH 3/5] hw/acpi/Kconfig: Add missing dependencies to ACPI_ICH9

2022-12-12 Thread Philippe Mathieu-Daudé
On 8/12/22 00:12, Bernhard Beschow wrote: ich9_lpc_realize() uses apm_init() and ich9_smbus_realize() uses pm_smbus_init(), so both APM and ACPI_SMBUS are provided by the device models managed by ACPI_ICH9. Signed-off-by: Bernhard Beschow --- hw/acpi/Kconfig | 2 ++ hw/i386/Kconfig | 1 - h

Re: [PATCH v2 1/5] qemu-img.c: Move IO_BUF_SIZE to the top of the file

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: This macro is used by various commands (compare, convert, rebase) but it is defined somewhere in the middle of the file. I'm going to use it in the new checksum command so lets clean up a bit before that. --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(

[Bug 1523246] Re: Virtio-blk does not support TRIM

2022-12-12 Thread Thomas Huth
$ git tag --contains 37b06f8d46fe602e630e4 | grep ^v | sort | head -n1 v4.0.0 How did you check the size of the file? It might appear bigger than it is due to sparse blocks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bug

Re: [PATCH 4/5] hw/isa/Kconfig: Add missing dependency to VT82C686

2022-12-12 Thread Philippe Mathieu-Daudé
On 8/12/22 00:12, Bernhard Beschow wrote: Both ACPI_PIIX4 (directly) and ACPI_ICH9 (indirectly) require ACPI to be selected. Require it for VT82C686's ACPI controller too for consistency. Signed-off-by: Bernhard Beschow --- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/h

Re: [PATCH 5/5] hw/ppc/Kconfig: Remove unused dependencies from PEGASOS2

2022-12-12 Thread Philippe Mathieu-Daudé
On 8/12/22 00:12, Bernhard Beschow wrote: Removes the following dependencies from ppc-softmmu: - CONFIG_ACPI_CPU_HOTPLUG - CONFIG_ACPI_CXL - CONFIG_ACPI_HMAT - CONFIG_ACPI_MEMORY_HOTPLUG - CONFIG_ACPI_NVDIMM - CONFIG_ACPI_PCIHP - CONFIG_ACPI_PIIX4 - CONFIG_ACPI_X86 - CONFIG_MEM_DEVICE Signed-off

Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Extend the test finder to find tests with format (*.out.qcow2) or cache specific (*.out.nocache) out file. This worked before only for the numbered tests. --- tests/qemu-iotests/findtests.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

Re: [PATCH 1/5] include/hw/pci: Clean up superfluous inclusion of pci*/*.h cxl/*.h

2022-12-12 Thread Jonathan Cameron via
On Fri, 9 Dec 2022 14:47:58 +0100 Markus Armbruster wrote: Hi Markus, One comment on the CXL ones. Others CXL related changes all looks fine to me. Thanks for cleaning these up. Jonathan > diff --git a/include/hw/cxl/cxl.h b/include/hw/cxl/cxl.h > index 38e0e271d5..5129557bee 100644 > ---

Re: [PATCH v2 4/5] iotests: Test qemu-img checksum

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Add simple tests computing a checksum for image with all kinds of extents in raw and qcow2 formats. The test can be extended later for other formats, format options (e..g compressed qcow2), protocols (e.g. nbd), and image with a backing chain, but I'm not sur

Re: [PATCH v2 3/5] qemu-img: Add checksum command

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: The checksum command compute a checksum for disk image content using the blkhash library[1]. The blkhash library is not packaged yet, but it is available via copr[2]. Example run: $ ./qemu-img checksum -p fedora-35.qcow2 6e5c00c995056319d52395f8d91

Re: [PATCH v2 5/5] qemu-img: Speed up checksum

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Add coroutine based loop inspired by `qemu-img convert` design. Changes compared to `qemu-img convert`: - State for the entire image is kept in ImgChecksumState - State for single worker coroutine is kept in ImgChecksumworker. - "Writes" are always in-orde

[PATCH-for-8.0] hw/acpi: Rename tco.c -> ich9_tco.c

2022-12-12 Thread Philippe Mathieu-Daudé
tco.c contains the ICH9 implementation of its "total cost of ownership". Rename it accordingly to emphasis this is a part of the ICH9 model. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20221207231205.1106381-1-shen...@gmail.com> "Clean up dependencies of ACPI controllers" ---

Re: [PATCH v4 4/4] scripts: add script to compare compatible properties

2022-12-12 Thread Dr. David Alan Gilbert
* Maksim Davydov (davydov-...@yandex-team.ru) wrote: > This script run QEMU to obtain compat_props of machines and default > values of different types and produce appropriate table. This table > can be used to compare machine types to choose the most suitable > machine. Also this table in json or c

Re: [PATCH 6/5] include/hw/cxl: Break inclusion loop

2022-12-12 Thread Jonathan Cameron via
On Sat, 10 Dec 2022 08:09:06 +0100 Markus Armbruster wrote: > Markus Armbruster writes: > > > hw/cxl/cxl_pci.h and hw/cxl/cxl_cdat.h include each other. Neither > > header actually needs the other one. Drop both #include directives. > > > > Signed-off-by: Markus Armbruster > > --- > > inclu

Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-12-12 Thread John Levon
On Mon, Dec 12, 2022 at 10:01:33AM +0100, Cédric Le Goater wrote: > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > > index 80b03a2..dc19869 100644 > > --- a/hw/vfio/pci.c > > +++ b/hw/vfio/pci.c > > @@ -19,6 +19,7 @@ > >*/ > > #include "qemu/osdep.h" > > +#include CONFIG_DEVICES > > #inclu

Re: [PATCH v2 2/5] target/riscv: Update VS timer whenever htimedelta changes

2022-12-12 Thread Anup Patel
On Mon, Dec 12, 2022 at 11:23 AM Alistair Francis wrote: > > On Thu, Dec 8, 2022 at 6:41 PM Anup Patel wrote: > > > > On Thu, Dec 8, 2022 at 9:00 AM Alistair Francis > > wrote: > > > > > > On Tue, Nov 8, 2022 at 11:07 PM Anup Patel > > > wrote: > > > > > > > > The htimedelta[h] CSR has impact

[PATCH v3 2/4] hw/nvme: rename shadow doorbell related trace events

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Rename the trace events related to writing the event index and reading the doorbell value to make it more clear that the event is associated with an actual update (write or read respectively). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.

[PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq eventidx fixes the issue. Fixes: 3f7fe8de3d4

[PATCH v3 1/4] hw/nvme: use QOM accessors

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Replace various ->parent_obj use with the equivalent QOM accessors. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 89 +++--- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/hw

[PATCH v3 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 12

[PATCH v3 0/4] hw/nvme: fix broken shadow doorbells on some platforms

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Guenter reports that hw/nvme is broken on riscv64[1] and big endian platforms[2]. This is a regression since 7.1, so this does not warrent an rc5 for 7.2. I'm sure Guenter can carry this patch in his tree, and maybe we can get this out in a stable release. On riscv, the issue

Re: [PATCH 1/2] include/hw/virtio: Break inclusion loop

2022-12-12 Thread Stefano Garzarella
On Sat, Dec 10, 2022 at 02:39:14PM +0100, Markus Armbruster wrote: hw/virtio/virtio.h and hw/virtio/vhost.h include each other. The former doesn't actually need the latter, so drop that inclusion to break the loop. Signed-off-by: Markus Armbruster --- include/hw/virtio/virtio.h | 1 - hw/virtio

Re: [PATCH v3 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:32, Klaus Jensen wrote: From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jense

Re: [PATCH] s390x/pci: reset ISM passthrough devices on shutdown and system reset

2022-12-12 Thread Thomas Huth
On 09/12/2022 20.57, Matthew Rosato wrote: ISM device firmware stores unique state information that can can cause a wholesale unmap of the associated IOMMU (e.g. when we get a termination signal for QEMU) to trigger firmware errors because firmware believes we are attempting to invalidate entries

Re: [PATCH v1 04/24] vfio-user: add region cache

2022-12-12 Thread Philippe Mathieu-Daudé
On 9/11/22 00:13, John Johnson wrote: cache VFIO_DEVICE_GET_REGION_INFO results to reduce memory alloc/free cycles and as prep work for vfio-user Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/ccw.c | 5 - hw/v

Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:03, John Levon wrote: On Mon, Dec 12, 2022 at 10:01:33AM +0100, Cédric Le Goater wrote: diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 80b03a2..dc19869 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include CONFIG_DEVICES

Re: [PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:32, Klaus Jensen wrote: From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq even

Re: [PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
On Dec 12 12:37, Philippe Mathieu-Daudé wrote: > On 12/12/22 12:32, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Prior to reading the shadow doorbell cq head, we have to update the > > eventidx. Otherwise, we risk that the driver will skip an mmio doorbell > > write. This happens on riscv64

[PATCH v4 0/4] hw/nvme: fix broken shadow doorbells on some platforms

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Guenter reports that hw/nvme is broken on riscv64[1] and big endian platforms[2]. This is a regression since 7.1, so this does not warrent an rc5 for 7.2. I'm sure Guenter can carry this patch in his tree, and maybe we can get this out in a stable release. On riscv, the issue

[PATCH v4 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq eventidx fixes the issue. Fixes: 3f7fe8de3d4

[PATCH v4 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 19 +

Re: [PATCH] tests/qtest/libqos/e1000e: Remove "other" interrupts

2022-12-12 Thread Thomas Huth
On 10/11/2022 12.40, Akihiko Odaki wrote: The "other" kind of interrupts are not used in the tests. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/e1000e.h | 1 - tests/qtest/libqos/e1000e.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/qtest/libqos/e1000e.h b/tests/qtest/

[PATCH v4 1/4] hw/nvme: use QOM accessors

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Replace various ->parent_obj use with the equivalent QOM accessors. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 89 +++--- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/hw

Re: [PATCH] tests/qtest/e1000e-test: De-duplicate constants

2022-12-12 Thread Thomas Huth
On 10/11/2022 12.44, Akihiko Odaki wrote: De-duplicate constants found in e1000e_send_verify() to avoid mismatch and improve readability. Signed-off-by: Akihiko Odaki --- tests/qtest/e1000e-test.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) Thanks, I added e1

Re: [PATCH] tests/qtest/libqos/e1000e: Correctly group register accesses

2022-12-12 Thread Thomas Huth
On 10/11/2022 12.45, Akihiko Odaki wrote: Add a newline after E1000_TCTL write and make it clear that E1000_TCTL write is what enabling transmit. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/e1000e.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/libqos/e1000e.c b/tes

[PATCH v4 2/4] hw/nvme: rename shadow doorbell related trace events

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Rename the trace events related to writing the event index and reading the doorbell value to make it more clear that the event is associated with an actual update (write or read respectively). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.

Re: [PATCH 20/30] meson: prepare move of QEMU_CFLAGS to meson

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:34 PM Paolo Bonzini wrote: > > Clean up the handling of compiler flags in meson.build, splitting > the general flags that should be included in subprojects as well, > from warning flags that only apply to QEMU itself. The two were > mixed in both configure tests and meson

Re: CVMSEG Emulation

2022-12-12 Thread Peter Maydell
On Fri, 9 Dec 2022 at 21:03, Jiaxun Yang wrote: > > > > > 2022年12月9日 17:44,Christopher Wrogg 写道: > > > > I tried both. > > > > Option 1 > > What I did: > > #undef TARGET_VIRT_ADDR_SPACE_BITS and #define > > TARGET_VIRT_ADDR_SPACE_BITS 64 > > The Result: > > perror reports

Re: [PATCH v2 4/4] tests/qtest: Enable qtest build on Windows

2022-12-12 Thread Thomas Huth
On 25/11/2022 12.41, Bin Meng wrote: From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- (no changes since v1) tests/qtest/meson.build | 6 -- 1

Re: [PATCH 21/30] build: move sanitizer tests to meson

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:42 PM Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > --- > configure | 151 - > docs/devel/build-system.rst| 4 - > meson.build| 63 +- > meson_options.txt

Re: [PATCH 23/30] build: move coroutine backend selection to meson

2022-12-12 Thread Marc-André Lureau
On Fri, Dec 9, 2022 at 3:37 PM Paolo Bonzini wrote: > > To simplify the code, rename coroutine-win32.c to match the option > passed to configure. > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > configure | 62 --- > m

Re: [PATCH v2 0/2] qga: improve "syslog" domain logging

2022-12-12 Thread Andrey Drobyshev
On 11/29/22 19:38, Andrey Drobyshev wrote: > These patches extend QGA logging interface, primarily under Windows > guests. They enable QGA to write to Windows event log, much like > syslog() on *nix. In addition we get rid of hardcoded log level used by > ga_log(). > > v2: > * Close event_log ha

Re: [PATCH 24/30] build: move stack protector flag selection to meson

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:42 PM Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau > --- > configure | 44 ++- > meson.build | 28 +- > meson_options.txt

Re: [PATCH] FreeBSD: Upgrade to 12.4 release

2022-12-12 Thread Thomas Huth
On 08/12/2022 07.52, Brad Smith wrote: FreeBSD: Upgrade to 12.4 release Signed-off-by: Brad Smith --- .gitlab-ci.d/cirrus.yml | 2 +- tests/vm/freebsd| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Thanks, queued to my testing-next branch: https://gitlab.com/thuth/qem

Re: [PATCH v2 0/2] qga: improve "syslog" domain logging

2022-12-12 Thread Konstantin Kostiuk
Currently, there is a code freeze in QEMU for release 7.2. I will merge this after it https://wiki.qemu.org/Planning/7.2 Best Regards, Konstantin Kostiuk. On Mon, Dec 12, 2022 at 2:17 PM Andrey Drobyshev < andrey.drobys...@virtuozzo.com> wrote: > On 11/29/22 19:38, Andrey Drobyshev wrote: > > T

Re: [PATCH] tests/qtest/vhost-user-blk-test: don't abort all qtests on missing envar

2022-12-12 Thread Thomas Huth
On 25/11/2022 16.58, Christian Schoenebeck wrote: This test requires environment variable QTEST_QEMU_STORAGE_DAEMON_BINARY to be defined for running. If not, it would immediately abort all qtests and prevent other, unrelated tests from running. To fix that, just skip vhost-user-blk-test instead

Re: [RFC PATCH v2 03/22] i386/xen: Add xen-version machine property and init KVM Xen support

2022-12-12 Thread Paul Durrant
On 09/12/2022 09:55, David Woodhouse wrote: From: David Woodhouse This is a machine property for two main reasons. One is that it allows us to set it in default_machine_opts for the xenfv platform when not running on actual Xen. The other is that theoretically we *could* do this with TCG too; w

Re: [PATCH v4 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:44, Klaus Jensen wrote: From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jense

Re: [PATCH 25/30] build: move warning flag selection to meson

2022-12-12 Thread Marc-André Lureau
Hi On Fri, Dec 9, 2022 at 3:48 PM Paolo Bonzini wrote: > > Meson already knows to test with the positive form of the flag, which > simplifies the test. Warnings are now tested explicitly for the C++ > compiler, instead of hardcoding those that are only available for > the C language. > > At this

[PATCH 03/15] block: Pull polling out of bdrv_parent_drained_begin_single()

2022-12-12 Thread Paolo Bonzini
Only one caller of bdrv_parent_drained_begin_single() passes poll=true; move the polling to that one caller. While this requires exposing bdrv_parent_drained_poll_single to outside block/io.c, this is not a big deal because the bdrv_parent_drained_*_single functions are really internal between blo

[PATCH 06/15] tests/qemu-iotests/030: test_stream_parallel should use auto_finalize=False

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito First, use run_job() instead of the current logic to run the stream job. Then, use auto_finalize=False to be sure that the job is not automatically deleted once it is done. In this way, if the job finishes before we want, it is not finalized yet so the other comm

[PATCH 05/15] tests/unit/test-bdrv-drain.c: graph setup functions can't run in coroutines

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito Graph initialization functions like blk_new(), bdrv_new() and so on should not run in a coroutine. In fact, they might invoke a drain (for example blk_insert_bs eventually calls bdrv_replace_child_noperm) that in turn can invoke callbacks like bdrv_do_drained_begi

[PATCH 09/15] block-backend: make global properties write-once

2022-12-12 Thread Paolo Bonzini
The three global properties allow_aio_context_change, disable_request_queuing and allow_write_before_eof are always set for the whole life of a BlockBackend. Make this clear by removing the possibility of clearing them, and by marking the corresponding function GLOBAL_STATE_CODE(). Signed-off-by:

[PATCH 13/15] block: second argument of bdrv_do_drained_end is always NULL

2022-12-12 Thread Paolo Bonzini
Remove it and unify the function with bdrv_drained_end. Signed-off-by: Paolo Bonzini --- block/io.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/block/io.c b/block/io.c index 695c8f3f5faa..c2962adf8d2d 100644 --- a/block/io.c +++ b/block/io.c @@ -69,

[PATCH 10/15] block-backend: always wait for drain before starting operation

2022-12-12 Thread Paolo Bonzini
All I/O operations call blk_wait_while_drained() immediately after blk_inc_in_flight(), except for blk_abort_aio_request() where it does not hurt to add such a call. Merge the two functions into one, and add a note about a disturbing lack of thread-safety that will be fixed shortly. While at it,

[PATCH 02/15] Revert "block: Don't poll in bdrv_replace_child_noperm()"

2022-12-12 Thread Paolo Bonzini
This reverts commit a4e5c80a45b22359cf9c187f0df4f8544812c55c. Signed-off-by: Paolo Bonzini --- block.c | 103 +-- block/io.c | 2 +- include/block/block-io.h | 8 --- tests/unit/test-bdrv-drain.c | 10 4 files c

[PATCH 00/12] More cleanups and fixes for drain

2022-12-12 Thread Paolo Bonzini
There are a few more lines of code that can be removed around draining code, but especially the logic can be simplified by removing unnecessary parameters. Due to the failure of the block-next branch, the first three patches drop patches 14+15 of Kevin's drain cleanup series, and then redo patch 1

[PATCH 11/15] block-backend: make queued_requests thread-safe

2022-12-12 Thread Paolo Bonzini
Protect quiesce_counter and queued_requests with a QemuMutex, so that they are protected from concurrent access in the main thread (for example blk_root_drained_end() reached from bdrv_drain_all()) and in the iothread (where any I/O operation will call blk_inc_in_flight()). Signed-off-by: Paolo Bo

[PATCH 14/15] block: second argument of bdrv_do_drained_begin and bdrv_drain_poll is always NULL

2022-12-12 Thread Paolo Bonzini
Remove it from the functions, from callers/callees such as bdrv_do_drained_begin_quiesce() and bdrv_drain_poll(), and from bdrv_co_yield_to_drain() and BdrvCoDrainData. Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block/io.c | 49

[PATCH 04/15] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito This test uses a callback of an I/O function (blk_aio_preadv) to modify the graph, using bdrv_attach_child. This is simply not allowed anymore. I/O cannot change the graph. Before "block/io.c: make bdrv_do_drained_begin_quiesce static and introduce bdrv_drained_b

[PATCH 01/15] Revert "block: Remove poll parameter from bdrv_parent_drained_begin_single()"

2022-12-12 Thread Paolo Bonzini
This reverts commit dcc5d4bc2abed4268bf31908193c4369e4c9d005. Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block/io.c | 8 ++-- include/block/block-io.h | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 619

[PATCH 08/15] nbd: a BlockExport always has a BlockBackend

2022-12-12 Thread Paolo Bonzini
exp->common.blk cannot be NULL, nbd_export_delete() is only called from blk_exp_unref() and in turn that can only happen after blk_exp_add() has asserted exp->blk != NULL. Signed-off-by: Paolo Bonzini --- nbd/server.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --g

[Bug 1523246] Re: Virtio-blk does not support TRIM

2022-12-12 Thread mohammadreza nasrabadi
I've checked the size of disk file with ls -alh and du --apparent-size commands I downloaded the 1G size file 5 times to make sure about sparse blocks issue, but the problem still exists -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEM

  1   2   3   >