[PATCH v8] riscv: Add support for the Zfa extension

2023-07-10 Thread Christoph Muellner
From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point instructions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) * fround/froundmx (round to integer) * fcvtmod.w.d (M

Re: [PATCH v7] riscv: Add support for the Zfa extension

2023-07-10 Thread Christoph Müllner
On Mon, Jul 10, 2023 at 2:58 AM Alistair Francis wrote: > > On Mon, Jul 3, 2023 at 4:27 PM Christoph Muellner > wrote: > > > > From: Christoph Müllner > > > > This patch introduces the RISC-V Zfa extension, which introduces > > additional floating-point instructions: > > * fli (load-immediate) w

Re: [PATCH 1/1] hw/arm/sbsa-ref: set 'slots' property of xhci

2023-07-10 Thread Richard Henderson
On 7/10/23 07:37, Yuquan Wang wrote: This extends the slots of xhci to 64, since the default xhci_sysbus just supports one slot. Signed-off-by: Wang Yuquan Signed-off-by: Chen Baozi --- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+) hw/usb/hcd-xhci-nec.c:DEFINE_PROP_UINT32("

Re: [PATCH] tests/tcg/s390x: Fix test-svc with clang

2023-07-10 Thread Thomas Huth
On 07/07/2023 17.42, Ilya Leoshkevich wrote: clang does not support expressions involving symbols in instructions like lghi yet, so building hello-s390x-asm.S with it fails. Move the expression to the literal pool and load it from there. Reported-by: Thomas Huth Fixes: be4a4cb42961 ("tests/tcg

Re: [PATCH 1/1] hw/arm/sbsa-ref: set 'slots' property of xhci

2023-07-10 Thread Marcin Juszkiewicz
W dniu 10.07.2023 o 09:28, Richard Henderson pisze: hw/usb/hcd-xhci-nec.c:    DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), hw/usb/hcd-xhci-sysbus.c:    DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS), The default is XCHI_MAXSLOTS, not 1.  So I c

Re: [PATCH 1/1] hw/arm/sbsa-ref: set 'slots' property of xhci

2023-07-10 Thread Marcin Juszkiewicz
W dniu 10.07.2023 o 08:37, Yuquan Wang pisze: This extends the slots of xhci to 64, since the default xhci_sysbus just supports one slot. Signed-off-by: Wang Yuquan Signed-off-by: Chen Baozi --- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm

Re: [RFC PATCH 6/6] vdpa: remove net cvq migration blocker

2023-07-10 Thread Eugenio Perez Martin
On Mon, Jul 10, 2023 at 5:54 AM Jason Wang wrote: > > On Fri, Jul 7, 2023 at 3:12 AM Eugenio Pérez wrote: > > > > Now that we have add migration blockers if the device does not support > > all the needed features, remove the general blocker applied to all net > > devices with CVQ. > > > > Signed-

Re: [PATCH 1/1] linux-headers: update to v6.5-rc1

2023-07-10 Thread Thomas Huth
On 09/07/2023 23.23, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- Looks fine to me (I quickly double-checked that this is the correct update to v6.5-rc1). Reviewed-by: Thomas Huth

[PATCH v4 3/4] QGA VSS: Print error in err_set

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/requester.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index e85b9bc633..f3eafacfc1 100644 --- a/qga/vss-win32/requ

[PATCH v4 2/4] QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/install.cpp | 12 ++-- qga/vss-win32/requester.cpp | 9 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index ff93b0

[PATCH v4 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/meson.build | 2 +- qga/vss-win32/vss-debug.cpp | 38 + qga/vss-win32/vss-debug.h | 25 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 qga/vss-win32/vss-debu

[PATCH v4 4/4] QGA VSS: Add log in functions begin/end

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/install.cpp | 33 + qga/vss-win32/provider.cpp | 3 +++ qga/vss-win32/requester.cpp | 34 ++ 3 files changed, 70 insertions(+) diff --git a/qga/vss-win32/install.cpp b/qga/vss-

[PATCH v4 0/4] QGA VSS Logging

2023-07-10 Thread Konstantin Kostiuk
Print all VSS error and trace to debugger and stderr. v4 -> v3: Use _countof instead of hardcoded array size Use fputs instead of fprintf without formating v3: https://patchew.org/QEMU/20230707092258.768420-1-kkost...@redhat.com/ v3 -> v2: Reformat few log lines Move G_GNUC_PRINTF attrib

[PULL 01/11] hw/vfio/pci-quirks: Sanitize capability pointer

2023-07-10 Thread Cédric Le Goater
From: Alex Williamson Coverity reports a tained scalar when traversing the capabilities chain (CID 1516589). In practice I've never seen a device with a chain so broken as to cause an issue, but it's also pretty easy to sanitize. Fixes: f6b30c1984f7 ("hw/vfio/pci-quirks: Support alternate offse

[PULL 00/11] vfio queue

2023-07-10 Thread Cédric Le Goater
The following changes since commit 2ff49e96accc8fd9a38e9abd16f0cfa0adab1605: Merge tag 'pull-tcg-20230709' of https://gitlab.com/rth7680/qemu into staging (2023-07-09 15:01:43 +0100) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-2023071

[PULL 11/11] vfio/pci: Enable AtomicOps completers on root ports

2023-07-10 Thread Cédric Le Goater
From: Alex Williamson Dynamically enable Atomic Ops completer support around realize/exit of vfio-pci devices reporting host support for these accesses and adhering to a minimal configuration standard. While the Atomic Ops completer bits in the root port device capabilities2 register are read-on

[PULL 10/11] pcie: Add a PCIe capability version helper

2023-07-10 Thread Cédric Le Goater
From: Alex Williamson Report the PCIe capability version for a device Signed-off-by: Alex Williamson Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Tested-by: Robin Voetter Signed-off-by: Cédric Le Goater --- include/hw/pci/pcie.h | 1 + hw/pci/pcie.c | 7 +++

[PULL 05/11] vfio/migration: Remove print of "Migration disabled"

2023-07-10 Thread Cédric Le Goater
From: Zhenzhong Duan Property enable_migration supports [on/off/auto]. In ON mode, error pointer is passed to errp and logged. In OFF mode, we doesn't need to log "Migration disabled" as it's intentional. In AUTO mode, we should only ever see errors or warnings if the device supports migration an

[PULL 08/11] linux-headers: update to v6.5-rc1

2023-07-10 Thread Cédric Le Goater
Reviewed-by: Thomas Huth igned-off-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/standard-headers/drm/drm_fourcc.h | 43 ++ include/standard-headers/linux/const.h| 2 +- include/standard-headers/linux/pci_regs.h | 1 + include/standard-headers/linux/v

[PULL 09/11] s390x/ap: Wire up the device request notifier interface

2023-07-10 Thread Cédric Le Goater
From: Tony Krowiak Let's wire up the device request notifier interface to handle device unplug requests for AP. Signed-off-by: Tony Krowiak Link: https://lore.kernel.org/qemu-devel/20230530225544.280031-1-akrow...@linux.ibm.com/ Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 113

[PULL 02/11] vfio/pci: Disable INTx in vfio_realize error path

2023-07-10 Thread Cédric Le Goater
From: Zhenzhong Duan When vfio realize fails, INTx isn't disabled if it has been enabled. This may confuse host side with unhandled interrupt report. Fixes: c5478fea27ac ("vfio/pci: Respond to KVM irqchip change notifier") Signed-off-by: Zhenzhong Duan Reviewed-by: Joao Martins Reviewed-by: Cé

[PULL 04/11] vfio/migration: Free resources when vfio_migration_realize fails

2023-07-10 Thread Cédric Le Goater
From: Zhenzhong Duan When vfio_realize() succeeds, hot unplug will call vfio_exitfn() to free resources allocated in vfio_realize(); when vfio_realize() fails, vfio_exitfn() is never called and we need to free resources in vfio_realize(). In the case that vfio_migration_realize() fails, e.g: wit

[PULL 07/11] vfio: Fix null pointer dereference bug in vfio_bars_finalize()

2023-07-10 Thread Cédric Le Goater
From: Avihai Horon vfio_realize() has the following flow: 1. vfio_bars_prepare() -- sets VFIOBAR->size. 2. msix_early_setup(). 3. vfio_bars_register() -- allocates VFIOBAR->mr. After vfio_bars_prepare() is called msix_early_setup() can fail. If it does fail, vfio_bars_register() is never called

[PULL 03/11] vfio/migration: Change vIOMMU blocker from global to per device

2023-07-10 Thread Cédric Le Goater
From: Zhenzhong Duan Contrary to multiple device blocker which needs to consider already-attached devices to unblock/block dynamically, the vIOMMU migration blocker is a device specific config. Meaning it only needs to know whether the device is bypassing or not the vIOMMU (via machine property,

[PULL 06/11] vfio/migration: Return bool type for vfio_migration_realize()

2023-07-10 Thread Cédric Le Goater
From: Zhenzhong Duan Make vfio_migration_realize() adhere to the convention of other realize() callbacks(like qdev_realize) by returning bool instead of int. Suggested-by: Cédric Le Goater Suggested-by: Joao Martins Signed-off-by: Zhenzhong Duan Reviewed-by: Joao Martins Reviewed-by: Cédric

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Ani Sinha
> On 05-Jul-2023, at 7:54 AM, Akihiko Odaki wrote: > > The current implementers of ARI are all SR-IOV devices. The ARI next > function number field is undefined for VF according to PCI Express Base > Specification Revision 5.0 Version 1.0 section 9.3.7.7. The PF should > end the linked list fo

Re: [PATCH 1/1] vdpa: Fix possible use-after-free for VirtQueueElement

2023-07-10 Thread Eugenio Perez Martin
On Fri, Jul 7, 2023 at 6:44 PM Hawkins Jiawei wrote: > > QEMU uses vhost_handle_guest_kick() to forward guest's available > buffers to the vdpa device in SVQ avail ring. > > In vhost_handle_guest_kick(), a `g_autofree` `elem` is used to > iterate through the available VirtQueueElements. This `elem

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Akihiko Odaki
On 2023/07/10 16:51, Ani Sinha wrote: On 05-Jul-2023, at 7:54 AM, Akihiko Odaki wrote: The current implementers of ARI are all SR-IOV devices. The ARI next function number field is undefined for VF according to PCI Express Base Specification Revision 5.0 Version 1.0 section 9.3.7.7. The PF s

Re: [PULL 00/11] vfio queue

2023-07-10 Thread Cédric Le Goater
github.com/legoater/qemu/ tags/pull-vfio-20230710 for you to fetch changes up to 9495bf68dd2fe305f5e95a53ae146ca523dc2a02: vfio/pci: Enable AtomicOps completers on root ports (2023-07-10 09:46:09 +0200) vfio queue: * Fixes in erro

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Ani Sinha
> On 10-Jul-2023, at 1:23 PM, Akihiko Odaki wrote: > > On 2023/07/10 16:51, Ani Sinha wrote: >>> On 05-Jul-2023, at 7:54 AM, Akihiko Odaki wrote: >>> >>> The current implementers of ARI are all SR-IOV devices. The ARI next >>> function number field is undefined for VF according to PCI Expres

[PULL v2 00/11] vfio queue

2023-07-10 Thread Cédric Le Goater
The following changes since commit 2ff49e96accc8fd9a38e9abd16f0cfa0adab1605: Merge tag 'pull-tcg-20230709' of https://gitlab.com/rth7680/qemu into staging (2023-07-09 15:01:43 +0100) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-2023071

Re: [PATCH 1/1] linux-headers: update to v6.5-rc1

2023-07-10 Thread Cornelia Huck
On Sun, Jul 09 2023, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > include/standard-headers/drm/drm_fourcc.h | 43 ++ > include/standard-headers/linux/const.h| 2 +- > include/standard-headers/linux/pci_regs.h | 1 + > include/standard-headers/linux/

Re: [PATCH v4 2/4] QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG

2023-07-10 Thread Thomas Huth
On 10/07/2023 09.46, Konstantin Kostiuk wrote: Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/install.cpp | 12 ++-- qga/vss-win32/requester.cpp | 9 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/qga/vss-win32/

Re: [PATCH v4 2/4] QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG

2023-07-10 Thread Konstantin Kostiuk
On Mon, Jul 10, 2023 at 11:00 AM Thomas Huth wrote: > On 10/07/2023 09.46, Konstantin Kostiuk wrote: > > Signed-off-by: Konstantin Kostiuk > > Reviewed-by: Philippe Mathieu-Daudé > > --- > > qga/vss-win32/install.cpp | 12 ++-- > > qga/vss-win32/requester.cpp | 9 + > > 2

Re: [PATCH v4 3/4] QGA VSS: Print error in err_set

2023-07-10 Thread Thomas Huth
On 10/07/2023 09.46, Konstantin Kostiuk wrote: Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/requester.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index e85

[PATCH v6 1/2] pcie: Use common ARI next function number

2023-07-10 Thread Akihiko Odaki
Currently the only implementers of ARI is SR-IOV devices, and they behave similar. Share the ARI next function number. Signed-off-by: Akihiko Odaki --- docs/pcie_sriov.txt | 4 ++-- include/hw/pci/pcie.h | 2 +- hw/net/igb.c | 2 +- hw/net/igbvf.c| 2 +- hw/nvme/ctrl.c

[PATCH v6 0/2] pcie: Fix ARI next function numbers

2023-07-10 Thread Akihiko Odaki
The ARI next function number field is undefined for VF. The PF should end the linked list formed with the field by specifying 0. Supersedes: <20230701070133.24877-1-akihiko.od...@daynix.com> ("[PATCH 0/4] pci: Compare function number and ARI next function number") V5 -> V6: Clarify that the req

[PATCH v6 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Akihiko Odaki
The current implementers of ARI are all SR-IOV devices. The ARI next function number field is undefined for VF according to PCI Express Base Specification Revision 5.0 Version 1.0 section 9.3.7.7. The PF still requires some defined value so end the linked list formed with the field by specifying 0

Re: [PATCH v4 4/4] QGA VSS: Add log in functions begin/end

2023-07-10 Thread Thomas Huth
On 10/07/2023 09.46, Konstantin Kostiuk wrote: Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/install.cpp | 33 + qga/vss-win32/provider.cpp | 3 +++ qga/vss-win32/requester.cpp | 34 ++ 3 files changed, 70 insertions(

Re: [PATCH 1/1] hw/arm/sbsa-ref: set 'slots' property of xhci

2023-07-10 Thread Richard Henderson
On 7/10/23 08:33, Marcin Juszkiewicz wrote: W dniu 10.07.2023 o 09:28, Richard Henderson pisze: hw/usb/hcd-xhci-nec.c:    DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), hw/usb/hcd-xhci-sysbus.c:    DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS),

Re: [PATCH v7 12/15] target/riscv: Add Zvkg ISA extension support

2023-07-10 Thread Max Chou
On 2023/7/8 5:25 PM, Daniel Henrique Barboza wrote: Hi, This patch breaks some gitlab runners because of this: On 7/2/23 12:53, Max Chou wrote: From: Nazar Kazakov This commit adds support for the Zvkg vector-crypto extension, which consists of the following instructions: * vgmul.vv * vghs

Re: [PATCH 03/45] linux-user: Use abi_uint not uint32_t in syscall_defs.h

2023-07-10 Thread Philippe Mathieu-Daudé
On 9/7/23 20:28, Richard Henderson wrote: Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 108 +++--- 1 file changed, 54 insertions(+), 54 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH 1/6] vdpa: export vhost_vdpa_set_vring_ready

2023-07-10 Thread Eugenio Perez Martin
On Mon, Jul 10, 2023 at 5:19 AM Jason Wang wrote: > > On Fri, Jul 7, 2023 at 3:12 AM Eugenio Pérez wrote: > > > > The vhost-vdpa net backend needs to enable vrings in a different order > > than default, so export it. > > > > No functional change intended except for tracing, that now includes the

Re: [PATCH 10/45] linux-user: Use abi_int not int in syscall_defs.h

2023-07-10 Thread Philippe Mathieu-Daudé
On 9/7/23 20:28, Richard Henderson wrote: Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 216 +++--- 1 file changed, 108 insertions(+), 108 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-10 Thread Zhu Lingshan
In the poweroff routine, no need to fetch last available index. This commit also provides a better debug message in the vhost caller vhost_virtqueue_stop, because if vhost does not fetch the last avail idx successfully, maybe the device does not suspend, vhost will sync last avail idx to vring use

TCG broken on s390x hosts (was: [PULL 11/27] tcg/s390x: Support 128-bit load/store)

2023-07-10 Thread Thomas Huth
On 30/05/2023 20.59, Richard Henderson wrote: Use LPQ/STPQ when 16-byte atomicity is required. Note that these instructions require 16-byte alignment. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 2 + tcg/s390x/tcg-target.h | 2

Re: [PATCH 1/3] qga: Rename ga_disable_not_allowed -> ga_disable_not_allowed_freeze

2023-07-10 Thread Marc-André Lureau
On Thu, Jul 6, 2023 at 12:31 PM Konstantin Kostiuk wrote: > Signed-off-by: Konstantin Kostiuk > Reviewed-by: Marc-André Lureau > --- > qga/main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > index 2b992a55b3..121ff7a748 100644 > --

[PATCH v5 0/4] QGA VSS Logging

2023-07-10 Thread Konstantin Kostiuk
Print all VSS error and trace to debugger and stderr. v5 -> v4: Fix commit name according to function rename Fix function code style Remove extra \n from log Add missing log v4: https://patchew.org/QEMU/20230710074639.996030-1-kkost...@redhat.com/ v4 -> v3: Use _countof instead of hard

[PATCH v5 2/4] QGA VSS: Replace 'fprintf(stderr' with qga_debug

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/install.cpp | 12 ++-- qga/vss-win32/requester.cpp | 9 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index ff93b0

[PATCH v5 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/meson.build | 2 +- qga/vss-win32/vss-debug.cpp | 39 + qga/vss-win32/vss-debug.h | 25 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 qga/vss-win32/vss-debu

[PATCH v5 3/4] QGA VSS: Print error in err_set

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- qga/vss-win32/requester.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index e85b9bc633..f3eafacfc1 10064

[PATCH v5 4/4] QGA VSS: Add log in functions begin/end

2023-07-10 Thread Konstantin Kostiuk
Add several qga_debug() statements in functions. Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/install.cpp | 35 +++ qga/vss-win32/provider.cpp | 3 +++ qga/vss-win32/requester.cpp | 34 ++ 3 files changed, 72 insertions(+

Re: [PATCH 2/3] qga: Add new option --allow-rpcs

2023-07-10 Thread Marc-André Lureau
On Thu, Jul 6, 2023 at 12:32 PM Konstantin Kostiuk wrote: > The allow-rpcs option accepts a comma-separated list of RPCs to > enable. This option is opposite to --block-rpcs. Using --block-rpcs > and --allow-rpcs at the same time is not allowed. > > resolves: https://gitlab.com/qemu-project/qemu/

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Michael S. Tsirkin
On Mon, Jul 10, 2023 at 01:21:50PM +0530, Ani Sinha wrote: > > > > On 05-Jul-2023, at 7:54 AM, Akihiko Odaki wrote: > > > > The current implementers of ARI are all SR-IOV devices. The ARI next > > function number field is undefined for VF according to PCI Express Base > > Specification Revision

Re: [PATCH 3/3] qga: Add tests for --allow-rpcs option

2023-07-10 Thread Marc-André Lureau
On Thu, Jul 6, 2023 at 12:32 PM Konstantin Kostiuk wrote: > Signed-off-by: Konstantin Kostiuk > Reviewed-by: Marc-André Lureau > --- > tests/unit/test-qga.c | 31 +++ > 1 file changed, 31 insertions(+) > > diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Ani Sinha
> On 10-Jul-2023, at 2:46 PM, Michael S. Tsirkin wrote: > > On Mon, Jul 10, 2023 at 01:21:50PM +0530, Ani Sinha wrote: >> >> >>> On 05-Jul-2023, at 7:54 AM, Akihiko Odaki wrote: >>> >>> The current implementers of ARI are all SR-IOV devices. The ARI next >>> function number field is undefi

Re: [PATCH V2] vhost_vdpa: no need to fetch vring base when poweroff

2023-07-10 Thread Eugenio Perez Martin
On Mon, Jul 10, 2023 at 10:54 AM Zhu Lingshan wrote: > > In the poweroff routine, no need to fetch last available index. > > This commit also provides a better debug message in the vhost > caller vhost_virtqueue_stop, because if vhost does not fetch > the last avail idx successfully, maybe the dev

[PATCH] docs/devel: Fix coding style in style.rst

2023-07-10 Thread Thomas Huth
As defined earlier in this file, the opening curly brace of functions should be placed on a separate line. So we should do it in the examples here, too. Reported-by: Konstantin Kostiuk Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib") Signed-off-by: Thomas Huth ---

Re: TCG broken on s390x hosts (was: [PULL 11/27] tcg/s390x: Support 128-bit load/store)

2023-07-10 Thread Richard Henderson
On 7/10/23 09:58, Thomas Huth wrote: On 30/05/2023 20.59, Richard Henderson wrote: Use LPQ/STPQ when 16-byte atomicity is required. Note that these instructions require 16-byte alignment. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---   tcg/s390x/tcg-target-con-set.h |   2 +

Re: [PATCH] docs/devel: Fix coding style in style.rst

2023-07-10 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Jul 10, 2023 at 12:26 PM Thomas Huth wrote: > As defined earlier in this file, the opening curly brace of > functions should be placed on a separate line. So we should > do it in the examples here, too. > > Reported-by: Konstantin Kostiuk > Fixes: 821f29

Re: [PATCH v2] ppc/pnv: Add QME region for P10

2023-07-10 Thread Daniel Henrique Barboza
On 7/7/23 22:16, Nicholas Piggin wrote: On Fri Jul 7, 2023 at 5:12 PM AEST, Joel Stanley wrote: The Quad Management Engine (QME) manages power related settings for its quad. The xscom region is separate from the quad xscoms, therefore a new region is added. The xscoms in a QME select a given

Re: [PATCH v5 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-10 Thread Thomas Huth
On 10/07/2023 11.14, Konstantin Kostiuk wrote: Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/meson.build | 2 +- qga/vss-win32/vss-debug.cpp | 39 + qga/vss-win32/vss-debug.h | 25 3 files changed, 65 insertions(+), 1 d

Re: [PATCH v5 2/4] QGA VSS: Replace 'fprintf(stderr' with qga_debug

2023-07-10 Thread Thomas Huth
On 10/07/2023 11.14, Konstantin Kostiuk wrote: Signed-off-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/vss-win32/install.cpp | 12 ++-- qga/vss-win32/requester.cpp | 9 + 2 files changed, 11 insertions(+), 10 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-07-10 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 07:43:43PM -0400, Peter Xu wrote: > On Fri, Jun 02, 2023 at 01:00:10AM +0200, Juan Quintela wrote: > > That was basically my idea and that is why I am holding the last two > > patches and see if I can came with something in the next couple of days. > > Ah! ... > > If you h

Re: Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi (BCM2835 Peripherals)

2023-07-10 Thread Peter Maydell
On Sun, 9 Jul 2023 at 11:11, Shivam wrote: > > Hi, I have added bcm2835_i2c.c inside the i2c folder and wired up it with > bcm2835_peripheral.c , I tried to launch qemu with "-device > pca9552,address=0x60" , and it launches without any error means it can able > to found the i2c-bus > > > But i

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-07-10 Thread Thomas Huth
On 10/07/2023 11.35, Daniel P. Berrangé wrote: On Thu, Jun 01, 2023 at 07:43:43PM -0400, Peter Xu wrote: On Fri, Jun 02, 2023 at 01:00:10AM +0200, Juan Quintela wrote: That was basically my idea and that is why I am holding the last two patches and see if I can came with something in the next c

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Michael S. Tsirkin
On Mon, Jul 10, 2023 at 02:49:55PM +0530, Ani Sinha wrote: > > > > On 10-Jul-2023, at 2:46 PM, Michael S. Tsirkin wrote: > > > > On Mon, Jul 10, 2023 at 01:21:50PM +0530, Ani Sinha wrote: > >> > >> > >>> On 05-Jul-2023, at 7:54 AM, Akihiko Odaki > >>> wrote: > >>> > >>> The current impleme

Re: [PATCH] docs/devel: Fix coding style in style.rst

2023-07-10 Thread Markus Armbruster
Thomas Huth writes: > As defined earlier in this file, the opening curly brace of > functions should be placed on a separate line. So we should > do it in the examples here, too. > > Reported-by: Konstantin Kostiuk > Fixes: 821f296756 ("docs: document use of automatic cleanup functions in > gli

[PATCH v3 0/6] hw/virtio: Build vhost-vdpa.o once for all targets

2023-07-10 Thread Philippe Mathieu-Daudé
Missing review: patch #4 Since v2: - Added R-b tags - Addressed Richard's review comment: page_mask = -page_size Philippe Mathieu-Daudé (6): hw/virtio: Propagate page_mask to vhost_vdpa_listener_skipped_section() hw/virtio: Propagate page_mask to vhost_vdpa_section_end() hw/virtio/vhost

[PATCH v3 1/6] hw/virtio: Propagate page_mask to vhost_vdpa_listener_skipped_section()

2023-07-10 Thread Philippe Mathieu-Daudé
In order to make vhost-vdpa.c a target-agnostic source unit, we need to remove the TARGET_PAGE_SIZE / TARGET_PAGE_MASK / TARGET_PAGE_ALIGN uses. TARGET_PAGE_SIZE will be replaced by the runtime qemu_target_page_size(). The other ones will be deduced from TARGET_PAGE_SIZE. Since the 3 macros are us

[PATCH v3 2/6] hw/virtio: Propagate page_mask to vhost_vdpa_section_end()

2023-07-10 Thread Philippe Mathieu-Daudé
Propagate TARGET_PAGE_MASK (see the previous commit for rationale). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/virtio/vhost-vdpa.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c ind

[PATCH v3 3/6] hw/virtio/vhost-vdpa: Inline TARGET_PAGE_ALIGN() macro

2023-07-10 Thread Philippe Mathieu-Daudé
Use TARGET_PAGE_SIZE to calculate TARGET_PAGE_ALIGN (see the rationale in previous commits). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/virtio/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio

[PATCH v3 4/6] hw/virtio/vhost-vdpa: Use target-agnostic qemu_target_page_mask()

2023-07-10 Thread Philippe Mathieu-Daudé
Similarly to commit e414ed2c47 ("virtio-iommu: Use target-agnostic qemu_target_page_mask"), Replace the target-specific TARGET_PAGE_SIZE and TARGET_PAGE_MASK definitions by a call to the runtime qemu_target_page_size() helper which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé --- hw

[PATCH v2 1/3] qga: Rename ga_disable_not_allowed -> ga_disable_not_allowed_freeze

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau --- qga/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qga/main.c b/qga/main.c index 2b992a55b3..121ff7a748 100644 --- a/qga/main.c +++ b/qga/main.c @@ -395,7 +395,7 @@ static gint ga_strcmp(gconst

[PATCH v2 0/3] qga: Add new option --allow-rpcs

2023-07-10 Thread Konstantin Kostiuk
The allow-rpcs option accepts a comma-separated list of RPCs to enable. This option is opposite to --block-rpcs. Using --block-rpcs and --allow-rpcs at the same time is not allowed. resolves: https://gitlab.com/qemu-project/qemu/-/issues/1505 v2 -> v1: Fix warning when wrong config file specifi

[PATCH v2 3/3] qga: Add tests for --allow-rpcs option

2023-07-10 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau --- tests/unit/test-qga.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c index 360b4cab23..671e83cb86 100644 --- a/tests/unit/test-qga.c +++ b/test

[PATCH v2 2/3] qga: Add new option --allow-rpcs

2023-07-10 Thread Konstantin Kostiuk
The allow-rpcs option accepts a comma-separated list of RPCs to enable. This option is opposite to --block-rpcs. Using --block-rpcs and --allow-rpcs at the same time is not allowed. resolves: https://gitlab.com/qemu-project/qemu/-/issues/1505 Signed-off-by: Konstantin Kostiuk --- docs/interop/q

[PATCH v3 6/6] hw/virtio/meson: Rename softmmu_virtio_ss[] -> system_virtio_ss[]

2023-07-10 Thread Philippe Mathieu-Daudé
Similarly to commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss"), rename the virtio source set common to all system emulation as 'system_virtio_ss[]'. This is clearer because softmmu can be used for user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson ---

[PATCH v3 5/6] hw/virtio: Build vhost-vdpa.o once

2023-07-10 Thread Philippe Mathieu-Daudé
The previous commit removed the dependencies on the target-specific TARGET_PAGE_FOO macros. We can now move vhost-vdpa.c to the 'softmmu_virtio_ss' source set to build it once for all our targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/virtio/meson.build | 3

Re: [PATCH] docs/devel: Fix coding style in style.rst

2023-07-10 Thread Philippe Mathieu-Daudé
On 10/7/23 11:26, Thomas Huth wrote: As defined earlier in this file, the opening curly brace of functions should be placed on a separate line. So we should do it in the examples here, too. Reported-by: Konstantin Kostiuk Fixes: 821f296756 ("docs: document use of automatic cleanup functions in

[PATCH v3 2/7] pc: Factor out (un)plug handling of virtio-md-pci devices

2023-07-10 Thread David Hildenbrand
Let's factor out (un)plug handling, to be reused from arm/virt code. Signed-off-by: David Hildenbrand --- hw/i386/pc.c | 90 --- hw/virtio/virtio-md-pci.c | 63 ++ include/hw/virtio/virtio-md-pci.h | 6 +++ 3 files cha

[PATCH v3 0/7] virtio-mem: Device unplug support

2023-07-10 Thread David Hildenbrand
Any further comments? IMHO this is pretty straight forward. I'll wait a bit longer for more feedback. One limitation of virtio-mem is that we cannot currently unplug virtio-mem devices that have all memory unplugged from the VM. Let's properly handle forced unplug (as can be triggered by the VM)

[PATCH v3 1/7] virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci

2023-07-10 Thread David Hildenbrand
Let's add a new abstract "virtio memory device" type, and use it as parent class of virtio-mem-pci and virtio-pmem-pci. Signed-off-by: David Hildenbrand --- MAINTAINERS | 6 ++ hw/virtio/Kconfig | 8 +-- hw/virtio/meson.build | 1 + hw

[PATCH v3 4/7] virtio-md-pci: Handle unplug of virtio based memory devices

2023-07-10 Thread David Hildenbrand
While we fence unplug requests from the outside, the VM can still trigger unplug of virtio based memory devices, for example, in Linux doing on a virtio-mem-pci device: # echo 0 > /sys/bus/pci/slots/3/power While doing that is not really expected to work without harming the guest OS (e.g., rem

[PATCH v3 6/7] virtio-mem: Prepare for device unplug support

2023-07-10 Thread David Hildenbrand
In many cases, blindly unplugging a virtio-mem device is problematic. We can only safely remove a device once: * The guest is not expecting to be able to read unplugged memory (unplugged-inaccessible == on) * The virtio-mem device does not have memory plugged (size == 0) * The virtio-mem device d

[PATCH v3 3/7] arm/virt: Use virtio-md-pci (un)plug functions

2023-07-10 Thread David Hildenbrand
Let's use our new helper functions. Note that virtio-pmem-pci is not enabled for arm and, therefore, not compiled in. Signed-off-by: David Hildenbrand --- hw/arm/virt.c | 81 --- 1 file changed, 12 insertions(+), 69 deletions(-) diff --git a/hw/ar

[PATCH v3 5/7] virtio-md-pci: Support unplug requests for compatible devices

2023-07-10 Thread David Hildenbrand
Let's support unplug requests for virtio-md-pci devices that provide a unplug_request_check() callback. We'll wire that up for virtio-mem-pci next. Signed-off-by: David Hildenbrand --- hw/virtio/virtio-md-pci.c | 38 +-- include/hw/virtio/virtio-md-pci.h | 3

[PATCH v3 7/7] virtio-mem-pci: Device unplug support

2023-07-10 Thread David Hildenbrand
Let's support device unplug by forwarding the unplug_request_check() callback to the virtio-mem device. Further, disallow changing the requested-size once an unplug request is pending. Disallowing requested-size changes handles corner cases such as (1) pausing the VM (2) requesting device unplug

Re: [PATCH v5 2/2] pcie: Specify 0 for ARI next function numbers

2023-07-10 Thread Ani Sinha
> On 10-Jul-2023, at 3:14 PM, Michael S. Tsirkin wrote: > > On Mon, Jul 10, 2023 at 02:49:55PM +0530, Ani Sinha wrote: >> >> >>> On 10-Jul-2023, at 2:46 PM, Michael S. Tsirkin wrote: >>> >>> On Mon, Jul 10, 2023 at 01:21:50PM +0530, Ani Sinha wrote: > On 05-Jul-2023, at 7:5

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-10 Thread Philippe Mathieu-Daudé
On 9/7/23 10:09, Bernhard Beschow wrote: Since commit c0a55a0c9da2 "hw/sd/sdhci: Support big endian SD host controller interfaces" sdhci_common_realize() forces all SD card controllers to use either sdhci_mmio_le_ops or sdhci_mmio_be_ops, depending on the "endianness" property. However, there are

Re: [PATCH 1/1] hw/arm/sbsa-ref: set 'slots' property of xhci

2023-07-10 Thread Philippe Mathieu-Daudé
On 10/7/23 09:33, Marcin Juszkiewicz wrote: W dniu 10.07.2023 o 09:28, Richard Henderson pisze: hw/usb/hcd-xhci-nec.c:    DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), hw/usb/hcd-xhci-sysbus.c:    DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS),

Re: [PATCH] docs/devel: Fix coding style in style.rst

2023-07-10 Thread Alex Bennée
Thomas Huth writes: > As defined earlier in this file, the opening curly brace of > functions should be placed on a separate line. So we should > do it in the examples here, too. > > Reported-by: Konstantin Kostiuk > Fixes: 821f296756 ("docs: document use of automatic cleanup functions in > g

Re: [PATCH v2 2/3] qga: Add new option --allow-rpcs

2023-07-10 Thread Marc-André Lureau
On Mon, Jul 10, 2023 at 1:53 PM Konstantin Kostiuk wrote: > The allow-rpcs option accepts a comma-separated list of RPCs to > enable. This option is opposite to --block-rpcs. Using --block-rpcs > and --allow-rpcs at the same time is not allowed. > > resolves: https://gitlab.com/qemu-project/qemu/

Re: [PATCH v5 4/4] QGA VSS: Add log in functions begin/end

2023-07-10 Thread Konstantin Kostiuk
Hi Thomas, Do you have any other comments about this commit? On Mon, Jul 10, 2023 at 12:16 PM Konstantin Kostiuk wrote: > Add several qga_debug() statements in functions. > > Signed-off-by: Konstantin Kostiuk > --- > qga/vss-win32/install.cpp | 35 +++ > qga/

Re: [PATCH] target/mips: enable GINVx support for I6400 and I6500

2023-07-10 Thread Philippe Mathieu-Daudé
On 30/6/23 09:28, Marcin Nowakowski wrote: GINVI and GINVT operations are supported on MIPS I6400 and I6500 cores, so indicate that properly in CP0.Config5 register bits [16:15]. Signed-off-by: Marcin Nowakowski --- target/mips/cpu-defs.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

Re: [PATCH v6 1/2] pcie: Use common ARI next function number

2023-07-10 Thread Ani Sinha
> On 10-Jul-2023, at 1:38 PM, Akihiko Odaki wrote: > > Currently the only implementers of ARI is SR-IOV devices, and they > behave similar. Share the ARI next function number. > > Signed-off-by: Akihiko Odaki Reviewed-by: Ani Sinha > --- > docs/pcie_sriov.txt | 4 ++-- > include/hw/pci/p

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-10 Thread Ilya Maximets
On 7/10/23 05:51, Jason Wang wrote: > On Fri, Jul 7, 2023 at 7:21 PM Ilya Maximets wrote: >> >> On 7/7/23 03:43, Jason Wang wrote: >>> On Fri, Jul 7, 2023 at 3:08 AM Stefan Hajnoczi wrote: On Wed, 5 Jul 2023 at 02:02, Jason Wang wrote: > > On Mon, Jul 3, 2023 at 5:03 PM Stefan

Re: [PATCH v5 4/4] QGA VSS: Add log in functions begin/end

2023-07-10 Thread Thomas Huth
On 10/07/2023 12.38, Konstantin Kostiuk wrote: Hi Thomas, Do you have any other comments about this commit? Looks good to me now! Reviewed-by: Thomas Huth

Re: [PATCH 1/2] target/mips: Implement Loongson CSR instructions

2023-07-10 Thread Philippe Mathieu-Daudé
On 22/5/23 08:00, Philippe Mathieu-Daudé wrote: Hi Jiaxun, On 21/5/23 23:48, Jiaxun Yang wrote: Loongson introduced CSR instructions since 3A4000, which looks similar to IOCSR and CPUCFG instructions we seen in LoongArch. Unfortunately we don't have much document about those instructions, bit

Re: TCG broken on s390x hosts (was: [PULL 11/27] tcg/s390x: Support 128-bit load/store)

2023-07-10 Thread Thomas Huth
On 10/07/2023 11.31, Richard Henderson wrote: On 7/10/23 09:58, Thomas Huth wrote: On 30/05/2023 20.59, Richard Henderson wrote: Use LPQ/STPQ when 16-byte atomicity is required. Note that these instructions require 16-byte alignment. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson

  1   2   3   4   5   >