Re: [PATCH 4/5] hw/nvme: do not auto-generate uuid

2022-04-19 Thread Christoph Hellwig
On Wed, Apr 20, 2022 at 07:51:32AM +0200, Klaus Jensen wrote: > > So unlike the EUI, UUIDs are designed to be autogenerated even if the > > current algorithm is completely broken. We'd just need to persist them. > > Note that NVMe at least in theory requires providing at least on of > > the unique

[PATCH] KVM: HWPoison: Fix memory address&size during remap

2022-04-19 Thread zhenwei pi
qemu exits during reset with log: qemu-system-x86_64: Could not remap addr: 1000@22001000 Currently, after MCE on RAM of a guest, qemu records a ram_addr only, remaps this address with a fixed size(TARGET_PAGE_SIZE) during reset. In the hugetlbfs scenario, mmap(addr...) needs page_size aligned add

Re: [RFC PATCH] python: add qmp-send program to send raw qmp commands to qemu

2022-04-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Apr 05, 2022 at 02:45:14PM +0200, Damien Hedde wrote: >> >> >> On 4/5/22 07:41, Markus Armbruster wrote: >> > Daniel P. Berrangé writes: >> > >> > > On Wed, Mar 16, 2022 at 10:54:55AM +0100, Damien Hedde wrote: >> > > > It takes an input file containing ra

[PATCH v4 6/6] hw/riscv: Enable TPM backends

2022-04-19 Thread Alistair Francis
From: Alistair Francis Imply the TPM sysbus devices. This allows users to add TPM devices to the RISC-V virt board. This was tested by first creating an emulated TPM device: swtpm socket --tpm2 -t -d --tpmstate dir=/tmp/tpm \ --ctrl type=unixio,path=swtpm-sock Then launching QEMU w

[PATCH v4 2/6] hw/core: Move the ARM sysbus-fdt to core

2022-04-19 Thread Alistair Francis
From: Alistair Francis The ARM virt machine currently uses sysbus-fdt to create device tree entries for dynamically created MMIO devices. The RISC-V virt machine can also benefit from this, so move the code to the core directory. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias

[PATCH v4 5/6] hw/riscv: virt: Add device plug support

2022-04-19 Thread Alistair Francis
From: Alistair Francis Add support for plugging in devices, this was tested with the TPM device. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- hw/riscv/virt.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/riscv/virt.c b/hw/ris

[PATCH v4 0/6] hw/riscv: Add TPM support to the virt board

2022-04-19 Thread Alistair Francis
From: Alistair Francis This series adds support for connecting TPM devices to the RISC-V virt board. This is similar to how it works for the ARM virt board. This was tested by first creating an emulated TPM device: swtpm socket --tpm2 -t -d --tpmstate dir=/tmp/tpm \ --ctrl type=unix

[PATCH v4 3/6] hw/riscv: virt: Create a platform bus

2022-04-19 Thread Alistair Francis
From: Alistair Francis Create a platform bus to allow dynamic devices to be connected. This is based on the ARM implementation. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- include/hw/riscv/virt.h | 7 - hw/riscv/virt.c | 68 +

Re: [PATCH 2/5] hw/nvme: always set eui64

2022-04-19 Thread Klaus Jensen
On Apr 20 07:48, Klaus Jensen wrote: > On Apr 20 07:30, Christoph Hellwig wrote: > > Also EUI64 values are based on a OUI, while NVME_EUI64_DEFAULT seems > > to have the OUI values cleared to all zero as far as I can tell. > > > > It really should be a u8 array, yes, but won't the integer approac

Re: [PATCH 4/5] hw/nvme: do not auto-generate uuid

2022-04-19 Thread Klaus Jensen
On Apr 20 07:33, Christoph Hellwig wrote: > On Tue, Apr 19, 2022 at 02:10:38PM +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Do not default to generate an UUID for namespaces if it is not > > explicitly specified. > > > > This is a technically a breaking change in behavior. However,

[PATCH v4 4/6] hw/riscv: virt: Add support for generating platform FDT entries

2022-04-19 Thread Alistair Francis
From: Alistair Francis Similar to the ARM virt machine add support for adding device tree entries for dynamically created devices. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- hw/riscv/virt.c | 25 + 1 file changed, 25 insertions(+) diff --git a/

Re: [PATCH 2/5] hw/nvme: always set eui64

2022-04-19 Thread Klaus Jensen
On Apr 20 07:30, Christoph Hellwig wrote: > On Tue, Apr 19, 2022 at 02:10:36PM +0200, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Unconditionally set an EUI64 for namespaces. The nvme-ns device defaults > > to auto-generating a persistent EUI64 if not specified, but for single > > namespac

[PATCH v4 1/6] hw/riscv: virt: Add a machine done notifier

2022-04-19 Thread Alistair Francis
From: Alistair Francis Move the binary and device tree loading code to the machine done notifier. This allows us to prepare for editing the device tree as part of the notifier. This is based on similar code in the ARM virt machine. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias

Re: [PATCH 3/5] hw/nvme: do not report null uuid

2022-04-19 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 4/5] hw/nvme: do not auto-generate uuid

2022-04-19 Thread Christoph Hellwig
On Tue, Apr 19, 2022 at 02:10:38PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Do not default to generate an UUID for namespaces if it is not > explicitly specified. > > This is a technically a breaking change in behavior. However, since the > UUID changes on every VM launch, it is not s

Re: [PATCH 2/5] hw/nvme: always set eui64

2022-04-19 Thread Christoph Hellwig
On Tue, Apr 19, 2022 at 02:10:36PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Unconditionally set an EUI64 for namespaces. The nvme-ns device defaults > to auto-generating a persistent EUI64 if not specified, but for single > namespace setups (-device nvme,drive=...), this does not happe

Re: [PATCH 1/5] hw/nvme: enforce common serial per subsystem

2022-04-19 Thread Christoph Hellwig
On Tue, Apr 19, 2022 at 02:10:35PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The Identify Controller Serial Number (SN) is the serial number for the > NVM subsystem and must be the same across all controller in the NVM > subsystem. > > Enforce this. > > Signed-off-by: Klaus Jensen L

Re: [PATCH v5 4/4] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-04-19 Thread Gavin Shan
Hi Igor, On 4/19/22 4:54 PM, Igor Mammedov wrote: On Thu, 14 Apr 2022 08:33:29 +0800 Gavin Shan wrote: On 4/13/22 9:52 PM, Igor Mammedov wrote: On Sun, 3 Apr 2022 22:59:53 +0800 Gavin Shan wrote: When the PPTT table is built, the CPU topology is re-calculated, but it's unecessary becau

Re: [RESEND][PATCH 0/2] acpi/nvdimm: support NVDIMM _LS{I,R,W} methods

2022-04-19 Thread Robert Hoo
Ping... On Tue, 2022-04-12 at 14:57 +0800, Robert Hoo wrote: > The original NVDIMM _DSM functions (index 4~6) for label operations > have > been deprecated by new ACPI methods _LS{I,R,W}[1][2]. > > Patch 1 implements the new _LS{I,R,W} methods, on top of old _DSM > implementation. > > Patch 2 fi

Re: [RFC PATCH] hw/i386/e820: remove legacy reserved entries for e820

2022-04-19 Thread Ani Sinha
On Thu, Mar 10, 2022 at 10:12 PM Igor Mammedov wrote: > > On Thu, 10 Mar 2022 11:51:37 +0530 > Ani Sinha wrote: > > > On Mon, Feb 28, 2022 at 8:56 PM Ani Sinha wrote: > > > > > > e820 reserved entries were used before the dynamic entries with fw config > > > files > > > were intoduced into qemu

[PATCH] hw/i386/e820: remove legacy reserved entries for e820

2022-04-19 Thread Ani Sinha
e820 reserved entries were used before the dynamic entries with fw config files were intoduced. Please see the following change: 7d67110f2d9a6("pc: add etc/e820 fw_cfg file") Identical support was introduced into seabios as well with the following commit: ce39bd4031820 ("Add support for etc/e820 f

Re: [PULL for-7.1 00/53] Misc pull request for QEMU 7.1

2022-04-19 Thread Richard Henderson
On 4/18/22 22:50, Paolo Bonzini wrote: The following changes since commit f53faa70bb63cc0c8e2fd0752b7ad2c8a79616ba: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-04-05 16:14:28 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qem

Re: [PATCH v5 03/13] mm/shmem: Support memfile_notifier

2022-04-19 Thread Chao Peng
On Tue, Apr 19, 2022 at 03:40:09PM -0700, Vishal Annapurve wrote: > On Thu, Mar 10, 2022 at 6:10 AM Chao Peng wrote: > > > > From: "Kirill A. Shutemov" > > > > It maintains a memfile_notifier list in shmem_inode_info structure and > > implements memfile_pfn_ops callbacks defined by memfile_notifi

Re: [PATCH v5 11/13] KVM: Zap existing KVM mappings when pages changed in the private fd

2022-04-19 Thread Chao Peng
On Tue, Apr 19, 2022 at 03:43:56PM -0700, Vishal Annapurve wrote: > On Thu, Mar 10, 2022 at 6:11 AM Chao Peng wrote: > > > > KVM gets notified when memory pages changed in the memory backing store. > > When userspace allocates the memory with fallocate() or frees memory > > with fallocate(FALLOC_F

[PATCH v2 2/2] qga: Introduce disk smart

2022-04-19 Thread zhenwei pi
After assigning a NVMe/SCSI controller to guest by VFIO, we lose everything on the host side. A guest uses these devices exclusively, we usually don't care the actions on these devices. But there is a low probability that hitting physical hardware warning, we need a chance to get the basic smart lo

[PATCH v2 1/2] qga: Introduce NVMe disk bus type

2022-04-19 Thread zhenwei pi
Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU, a NVMe disk get exposed in guest side. Support NVMe disk bus type and implement posix version. Test PCI passthrough case: ~#virsh qemu-agent-command buster '{"execute":"guest-get-disks"}' | jq ... { "name": "/dev/nvm

[PATCH v2 0/2] qga: Support NVMe disk type and SMART

2022-04-19 Thread zhenwei pi
v1 -> v2: - Update version from 7.0 to 7.1. v1: - Introduce NVMe type for command 'guest-get-disks'. - Introduce SMART, and implement NVMe SMART for command 'guest-get-disks'. Zhenwei Pi (2): qga: Introduce NVMe disk bus type qga: Introduce disk smart qga/commands-posix.c | 78 ++

Re: [PATCH v5 1/4] qapi/machine.json: Add cluster-id

2022-04-19 Thread Gavin Shan
Hi Daniel, On 4/19/22 11:59 PM, Daniel P. Berrangé wrote: On Thu, Apr 14, 2022 at 10:27:25AM +0800, wangyanan (Y) wrote: Hi Gavin, Cc: Daniel and Markus On 2022/4/14 8:06, Gavin Shan wrote: Hi Yanan, On 4/13/22 7:49 PM, wangyanan (Y) wrote: On 2022/4/3 22:59, Gavin Shan wrote: This adds cl

Re: [PATCH 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-19 Thread Akihiko Odaki
On 2022/04/19 20:40, Christian Schoenebeck wrote: mknod() on macOS does not support creating regular files, so divert to openat_file() if S_IFREG is passed with mode argument. Furthermore, 'man 2 mknodat' on Linux says: "Zero file type is equivalent to type S_IFREG". Link: https://lore.kernel.o

Re: [RFC 0/3] Introduce a new Qemu machine for RISC-V

2022-04-19 Thread Atish Patra
On Tue, Apr 19, 2022 at 9:51 AM Daniel P. Berrangé wrote: > > On Mon, Apr 11, 2022 at 07:10:06PM -0700, Atish Patra wrote: > > > > The RISC-V virt machine has helped RISC-V software eco system to evolve at a > > rapid pace even in absense of the real hardware. It is definitely > > commendable. >

[PATCH v8 04/17] remote/machine: add vfio-user property

2022-04-19 Thread Jagannathan Raman
Add vfio-user to x-remote machine. It is a boolean, which indicates if the machine supports vfio-user protocol. The machine configures the bus differently vfio-user and multiprocess protocols, so this property informs it on how to configure the bus. This property should be short lived. Once vfio-u

[PATCH v8 12/17] vfio-user: IOMMU support for remote device

2022-04-19 Thread Jagannathan Raman
Assign separate address space for each device in the remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/remote/iommu.h | 40 + hw/remote/iommu.c | 114 ++ hw/rem

[PATCH v8 09/17] vfio-user: find and init PCI device

2022-04-19 Thread Jagannathan Raman
Find the PCI device with specified id. Initialize the device context with the QEMU PCI device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/vfio-user-obj.c | 67 +++

[PATCH v8 01/17] tests/avocado: Specify target VM argument to helper routines

2022-04-19 Thread Jagannathan Raman
Specify target VM for exec_command and exec_command_and_wait_for_pattern routines Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Beraldo Leal Reviewed-by: Stefan Hajnoczi --- tests/avocado/avocad

[PATCH v8 03/17] remote/machine: add HotplugHandler for remote machine

2022-04-19 Thread Jagannathan Raman
Allow hotplugging of PCI(e) devices to remote machine Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/machine.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/remote/machine.c b/hw/rem

Re: [PATCH v5 11/13] KVM: Zap existing KVM mappings when pages changed in the private fd

2022-04-19 Thread Vishal Annapurve
On Thu, Mar 10, 2022 at 6:11 AM Chao Peng wrote: > > KVM gets notified when memory pages changed in the memory backing store. > When userspace allocates the memory with fallocate() or frees memory > with fallocate(FALLOC_FL_PUNCH_HOLE), memory backing store calls into > KVM fallocate/invalidate ca

[ANNOUNCE] QEMU 7.0.0 is now available

2022-04-19 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 7.0.0 release. This release contains 2500+ commits from 225 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at: h

Re: [PATCH v5 03/13] mm/shmem: Support memfile_notifier

2022-04-19 Thread Vishal Annapurve
On Thu, Mar 10, 2022 at 6:10 AM Chao Peng wrote: > > From: "Kirill A. Shutemov" > > It maintains a memfile_notifier list in shmem_inode_info structure and > implements memfile_pfn_ops callbacks defined by memfile_notifier. It > then exposes them to memfile_notifier via > shmem_get_memfile_notifie

[PATCH v8 00/17] vfio-user server in QEMU

2022-04-19 Thread Jagannathan Raman
Hi, This is v8 of the server side changes to enable vfio-user in QEMU. Thank you very much for reviewing the last revision of this series! We've made the following changes in this revision: [PATCH v8 06/17] vfio-user: build library - updated libvfio-user to the latest [PATCH v8 07/17] vfio-u

Re: [PATCH 3/4] device_tree: add qemu_fdt_setprop_strings() helper

2022-04-19 Thread Alistair Francis
On Mon, Apr 18, 2022 at 7:14 AM Ben Dooks wrote: > > Add a helper to set a property from a set of strings > to reduce the following code: > > static const char * const clint_compat[2] = { > "sifive,clint0", "riscv,clint0" > }; > > qemu_fdt_setprop_string_array(fdt, nodename, "c

Re: [PATCH 1/4] device_tree: add qemu_fdt_setprop_reg64 helper

2022-04-19 Thread Alistair Francis
On Mon, Apr 18, 2022 at 7:15 AM Ben Dooks wrote: > > Add a macro qemu_fdt_setprop_reg64() to set the given > node's reg property directly from the memory map entry > to avoid open coding of the following: > > qemu_fdt_setprop_cells(fdt, nodename, "reg", > 0x0, memmap[SIFIVE_U_DEV_OTP].

[PATCH v8 07/17] vfio-user: define vfio-user-server object

2022-04-19 Thread Jagannathan Raman
Define vfio-user object which is remote process server for QEMU. Setup object initialization functions and properties necessary to instantiate the object Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- qapi/qom.json | 20 +++- in

[PATCH v8 02/17] qdev: unplug blocker for devices

2022-04-19 Thread Jagannathan Raman
Add blocker to prevent hot-unplug of devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/qdev-core.h | 29 + hw/core/qdev.c | 24 softmmu/qdev-monitor.c | 4 3 fi

[PATCH v8 06/17] vfio-user: build library

2022-04-19 Thread Jagannathan Raman
add the libvfio-user library as a submodule. build it as a cmake subproject. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- configure | 20 +- meson.build| 44 +++

Re: [PATCH v4 1/3] aspeed/hace: Support HMAC Key Buffer register.

2022-04-19 Thread Cédric Le Goater
On 3/31/22 09:48, Steven Lee wrote: Support HACE28: Hash HMAC Key Buffer Base Address Register. Signed-off-by: Troy Lee Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater Thanks, C. --- hw/misc/aspeed_hace.c | 7 +++ include/hw/misc/aspeed_hace.h | 1 + 2 files chang

[PATCH v8 05/17] configure: require cmake 3.19 or newer

2022-04-19 Thread Jagannathan Raman
cmake needs to accept the compiler flags specified with CMAKE__COMPILER variable. It does so starting with version 3.19 Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- configure | 16 1 file changed, 16 insertions(+) diff --gi

[PATCH v8 08/17] vfio-user: instantiate vfio-user context

2022-04-19 Thread Jagannathan Raman
create a context with the vfio-user library to run a PCI device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/remote/vfio-user-obj.c | 82 +++ 1 file changed, 82 insertions(+) diff --git a/hw/remote/vfi

[PATCH v8 17/17] vfio-user: avocado tests for vfio-user

2022-04-19 Thread Jagannathan Raman
Avocado tests for libvfio-user in QEMU - tests startup, hotplug and migration of the server object Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- MAINTAINERS| 1 + tests/avocado/vfio-user.py | 164

[PATCH v8 15/17] vfio-user: handle device interrupts

2022-04-19 Thread Jagannathan Raman
Forward remote device's interrupts to the guest Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/pci/pci.h | 13 include/hw/remote/vfio-user-obj.h | 6 ++ hw/pci/msi.c | 16 ++-- hw/pci/msix.

[PATCH v8 16/17] vfio-user: handle reset of remote device

2022-04-19 Thread Jagannathan Raman
Adds handler to reset a remote device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/remote/vfio-user-obj.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c inde

[PATCH v8 11/17] vfio-user: handle PCI config space accesses

2022-04-19 Thread Jagannathan Raman
Define and register handlers for PCI config space accesses Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/vfio-user-obj.c | 51 +++ hw/remote/trace-events| 2 ++

[PATCH v8 13/17] vfio-user: handle DMA mappings

2022-04-19 Thread Jagannathan Raman
Define and register callbacks to manage the RAM regions used for device DMA Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/machine.c | 5 hw/remote/vfio-user-obj.c | 55 ++

[PATCH v8 14/17] vfio-user: handle PCI BAR accesses

2022-04-19 Thread Jagannathan Raman
Determine the BARs used by the PCI device and register handlers to manage the access to the same. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/exec/memory.h | 3 + hw/remote/vfio-user-obj.c | 189 +++

[PATCH v8 10/17] vfio-user: run vfio-user context

2022-04-19 Thread Jagannathan Raman
Setup a handler to run vfio-user context. The context is driven by messages to the file descriptor associated with it - get the fd for the context and hook up the handler with it Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Ha

Re: Portable inline asm to get address of TLS variable

2022-04-19 Thread Thomas Rodgers
So, this was my primary objection during the standardization of coroutines for C++20. Red Hat's vote was consistently against adding the feature without library support, but here we are. Lewis Baker (formerly at Facebook) has led most of the work since on defining what that library support might l

Re: [PATCH v5 9/9] s390x/pci: reflect proper maxstbl for groups of interpreted devices

2022-04-19 Thread Pierre Morel
On 4/4/22 20:17, Matthew Rosato wrote: The maximum supported store block length might be different depending on whether the instruction is interpretively executed (firmware-reported maximum) or handled via userspace intercept (host kernel API maximum). Choose the best available value during gr

Re: [PATCH v5 5/9] s390x/pci: enable for load/store intepretation

2022-04-19 Thread Pierre Morel
On 4/4/22 20:17, Matthew Rosato wrote: If the appropriate CPU facilty is available as well as the necessary ZPCI_OP ioctl, then the underlying KVM host will enable load/store intepretation for any guest device without a SHM bit in the guest function handle. For a device that will be using int

Re: [PATCH 09/26] iscsi: add missing coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:43PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/iscsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/block/iscsi.c b/block/iscsi.c > index d707d0b354..b33eeec794 100644 > --- a/bloc

Re: [PATCH 08/26] file-posix: add missing coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:42PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/file-posix.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/block/file-posix.c b/block/file-posix.c > index bfd9b2..cf7b5531c8 1006

Re: [PATCH] Only advertise aio=io_uring if support is actually available

2022-04-19 Thread Eric Blake
On Tue, Apr 19, 2022 at 07:19:31PM +0200, Dirk Müller wrote: > This allows $qemu --help runtime configure checks for detecting > the host support. --help is human-parseable, and thus not stable text. Relying on it for detecting host support is not always ideal, but anything is better than nothing

Re: [PATCH v3 07/12] iotests: rebase qemu_io() on top of qemu_tool()

2022-04-19 Thread Eric Blake
On Mon, Apr 18, 2022 at 05:14:59PM -0400, John Snow wrote: > Rework qemu_io() to be analogous to qemu_img(); a function that requires > a return code of zero by default unless disabled explicitly. > > Tests that use qemu_io(): > 030 040 041 044 055 056 093 124 129 132 136 148 149 151 152 163 165 2

Re: [PATCH v1 25/25] tests/guest-debug: better handle gdb crashes

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: There are a number of GDB's on various distros which fail fairly hard when attempting to talk to a cross-arch guest. The previous attempt to catch this was incorrect as the shell will deliver signals as 128+n. Fix the detection and while we are it improve the

Re: [PATCH v1 23/25] tests/tcg: add missing reference files for float_convs

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: We might as well include a reference file for i386/x86_64. I was going to include s390x as well but it's broken hence I raised: https://gitlab.com/qemu-project/qemu/-/issues/979. Signed-off-by: Alex Bennée --- tests/tcg/i386/float_convs.ref | 748

Re: [PATCH v1 22/25] tests/tcg: add float_convd test

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: This is a simple transliteration of the float_convs test but this time working with doubles. I'm used it to test the handling of vector registers in gdbstub but wasn't able to find a non-ugly way to automate it. Signed-off-by: Alex Bennée --- tests/tcg/mult

Re: [PATCH v1 21/25] tests/tcg: remove duplicate sha512-sse case

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: We already generate the sha512-sse case in the i386 makefile which works for both i386 and x86_64. Signed-off-by: Alex Bennée Fixes: f8a4c6d728 ("tests/tcg: add vectorised sha512 versions") --- tests/tcg/x86_64/Makefile.target | 7 --- 1 file changed,

Re: [PATCH v5 4/9] s390x/pci: add routine to get host function handle from CLP info

2022-04-19 Thread Pierre Morel
On 4/4/22 20:17, Matthew Rosato wrote: In order to interface with the underlying host zPCI device, we need to know it's function handle. Add a routine to grab this from the vfio CLP capabilities chain. Signed-off-by: Matthew Rosato Reviewed-by: Pierre Morel --- hw/s390x/s390-pci-vfi

Re: [PATCH v1 20/25] tests/tcg: fix non-static build

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini If linking with -static fails at configure time, -static should not be used at build time either. Do not include BUILD_STATIC in $config_target_mak. Signed-off-by: Paolo Bonzini Message-Id: <20220401141326.1244422-18-pbonz...@redhat.com

Re: [PATCH v1 19/25] tests/docker: remove SKIP_DOCKER_BUILD

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini It is now unused. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-17-pbonz...@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 12 +--- tests/docker/docker.py| 57 --

Re: [PATCH v1 18/25] tests/tcg: isolate from QEMU's config-host.mak

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Do not include variables for the QEMU's own compiler, as they are not necessarily related to the cross compiler used for tests/tcg. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-16-pbonz...@redhat.com> Signed-off-by: Ale

Re: [PATCH v1 17/25] tests/tcg: invoke Makefile.target directly from QEMU's makefile

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Build the "docker.py cc" invocation directly in tests/tcg/configure.sh, and remove the Makefile.qemu wrapper around Makefile.target. The config-*.mak files now include the actual variables used when building the tests, rather than the CRO

Re: [PATCH v1 16/25] tests/tcg: list test targets in Makefile.prereqs

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Omit the rules altogether for targets that do not have a compiler. Makefile.qemu now is only invoked if the tests are actually built/run. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-14-pbonz...@redhat.com> Signed-off-b

Re: [PATCH v1 14/25] tests/tcg: remove CONFIG_USER_ONLY from config-target.mak

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Just check the target name instead. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-12-pbonz...@redhat.com> Signed-off-by: Alex Bennée --- tests/tcg/Makefile.target | 8 tests/tcg/configure.sh| 12 +++-

Re: [PATCH v1 15/25] tests/tcg: prepare Makefile.prereqs at configure time

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini List the dependencies of the build-tcg-tests-* and run-tcg-tests-* targets in a Makefile fragment, without going through Makefile.prereqs's "parsing" of config-*.mak. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-13-pbon

Re: [PATCH v1 13/25] tests/tcg: remove CONFIG_LINUX_USER from config-target.mak

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Just check the target name instead. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-Id:<20220401141326.1244422-11-pbonz...@redhat.com> Signed-off-by: Alex Bennée --- tests/tcg/configure.sh | 2 --

Re: [PATCH 07/26] block: add missing coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:41PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/block-backend.c | 18 +- > block/io.c| 24 > 2 files changed, 21 insertions(+), 21 deletions(-) > > @@ -1580,8 +1580,8 @@ int blk_prea

Re: [PATCH v1 11/25] tests/docker: do not duplicate rules for hexagon-cross

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini The commands for docker-image-debian-hexagon-cross are the same as those in debian-toolchain-run, just with a nonstandard path to build-toolchain.sh. Reuse the definition by renaming the debian-hexagon-cross.docker.d directory. Signed-off

Re: [PATCH 06/26] blkverify: add missing coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:40PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/blkverify.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/block/blkverify.c b/block/blkverify.c > index e4a37af3b2..020b1ae7b6 100644

Re: [PATCH v1 12/25] tests/tcg: add compiler test variables when using containers

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Even for container-based cross compilation use $(CROSS_CC_HAS_*) variables. This makes the TCG test makefiles oblivious of whether the compiler is invoked through a container or not. Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée M

Re: [PATCH v1 10/25] tests/docker: simplify docker-TEST@IMAGE targets

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini No need to go through the shell when we already have the test and images at the point where the targets are declared. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-8-pbonz...@redhat.com> Signed-off-by: Alex Bennée ---

Re: [PATCH v1 09/25] tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES)

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Now that DOCKER_IMAGES is only defined after DOCKER_VIRTUAL_IMAGES is complete, there is no need to re-filter DOCKER_IMAGES against it. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-7-pbonz...@redhat.com> Signed-off-by:

Re: [PATCH 05/26] blkdebug: add missing coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:39PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/blkdebug.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) Again, might be worth a comment, but adding an annotation seems easier to understand than removing an inco

Re: [PATCH v1 08/25] tests/docker: inline variable definitions or move close to use

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Variables that are defined with ":=" are handled imperatively, so moving them closer to the first use ensures that all the assignments prior to the first use are taken into account. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-04-19 Thread Andrea Bolognani
On Tue, Apr 19, 2022 at 11:12:28AM -0700, Andrea Bolognani wrote: > Dealing with errors and commands that don't have a return value might > require us to have generic CommandResult wrapper after all, but we > should really try as hard as we can to stick to type safe interfaces. On second thought,

Re: [PATCH v1 07/25] tests/docker: remove unnecessary default definitions

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini The definition of DOCKER_IMAGES and DOCKER_TESTS copes already with an empty value of $(IMAGES) and $(TESTS), no need to force them to "%" if undefined. Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-5-pbonz...@redhat.com

Re: [PATCH v1 06/25] tests/docker: remove dead variable

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Message-Id:<20220401141326.1244422-4-pbonz...@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Hen

Re: [PATCH v1 05/25] tests/docker: remove test targets

2022-04-19 Thread Richard Henderson
On 4/19/22 02:10, Alex Bennée wrote: From: Paolo Bonzini Signed-off-by: Paolo Bonzini Message-Id:<20220401141326.1244422-3-pbonz...@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 20 +--- tests/docker/dockerfiles/empty.docker | 8

Re: [PATCH v1 04/25] tests/docker: remove dead code for linux-user containers

2022-04-19 Thread Richard Henderson
On 4/19/22 02:09, Alex Bennée wrote: From: Paolo Bonzini debian-powerpc-user-cross was the only linux-user powered cross builder and it was removed in commit 80394ccf21 ("tests/docker: remove debian-powerpc-user-cross", 2019-09-26). Remove all the infrastructure around it since it is now unused.

Re: [PATCH v1 03/25] docs/devel: drop :hidden: and :includehidden: tags

2022-04-19 Thread Richard Henderson
On 4/19/22 02:09, Alex Bennée wrote: This was confusing and in the case of qtest was hiding the details of the qgraph sub-document in the qtest pages. Signed-off-by: Alex Bennée --- docs/devel/index-api.rst | 1 - docs/devel/index-build.rst | 3 +-- docs/devel/index-internals.rst |

Re: [PATCH v1 02/25] docs/devel: add some notes on the binfmt-image-debian targets

2022-04-19 Thread Richard Henderson
On 4/19/22 02:09, Alex Bennée wrote: We document some of this on the wiki but lets move it into our official developer notes documentation. Signed-off-by: Alex Bennée Cc: Paolo Bonzini --- v2 - fix some trailing ws --- docs/devel/testing.rst | 38 ++ 1

Re: [PATCH 04/26] coroutine: remove incorrect coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:38PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Again, a short summary why it is correct is helpful. > --- > include/qemu/coroutine.h | 2 +- > util/qemu-coroutine.c| 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/inc

Re: [RFC PATCH v1 0/8] qapi: add generator for Golang interface

2022-04-19 Thread Andrea Bolognani
On Sat, Apr 02, 2022 at 12:40:56AM +0200, Victor Toso wrote: > Thanks for taking a look, let me know if you have questions, ideas > or suggestions. Full disclosure: I have only given the actual implementation a very cursory look so far, and I've focused on the generated Go API instead. Overall th

Re: [PATCH 03/26] nbd: remove incorrect coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:37PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > include/block/nbd.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/block/nbd.h b/include/block/nbd.h > index a98eb665da..5c3710fa52 100644 > --- a/include/block

Re: [PATCH 02/26] qcow2: remove incorrect coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:36PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- Again, a sentence on why this is correct would be helpful. > block/qcow2-refcount.c | 4 ++-- > block/qcow2.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH 01/26] block: remove incorrect coroutine_fn annotations

2022-04-19 Thread Eric Blake
On Fri, Apr 15, 2022 at 03:18:35PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Might be nice to document in the commit message why the annotation was incorrect, so someone stumbling across this commit in a bisect but otherwise unfamiliar with the rules of when to annotate doesn't g

[PATCH] Only advertise aio=io_uring if support is actually available

2022-04-19 Thread Dirk Müller
This allows $qemu --help runtime configure checks for detecting the host support. Signed-off-by: Dirk Müller --- block/file-posix.c | 4 qemu-nbd.c | 4 qemu-options.hx| 6 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file

Re: [RFC PATCH] python: add qmp-send program to send raw qmp commands to qemu

2022-04-19 Thread Daniel P . Berrangé
On Tue, Apr 05, 2022 at 02:45:14PM +0200, Damien Hedde wrote: > > > On 4/5/22 07:41, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Wed, Mar 16, 2022 at 10:54:55AM +0100, Damien Hedde wrote: > > > > It takes an input file containing raw qmp commands (concatenated json > >

Re: [PATCH v1 33/43] hw/intc: Add LoongArch ls7a interrupt controller support(PCH-PIC)

2022-04-19 Thread Richard Henderson
On 4/19/22 00:27, yangxiaojuan wrote: On 2022/4/18 下午10:39, Richard Henderson wrote: Is there a good reason that this function is treating hi and lo separately, as opposed to simply doing all of the computation on uint64_t? In the part of linux kernel, pch pic driver use 32 bits for reading

Re: [PATCH v1 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-19 Thread Richard Henderson
On 4/19/22 00:33, yangxiaojuan wrote: On 2022/4/16 上午9:04, Richard Henderson wrote: On 4/15/22 02:40, Xiaojuan Yang wrote: ... +void  helper_csr_update(CPULoongArchState *env, target_ulong new_val, +    target_ulong csr_offset) +{ +    uint64_t *csr = (void *)env + csr_off

Re: [PATCH 1/2] python/machine.py: upgrade vm.command() method

2022-04-19 Thread John Snow
On Tue, Apr 19, 2022, 12:42 PM Daniel P. Berrangé wrote: > On Fri, Apr 08, 2022 at 08:02:13PM +0300, Vladimir Sementsov-Ogievskiy > wrote: > > The method is not popular, we prefer use vm.qmp() and then check > > success by hand.. But that's not optimal. To simplify movement to > > vm.command() su

Re: adding 'official' way to dump SEV VMSA

2022-04-19 Thread Daniel P . Berrangé
On Tue, Apr 19, 2022 at 09:33:21AM -0400, Cole Robinson wrote: > On 4/14/22 4:25 AM, Dr. David Alan Gilbert wrote: > > * Dov Murik (dovmu...@linux.ibm.com) wrote: > >> I plan to add SEV-ES and SEV measurements calculation to this > >> library/program as well. > > > > Everyone seems to be writing

  1   2   3   >