[PATCH v2] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Pierrick Bouvier
Support for execveat syscall was implemented in 55bbe4 and is available since QEMU 8.0.0. It relies on host execveat, which is widely available on most of Linux kernels today. However, this change breaks qemu-user self emulation, if "host" qemu version is less than 8.0.0. Indeed, it does not imple

Re: [PULL 07/11] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-07-05 Thread Philippe Mathieu-Daudé
Cc'ing John. On 5/7/23 06:53, Richard Henderson wrote: On 7/4/23 18:36, Peter Maydell wrote: +int main(int argc, char **argv) +{ +    const char *shm_name = "qemu-test-tcg-aarch64-icivau"; +    int fd; + +    fd = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); Build failures: https

Re: [PATCH] pnv/xive2: Always pass a presenter object when accessing the TIMA

2023-07-05 Thread Cédric Le Goater
On 7/5/23 10:14, Frederic Barrat wrote: The low-level functions to access the TIMA take a presenter object as a first argument. When accessing the TIMA from the IC BAR, i.e. indirect calls, we currently pass a NULL pointer for the presenter argument. While it appears ok with the current usage, it

Re: [PATCH] ppc/pegasos2: Add support for -initrd command line option

2023-07-05 Thread Cédric Le Goater
Hello, On 7/4/23 20:19, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan The patch is not a oneliner, it deserves a minimal commit log. Thanks, C. --- hw/ppc/pegasos2.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pegasos

Re: [PATCH] ppc/pegasos2: Add support for -initrd command line option

2023-07-05 Thread Cédric Le Goater
On 7/5/23 11:35, Cédric Le Goater wrote: Hello, On 7/4/23 20:19, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan The patch is not a oneliner, it deserves a minimal commit log. It was fixed later on. Forget my comment. Thanks, C.

Re: [PATCH v2] hw/ide/piix: properly initialize the BMIBA register

2023-07-05 Thread Olaf Hering
Tue, 4 Jul 2023 08:38:33 +0200 Paolo Bonzini : > I agree that calling pci_device_reset() would be a better match for > pci_xen_ide_unplug(). This change works as well: --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -164,8 +164,9 @@ static void pci_unplug_nics(PCIBus *bus)

Re: [PATCH v3] vhost-user: delay vhost_user_stop

2023-07-05 Thread Philippe Mathieu-Daudé
Hi Marc-André, [very old patch...] On 27/2/17 11:49, Marc-André Lureau wrote: Since commit b0a335e351103bf92f3f9d0bd5759311be8156ac, a socket write may trigger a disconnect events, calling vhost_user_stop() and clearing all the vhost_dev strutures holding data that vhost.c functions expect to r

Re: [PATCH] ppc/pnv: Set P10 core xscom region size to match hardware

2023-07-05 Thread Cédric Le Goater
On 7/5/23 04:05, Joel Stanley wrote: On Wed, 5 Jul 2023 at 01:27, Nicholas Piggin wrote: The P10 core xscom memory regions overlap because the size is wrong. The P10 core+L2 xscom region size is allocated as 0x1000 (with some unused ranges). "EC" is used as a closer match, as "EX" includes L3

Re: [PATCH v21 00/20] s390x: CPU Topology

2023-07-05 Thread Thomas Huth
On 30/06/2023 11.17, Pierre Morel wrote: ... Testing === To use the QEMU patches, you will need Linux V6-rc1 or newer, or use the following Linux mainline patches: f5ecfee94493 2022-07-20 KVM: s390: resetting the Topology-Change-Report 24fe0195bc19 2022-07-20 KVM: s390: guest support for to

RE: [PATCH 1/2] virtio-iommu: Fix 64kB host page size VFIO device assignment

2023-07-05 Thread Duan, Zhenzhong
>-Original Message- >From: Jean-Philippe Brucker >Sent: Wednesday, July 5, 2023 4:29 PM >Subject: Re: [PATCH 1/2] virtio-iommu: Fix 64kB host page size VFIO device >assignment > >On Wed, Jul 05, 2023 at 04:52:09AM +, Duan, Zhenzhong wrote: >> Hi Eric, >> >> >-Original Message-

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-05 Thread Thomas Huth
On 30/06/2023 11.17, Pierre Morel wrote: This test takes care to check the changes on different entitlements when the guest requests a polarization change. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 47 ++ 1 file changed, 47 insertions(+)

Re: [PATCH v2] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Michael Tokarev
05.07.2023 12:00, Pierrick Bouvier wrote: ... diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08162cc966..4945ddd7f2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -659,6 +659,7 @@ safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ #endif s

Re: [PATCH v21 18/20] tests/avocado: s390x cpu topology test socket full

2023-07-05 Thread Thomas Huth
On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topolog

Re: [PATCH v21 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-07-05 Thread Thomas Huth
On 30/06/2023 11.17, Pierre Morel wrote: Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 48 ++ 1 file changed, 48 insertions(+) Reviewed-by: Thomas Huth

Re: [PATCH v21 20/20] tests/avocado: s390x cpu topology bad move

2023-07-05 Thread Thomas Huth
On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QEMU refuses to move a CPU to an unexistant location. s/unexistant/nonexistent/ ? Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/

Re: [PATCH v7 5/6] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-07-05 Thread Akihiko Odaki
On 2023/07/05 14:43, Ani Sinha wrote: On 05-Jul-2023, at 7:09 AM, Akihiko Odaki wrote: On 2023/07/05 0:07, Ani Sinha wrote: On 04-Jul-2023, at 7:58 PM, Igor Mammedov wrote: On Tue, 4 Jul 2023 19:20:00 +0530 Ani Sinha wrote: On 04-Jul-2023, at 6:18 PM, Igor Mammedov wrote: On Tue, 4

[PATCH] riscv: add config for asid size

2023-07-05 Thread Ben Dooks
Add a config to the cpu state to control the size of the ASID area in the SATP CSR to enable testing with smaller than the default (which is currently maximum for both rv32 and rv64). It also adds the ability to stop the ASID feature by using 0 to disable it. For example, an rv64 with only 8 asid

[PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Frederic Barrat
Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, accept, ...), only missing for those 2. Useful for debug and even more now that we experiment with SMT. Signed-off-by: Frederic Barrat --- hw/intc/trace-events | 4 ++-- hw/intc/x

Re: [PATCH v3 0/3] vdpa: Return -EIO if device ack is VIRTIO_NET_ERR

2023-07-05 Thread Hawkins Jiawei
On 2023/7/5 15:59, Lei Yang wrote: > Hello Hawkins > > QE can help test this series before it is merged into master, I would > like to know what test steps can cover this series related scenario? > Hi, I would like to suggest the following steps to test this patch series: 1. Modify the QEMU sou

Re: [PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Philippe Mathieu-Daudé
On 5/7/23 13:00, Frederic Barrat wrote: Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, accept, ...), only missing for those 2. Useful for debug and even more now that we experiment with SMT. Signed-off-by: Frederic Barrat ---

Re: [PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Cédric Le Goater
On 7/5/23 13:00, Frederic Barrat wrote: Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, accept, ...), only missing for those 2. Useful for debug and even more now that we experiment with SMT. Signed-off-by: Frederic Barrat

Re: [PATCH v2] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Philippe Mathieu-Daudé
On 5/7/23 12:26, Michael Tokarev wrote: 05.07.2023 12:00, Pierrick Bouvier wrote: ... @@ -8696,11 +8697,14 @@ static int do_execveat(CPUArchState *cpu_env, int dirfd,   goto execve_efault;   } +    const char* exe = p;   if (is_proc_myself(p, "exe")) { -    ret = get_errn

Re: [PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Cédric Le Goater
On 7/5/23 13:12, Philippe Mathieu-Daudé wrote: On 5/7/23 13:00, Frederic Barrat wrote: Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, accept, ...), only missing for those 2. Useful for debug and even more now that we experimen

Re: [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-07-05 Thread Markus Armbruster
Het Gala writes: > This patch introduces well defined MigrateAddress struct and its related > child objects. > > The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' > is of string type. The current migration flow follows double encoding > scheme for fetching migration paramete

[PATCH 2/2] python: bump minimum requirements so they are compatible with 3.12

2023-07-05 Thread Paolo Bonzini
There are many Python 3.12 issues right now, but a particularly problematic one when debugging them is that one cannot even use minreqs.txt in a Python 3.12 virtual environment to test with locked package versions. Bump the mypy and wrapt versions to fix this, while remaining within the realm of v

[PATCH 0/2] python: first step towards Python 3.12 support

2023-07-05 Thread Paolo Bonzini
The Python 3.12 situation is a mess, with both flake8 and pylint giving false positives that do not happen with Python 3.11. As a first step towards understanding these issues, drop support for old linter versions that do not work with it. This at least makes it possible to install easily the sam

Re: [PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Philippe Mathieu-Daudé
On 5/7/23 13:18, Cédric Le Goater wrote: On 7/5/23 13:12, Philippe Mathieu-Daudé wrote: On 5/7/23 13:00, Frederic Barrat wrote: Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, accept, ...), only missing for those 2. Useful for

[PATCH 1/2] python: work around mypy false positive

2023-07-05 Thread Paolo Bonzini
mypy 1.4.0 signals an error: qemu/qmp/qmp_tui.py:350: error: Non-overlapping equality check (left operand type: "Literal[Runstate.DISCONNECTING]", right operand type: "Literal[Runstate.IDLE]") [comparison-overlap] This is because it does not realiez that self.disconnect() could change the valu

Re: [PATCH v6 2/9] migration: convert uri parameter into 'MigrateAddress' struct

2023-07-05 Thread Markus Armbruster
Drive-by comment... Het Gala writes: > This patch parses 'migrate' and 'migrate-incoming' QAPI's 'uri' parameter > with all the migration connection related information and stores them > inside well defined 'MigrateAddress' struct. > > Misc: limit line width in exec.c to 80 characters recommende

Re: [PATCH 1/2] virtio-iommu: Fix 64kB host page size VFIO device assignment

2023-07-05 Thread Jean-Philippe Brucker
On Wed, Jul 05, 2023 at 10:13:11AM +, Duan, Zhenzhong wrote: > >-Original Message- > >From: Jean-Philippe Brucker > >Sent: Wednesday, July 5, 2023 4:29 PM > >Subject: Re: [PATCH 1/2] virtio-iommu: Fix 64kB host page size VFIO device > >assignment > > > >On Wed, Jul 05, 2023 at 04:52:09

Re: [PATCH v3 06/13] docs/devel: simplify the minimal checklist

2023-07-05 Thread Philippe Mathieu-Daudé
Hi Alex, On 17/11/22 18:25, Alex Bennée wrote: The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewe

Re: [PATCH] pnv/xive: Print CPU target in all TIMA traces

2023-07-05 Thread Cédric Le Goater
On 7/5/23 13:26, Philippe Mathieu-Daudé wrote: On 5/7/23 13:18, Cédric Le Goater wrote: On 7/5/23 13:12, Philippe Mathieu-Daudé wrote: On 5/7/23 13:00, Frederic Barrat wrote: Add the CPU target in the trace when reading/writing the TIMA space. It was already done for other TIMA ops (notify, ac

Re: [PATCH v2] virtio: add a new vcpu watchdog

2023-07-05 Thread Philippe Mathieu-Daudé
Hi, On 5/7/23 10:18, zhanghao1 wrote: Each vcpu creates a corresponding timer task. The watchdog is driven by a timer according to a certain period. Each time the timer expires, the counter is decremented. When the counter is "0", the watchdog considers the vcpu to be stalling and resets the VM.

[PATCH v2] python: bump minimum requirements so they are compatible with 3.12

2023-07-05 Thread Paolo Bonzini
There are several Python 3.12 issues in QEMU's python/ directory, but a particularly problematic one when debugging them is that one cannot even use minreqs.txt in a Python 3.12 virtual environment to test with locked package versions. Bump the mypy and wrapt versions to fix this, while remaining

[PATCH v8 0/6] test and QEMU fixes to ensure proper PCIE device usage

2023-07-05 Thread Ani Sinha
Patches 1-4: Fix tests so that devices do not use non-zero slots on the pcie root ports. PCIE ports only have one slot, so PCIE devices can only be plugged into slot 0 on a PCIE port. Patch 5: Enforce only one slot on PCIE port. Patch 6: add a cosmetic comment addition for better clarity of the c

[PATCH v8 6/6] hw/pci: add comment explaining the reason for checking function 0 in hotplug

2023-07-05 Thread Ani Sinha
This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: m...@redhat.com Signed-off-by: Ani Sinha --- hw/pci/pci.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw

[PATCH v8 6/6] hw/pci: add comment to explain checking for available function 0 in pci hotplug

2023-07-05 Thread Ani Sinha
This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: m...@redhat.com Signed-off-by: Ani Sinha --- hw/pci/pci.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw

[PATCH v8 2/6] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port

2023-07-05 Thread Ani Sinha
PCIE ports only have one slot, slot 0. Hence, non-zero slots are not available for PCIE devices on PCIE root ports. Fix test_acpi_q35_tcg_no_acpi_hotplug() so that the test does not use them. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 4 ++-- 1 file

[PATCH v8 5/6] hw/pci: warn when PCIe device is plugged into non-zero slot of downstream port

2023-07-05 Thread Ani Sinha
PCIe downstream ports only have a single device 0, so PCI Express devices can only be plugged into slot 0 on a PCIe port. Add a warning to let users know when the invalid configuration is used. We may enforce this more strongly later once we get more clarity on whether we are introducing a bad regr

[PATCH v8 3/6] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp

2023-07-05 Thread Ani Sinha
Some fixes were committed in bios-tables-test in the previous commit. Update the acpi blob and clear bios-tables-test-allowed-diff.h so that the test continues to pass with the changes in the bios-tables-test. Following is the asl diff between the old and the newly updated blob: @@ -1,30 +1,30 @@

[PATCH v8 4/6] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test

2023-07-05 Thread Ani Sinha
The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci bridge on slot 0 on the same pcie-root-port. Since a downstream device can be attached to a pcie-root-port only on slot 0, the above test configuration is not allowed. Additionally using pcie.0 as id for pcie-to-pci bridge is

[PATCH v8 1/6] tests/acpi: allow changes in DSDT.noacpihp table blob

2023-07-05 Thread Ani Sinha
We are going to fix bio-tables-test in the next patch and hence need to make sure the acpi tests continue to pass. Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-al

Re: [PATCH v8 6/6] hw/pci: add comment explaining the reason for checking function 0 in hotplug

2023-07-05 Thread Ani Sinha
> On 05-Jul-2023, at 5:29 PM, Ani Sinha wrote: > > This change is cosmetic. A comment is added explaining why we need to check > for > the availability of function 0 when we hotplug a device. Please ignore this patch. Its a duplicate of one already sent with an updated patch summary. > >

[PATCH v2 0/4] ppc/pnv: SMT support for powernv

2023-07-05 Thread Nicholas Piggin
These patches implement enough to install a distro, boot, run SMP KVM guests with libvirt with good performance using MTTCG (as reported by Cedric). There are a few more SPRs that need to be done, and per-LPAR SPRs are mostly not annotated yet so it can't run in 1 LPAR mode. But those can be added

[PATCH v2 1/4] target/ppc: Add LPAR-per-core vs per-thread mode flag

2023-07-05 Thread Nicholas Piggin
The Power ISA has the concept of sub-processors: Hardware is allowed to sub-divide a multi-threaded processor into "sub-processors" that appear to privileged programs as multi-threaded processors with fewer threads. POWER9 and POWER10 have two modes, either every thread is a sub-processor o

[PATCH v2 3/4] ppc/pnv: SMT support for powernv

2023-07-05 Thread Nicholas Piggin
Set the TIR default value with the SMT thread index, and place some standard limits on SMT configurations. Now powernv is able to boot skiboot and Linux with a SMT topology, including booting a KVM guest. There are several SPRs and other features (e.g., broadcast msgsnd) that are not implemented,

[PATCH v2 2/4] target/ppc: SMT support for the HID SPR

2023-07-05 Thread Nicholas Piggin
HID is a per-core shared register, skiboot sets this (e.g., setting HILE) on one thread and that must affect all threads of the core. Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/cpu_init.c| 2 +- target/ppc/helper.h | 1 +

[PATCH v2 4/4] tests/avocado: Add powernv machine test script

2023-07-05 Thread Nicholas Piggin
This copies ppc_pseries.py to start a set of powernv tests, including a Linux boot test for the newly added SMT mode. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- I didn't add the powernv10 support yet as Cedric suggested, and kept the same vmlinuz because it's common with th

Re: [PATCH v2] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Pierrick Bouvier
On 7/5/23 12:26, Michael Tokarev wrote: 05.07.2023 12:00, Pierrick Bouvier wrote: ... diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08162cc966..4945ddd7f2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -659,6 +659,7 @@ safe_syscall4(pid_t, wait4, pid_t, pid, int

[PATCH v3] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Pierrick Bouvier
Support for execveat syscall was implemented in 55bbe4 and is available since QEMU 8.0.0. It relies on host execveat, which is widely available on most of Linux kernels today. However, this change breaks qemu-user self emulation, if "host" qemu version is less than 8.0.0. Indeed, it does not imple

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-05 Thread Mark Kanda
On 7/5/2023 2:15 AM, Stefano Garzarella wrote: This reverts commit 8cc5583abe6419e7faaebc9fbd109f34f4c850f2. That commit causes several problems in Linux as described in the BZ. In particular, after a while, other devices on the bus are no longer usable even if those devices are not affected by

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-05 Thread Stefano Garzarella
Hi Mark, On Wed, Jul 05, 2023 at 07:28:05AM -0500, Mark Kanda wrote: On 7/5/2023 2:15 AM, Stefano Garzarella wrote: This reverts commit 8cc5583abe6419e7faaebc9fbd109f34f4c850f2. That commit causes several problems in Linux as described in the BZ. In particular, after a while, other devices on

Re: [PATCH v4] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2023-07-05 Thread Mark Kanda
HI Stefano, On 7/4/2023 9:14 AM, Stefano Garzarella wrote: Hi Mark, we have a bug [1] possibly related to this patch. I saw this Oracle Linux errata [2] where you reverted this patch, but there are no details. Do you think we should revert it upstream as well? Do you have any details about the

Re: [PATCH] Hexagon: move GETPC() calls to top level helpers

2023-07-05 Thread Matheus Tavares Bernardino
> Taylor wrote: > > > Matheus Tavares Bernardino wrote: > > > > diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index > > 5451b061ee..efb8013912 100644 > > --- a/target/hexagon/macros.h > > +++ b/target/hexagon/macros.h > > + > > +#define MEM_LOADn(SIZE, VA) ({ \ > > +check_nos

Re: [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-07-05 Thread Het Gala
On 05/07/23 4:51 pm, Markus Armbruster wrote: Het Gala writes: This patch introduces well defined MigrateAddress struct and its related child objects. The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of string type. The current migration flow follows double encoding

Re: [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-07-05 Thread Markus Armbruster
Het Gala writes: > On 05/07/23 4:51 pm, Markus Armbruster wrote: >> Het Gala writes: >> >>> This patch introduces well defined MigrateAddress struct and its related >>> child objects. >>> >>> The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' >>> is of string type. The curren

Re: [PATCH 2/2] virtio-iommu: Rework the trace in virtio_iommu_set_page_size_mask()

2023-07-05 Thread Eric Auger
Hi Zhenghong, On 7/5/23 10:17, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Duan, Zhenzhong >> Sent: Wednesday, July 5, 2023 12:56 PM >> Subject: RE: [PATCH 2/2] virtio-iommu: Rework the trace in >> virtio_iommu_set_page_size_mask() >> >> >> >>> -Original Message- >>> Fr

Re: [PATCH v6 2/9] migration: convert uri parameter into 'MigrateAddress' struct

2023-07-05 Thread Het Gala
On 05/07/23 4:59 pm, Markus Armbruster wrote: Drive-by comment... Het Gala writes: This patch parses 'migrate' and 'migrate-incoming' QAPI's 'uri' parameter with all the migration connection related information and stores them inside well defined 'MigrateAddress' struct. Misc: limit line w

[PATCH v2 0/3] util/fifo8: Introduce fifo8_peek_buf()

2023-07-05 Thread Philippe Mathieu-Daudé
Extracted from "hw/char/pl011: Implement TX (async) FIFO": https://lore.kernel.org/qemu-devel/20230522153144.30610-1-phi...@linaro.org/ All series reviewed. Philippe Mathieu-Daudé (3): util/fifo8: Fix typo in fifo8_push_all() description util/fifo8: Allow fifo8_pop_buf() to not populate poppe

[PATCH v2 1/3] util/fifo8: Fix typo in fifo8_push_all() description

2023-07-05 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alex Bennée --- include/qemu/fifo8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h index 28bf2cee57..16be02f361 100644 --- a/include/qemu/fifo8.h

[PATCH v2 2/3] util/fifo8: Allow fifo8_pop_buf() to not populate popped length

2023-07-05 Thread Philippe Mathieu-Daudé
There might be cases where we know the number of bytes we can pop from the FIFO, or we simply don't care how many bytes is returned. Allow fifo8_pop_buf() to take a NULL numptr. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alex Bennée --- include/qemu/fifo

[PATCH v2 3/3] util/fifo8: Introduce fifo8_peek_buf()

2023-07-05 Thread Philippe Mathieu-Daudé
To be able to peek at FIFO content without popping it, introduce the fifo8_peek_buf() method by factoring common content from fifo8_pop_buf(). Reviewed-by: Francisco Iglesias Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/fifo8.h | 27 +++ util/fifo8.c |

[PATCH 0/4] chardev/char-fe: Document FEWatchFunc and use G_SOURCE_CONTINUE/REMOVE

2023-07-05 Thread Philippe Mathieu-Daudé
Improve qio and chardev frontend documentation, have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE. Philippe Mathieu-Daudé (4): io/channel: Explicit QIOChannel doc is based on GLib's IOChannel chardev/char-fe: Clarify qemu_chr_fe_add_watch 'condition' arg is a mask chardev/char-fe

[PATCH 2/4] chardev/char-fe: Clarify qemu_chr_fe_add_watch 'condition' arg is a mask

2023-07-05 Thread Philippe Mathieu-Daudé
qemu_chr_fe_add_watch() can poll for multiple conditions. It's @cond argument is a combination of all the condition bits. Signed-off-by: Philippe Mathieu-Daudé --- include/chardev/char-fe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chardev/char-fe.h b/includ

[PATCH 1/4] io/channel: Explicit QIOChannel doc is based on GLib's IOChannel

2023-07-05 Thread Philippe Mathieu-Daudé
One can get lost looking for "public API docs". Explicit we are referring to GLib IOChannel documentation. Signed-off-by: Philippe Mathieu-Daudé --- include/io/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/io/channel.h b/include/io/channel.h index 229bf369

[PATCH 4/4] hw/char: Have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE

2023-07-05 Thread Philippe Mathieu-Daudé
GLib recommend to use G_SOURCE_REMOVE / G_SOURCE_CONTINUE for GSourceFunc callbacks. Our FEWatchFunc is a GSourceFunc returning such value. Use such definitions which are "more memorable" [*]. [*] https://docs.gtk.org/glib/callback.SourceFunc.html#return-value Signed-off-by: Philippe Mathieu-Daud

[PATCH 3/4] chardev/char-fe: Document FEWatchFunc typedef

2023-07-05 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/chardev/char-fe.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 309960046a..ec3f706a14 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -175

[PATCH] meson.build: Skip C++ detection unless we're targeting Windows

2023-07-05 Thread Thomas Huth
The only C++ code that we currently still have in the repository is the code in qga/vss-win32/ - so we can skip the C++ detection unless we are compiling binaries for Windows. Signed-off-by: Thomas Huth --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.bui

Re: [PULL 07/11] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-07-05 Thread Richard Henderson
On 7/5/23 11:25, Philippe Mathieu-Daudé wrote: /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/lib/../lib/librt.a(shm_open.o): in function `shm_open': (.text+0x3c): undefined reference to `__shm_d

Re: [PATCH v7 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties

2023-07-05 Thread Andrew Jones
On Fri, Jun 30, 2023 at 07:08:05AM -0300, Daniel Henrique Barboza wrote: > Let's add KVM user properties for the multi-letter extensions that KVM > currently supports: zicbom, zicboz, zihintpause, zbb, ssaia, sstc, > svinval and svpbmt. > > As with MISA extensions, we're using the KVMCPUConfig typ

Re: GLibC AMD CPUID cache reporting regression (was Re: qemu-user self emulation broken with default CPU on x86/x64)

2023-07-05 Thread Karumanchi, Sajan
[AMD Official Use Only - General] ++ Prem Thanks & Regards, Sajan K. From: Florian Weimer Sent: Tuesday, July 4, 2023 11:07 PM To: Daniel P.Berrangé Cc: Pierrick Bouvier ; qemu-devel@nongnu.org ; Richard Henderson ; laur...@vivier.eu ; Karumanchi, Sajan

Re: [PATCH v2] virtio: add a new vcpu watchdog

2023-07-05 Thread Alex Bennée
zhanghao1 writes: > Each vcpu creates a corresponding timer task. The watchdog > is driven by a timer according to a certain period. Each time > the timer expires, the counter is decremented. When the counter > is "0", the watchdog considers the vcpu to be stalling and resets > the VM. To avoid

Re: [PATCH] Hexagon: move GETPC() calls to top level helpers

2023-07-05 Thread Richard Henderson
On 7/5/23 14:45, Matheus Tavares Bernardino wrote: Taylor wrote: Note that check_noshuf calls HELPER(probe_noshuf_load) and HELPER(commit_store). Both of those call GETPC() from within. So, you'll need to pull the contents into separate functions that take ra as an argument. Ah, good point.

Re: [PATCH 1/2] target/arm: Suppress more TCG unimplemented features in ID registers

2023-07-05 Thread Richard Henderson
On 7/4/23 15:06, Peter Maydell wrote: We already squash the ID register field for FEAT_SPE (the Statistical Profiling Extension) because TCG does not implement it and if we advertise it to the guest the guest will crash trying to look at non-existent system registers. Do the same for some other

Re: [PATCH 2/2] target/arm: Define neoverse-v1

2023-07-05 Thread Richard Henderson
On 7/4/23 15:06, Peter Maydell wrote: If you're checking the values against the TRM, note that the summary tables differ from the register description in the TRM for ID_AA64DFR0_EL1, ID_AA64ZFR0_EL1 and ID_PFR0_EL1: we trust the versions in the register descriptions. Also the MIDR value in the r1

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

2023-07-05 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 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-05 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/vss-debug.h | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 qga/vss-win32/vss-debug.h diff --git a/qga/vss-win32/vss-debug.h b/qga/vss-win32/vss-debug.h new file mode 100644 index 00..c0bdf7a3f

[PATCH 0/4] QGA VSS Logging

2023-07-05 Thread Konstantin Kostiuk
Print all VSS error and trace to debugger and stderr. Konstantin Kostiuk (4): QGA VSS: Add wrapper to send log to debugger and stderr QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG QGA VSS: Print error in err_set QGA VSS: Add log in functions begin/end qga/vss-win32/install.cpp | 4

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

2023-07-05 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- qga/vss-win32/install.cpp | 13 +++-- qga/vss-win32/requester.cpp | 9 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index ff93b08a9e..c10a397e51 100644 --- a/qga/vs

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

2023-07-05 Thread Konstantin Kostiuk
Signed-off-by: Konstantin Kostiuk --- 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 e4f7013c62..73c32381eb 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/request

Re: [PATCH] meson.build: Skip C++ detection unless we're targeting Windows

2023-07-05 Thread Philippe Mathieu-Daudé
On 5/7/23 15:36, Thomas Huth wrote: The only C++ code that we currently still have in the repository is the code in qga/vss-win32/ - so we can skip the C++ detection unless we are compiling binaries for Windows. Signed-off-by: Thomas Huth --- meson.build | 2 +- 1 file changed, 1 insertion(+

Re: [PATCH v4 02/37] tests/multiarch: Add test-aes

2023-07-05 Thread Richard Henderson
On 7/3/23 14:08, Christoph Müllner wrote: +config-cc.mak: Makefile + $(quiet-@)( \ + $(call cc-option,-mrv64g_zk, CROSS_CC_HAS_ZK) \ I think this should be "-march=rv64g_zk" instead of "-mrv64g_zk" Otherwise this will always fail. *shrug* FWIW, something built for me... But

Re: [PATCH v2 4/4] tests/avocado: Add powernv machine test script

2023-07-05 Thread Cédric Le Goater
On 7/5/23 14:06, Nicholas Piggin wrote: This copies ppc_pseries.py to start a set of powernv tests, including a Linux boot test for the newly added SMT mode. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- I didn't add the powernv10 support yet as Cedric suggested, and kept th

Re: [PATCH] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-07-05 Thread Richard Henderson
On 7/4/23 17:44, Peter Maydell wrote: IIUC tcg_enabled(), this guard shouldn't be necessary; if CONFIG_TCG is not defined, tcg_enabled() evaluates to 0, and the compiler should elide the whole block. IME it's a bit optimistic to assume that the compiler will always do that, especially with no o

Re: [PATCH] target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case

2023-07-05 Thread Richard Henderson
On 7/4/23 17:43, Peter Maydell wrote: If you build QEMU with the clang sanitizer enabled, you can see it fire when running the arm-cpu-features test: $ QTEST_QEMU_BINARY=./build/arm-clang/qemu-system-aarch64 ./build/arm-clang/tests/qtest/arm-cpu-features [...] ../../target/arm/cpu64.c:125:19: r

Re: [PATCH] target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case

2023-07-05 Thread Richard Henderson
On 7/4/23 18:00, Alex Bennée wrote: Peter Maydell writes: If you build QEMU with the clang sanitizer enabled, you can see it fire when running the arm-cpu-features test: $ QTEST_QEMU_BINARY=./build/arm-clang/qemu-system-aarch64 ./build/arm-clang/tests/qtest/arm-cpu-features [...] ../../targ

Re: [PATCH 1/4] io/channel: Explicit QIOChannel doc is based on GLib's IOChannel

2023-07-05 Thread Daniel P . Berrangé
On Wed, Jul 05, 2023 at 03:31:36PM +0200, Philippe Mathieu-Daudé wrote: > One can get lost looking for "public API docs". Explicit > we are referring to GLib IOChannel documentation. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/io/channel.h | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH v2] kconfig: Add PCIe devices to s390x machines

2023-07-05 Thread Matthew Rosato
On 7/4/23 9:33 AM, Philippe Mathieu-Daudé wrote: > On 4/7/23 14:32, Cédric Le Goater wrote: >> On 7/4/23 14:09, Philippe Mathieu-Daudé wrote: >>> On 4/7/23 14:01, Cédric Le Goater wrote: It is useful to extend the number of available PCI devices to KVM guests for passthrough scenarios and

Re: [PATCH 1/2] block/file-posix: fix g_file_get_contents return path

2023-07-05 Thread Matthew Rosato
On 6/4/23 2:16 AM, Sam Li wrote: > The g_file_get_contents() function returns a g_boolean. If it fails, the > returned value will be 0 instead of -1. Solve the issue by skipping > assigning ret value. > > This issue was found by Matthew Rosato using virtio-blk-{pci,ccw} backed > by an NVMe partiti

[PATCH v3 2/2] qtest/migration: Use switchover-hold to speedup

2023-07-05 Thread Peter Xu
This solution is heavily based on Daniel's original approach here, but hopefully a cleaner way to impl: https://lore.kernel.org/r/20230601161347.1803440-11-berra...@redhat.com The difference is we use the switchover-hold flag rather than tuning bw+downtime to guide test convergence, comparing to

[PATCH v3 1/2] migration: switchover-hold parameter

2023-07-05 Thread Peter Xu
Add a new migration parameter switchover-hold which can block src qemu migration from switching over to dest from running. One can set this flag to true so src qemu will keep iterating the VM data, not switching over to dest even if it can. It means now live migration works somehow like COLO; we

[PATCH v3 0/2] migration: switchover-hold flag

2023-07-05 Thread Peter Xu
This v3 patchset is based on master. Since I'm not sure how long this series will take for review, we could probably apply Dan's previous patch 10 first, then when I repost I can provide a revert patch when needed. v3: - Rebase only (v2 is not yet applicable after switchover-ack series merged) A

Re: [PATCH v3 0/2] migration: switchover-hold flag

2023-07-05 Thread Peter Xu
On Wed, Jul 05, 2023 at 11:08:22AM -0400, Peter Xu wrote: > This v3 patchset is based on master. Since I'm not sure how long this > series will take for review, we could probably apply Dan's previous patch > 10 first, then when I repost I can provide a revert patch when needed. > > v3: > - Rebase

Re: [PATCH v2] kconfig: Add PCIe devices to s390x machines

2023-07-05 Thread Cédric Le Goater
On 7/5/23 16:54, Matthew Rosato wrote: On 7/4/23 9:33 AM, Philippe Mathieu-Daudé wrote: On 4/7/23 14:32, Cédric Le Goater wrote: On 7/4/23 14:09, Philippe Mathieu-Daudé wrote: On 4/7/23 14:01, Cédric Le Goater wrote: It is useful to extend the number of available PCI devices to KVM guests for

[PATCH v3] kconfig: Add PCIe devices to s390x machines

2023-07-05 Thread Cédric Le Goater
It is useful to extend the number of available PCI devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture. Include models for Intel Ethernet adapters and one USB controller, which all support MSI-X. Devices only supporting INTx won't

Re: [PATCH v2 01/19] hw/timer/arm_timer: Declare QOM types using DEFINE_TYPES() macro

2023-07-05 Thread Richard Henderson
On 7/4/23 16:49, Philippe Mathieu-Daudé wrote: When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. Replace the type_init() / type_register_static() combination. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/timer

Re: [PATCH v2 02/19] hw/timer/arm_timer: Remove pointless cast from void *

2023-07-05 Thread Richard Henderson
On 7/4/23 16:49, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/timer/arm_timer.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3] linux-user/syscall: Implement execve without execveat

2023-07-05 Thread Michael Tokarev
05.07.2023 15:10, Pierrick Bouvier wrote: Support for execveat syscall was implemented in 55bbe4 and is available since QEMU 8.0.0. It relies on host execveat, which is widely available on most of Linux kernels today. However, this change breaks qemu-user self emulation, if "host" qemu version i

Re: [PATCH v2 03/19] hw/timer/arm_timer: Move SP804 code around

2023-07-05 Thread Richard Henderson
On 7/4/23 16:49, Philippe Mathieu-Daudé wrote: Move sp804_properties[] and sp804_class_init() around with the rest of SP804 code code. What follows the "Integrator/CP timer module." is strictly ICP related. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/timer/arm_timer

Re: [PATCH v2 04/19] hw/timer/arm_timer: CamelCase rename icp_pit_state -> IntegratorPIT

2023-07-05 Thread Richard Henderson
On 7/4/23 16:49, Philippe Mathieu-Daudé wrote: Following docs/devel/style.rst guidelines, rename icp_pit_state using CamelCase as IntegratorPIT (PIT is an acronym). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/timer/arm_timer.c | 12 ++-- 1 file changed, 6 i

  1   2   3   >