Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-26 Thread Thomas Huth
On 15/05/2023 14.48, Frederic Barrat wrote: On 11/05/2023 11:15, Alexander Bulekov wrote: On 230511 1104, Cédric Le Goater wrote: Hello Alexander On 5/11/23 10:53, Alexander Bulekov wrote: As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas

[PATCH v3 7/7] target/riscv: Remove pc_succ_insn from DisasContext

2023-05-26 Thread Weiwei Li
pc_succ_insn is no longer useful after the introduce of cur_insn_len and all pc related value use diff value instead of absolute value. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/translate.c | 7 +--

[PATCH v3 3/7] target/riscv: Change gen_goto_tb to work on displacements

2023-05-26 Thread Weiwei Li
Reduce reliance on absolute value to prepare for PC-relative translation. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/translate.c| 8 +-

[PATCH v3 1/7] target/riscv: Fix target address to update badaddr

2023-05-26 Thread Weiwei Li
Compute the target address before storing it into badaddr when mis-aligned exception is triggered. Use a target_pc temp to store the target address to avoid the confusing operation that udpate target address into cpu_pc before misalign check, then update it into badaddr and restore cpu_pc to curren

[PATCH v3 5/7] target/riscv: Use true diff for gen_pc_plus_diff

2023-05-26 Thread Weiwei Li
Reduce reliance on absolute values by using true pc difference for gen_pc_plus_diff() to prepare for PC-relative translation. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_rvi.c.inc | 6 +

[PATCH v3 6/7] target/riscv: Enable PC-relative translation

2023-05-26 Thread Weiwei Li
Add a base pc_save for PC-relative translation(CF_PCREL). Diable the directly sync pc from tb by riscv_cpu_synchronize_from_tb. Use gen_pc_plus_diff to get the pc-relative address. Enable CF_PCREL in System mode. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderso

[PATCH v3 2/7] target/riscv: Introduce cur_insn_len into DisasContext

2023-05-26 Thread Weiwei Li
Use cur_insn_len to store the length of the current instruction to prepare for PC-relative translation. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH v3 0/7] target/riscv: Add support for PC-relative translation

2023-05-26 Thread Weiwei Li
This patchset tries to add support for PC-relative translation. The existence of CF_PCREL can improve performance with the guest kernel's address space randomization. Each guest process maps libc.so (et al) at a different virtual address, and this allows those translations to be shared. And supp

[PATCH v3 4/7] target/riscv: Change gen_set_pc_imm to gen_update_pc

2023-05-26 Thread Weiwei Li
Reduce reliance on absolute values(by passing pc difference) to prepare for PC-relative translation. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_privileged.c.inc | 2 +- target/riscv/insn

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-26 Thread Thomas Huth
On 17/05/2023 15.54, Daniel P. Berrangé wrote: We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on throwaway feature branches. This fixed tag causes problems running CI upstream in stable staging branches, ho

Re: [PATCH qemu 1/1] [meson.build] Add conditional dependency for libkeyutils

2023-05-26 Thread Thomas Huth
Hi! On 22/05/2023 02.12, ~_6d6178667269747a wrote: There is something weird with your setup (sender name is "~_6d6178667269747a" ?) From: Max Fritz This modification enables better control over the inclusion of libkeyutils based on the configuration, enhancing the flexibility of the build

Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-26 Thread Cédric Le Goater
On 5/26/23 09:06, Thomas Huth wrote: On 15/05/2023 14.48, Frederic Barrat wrote: On 11/05/2023 11:15, Alexander Bulekov wrote: On 230511 1104, Cédric Le Goater wrote: Hello Alexander On 5/11/23 10:53, Alexander Bulekov wrote: As lpc-hc is designed for re-entrant calls from xscom, mark it r

[PATCH v1] vhost: release memory objects in error path

2023-05-26 Thread P J P
From: Prasad Pandit vhost_dev_start function does not release memory objects in case of an error. This may crash the guest with: stack trace of thread 125653: Program terminated with signal SIGSEGV, Segmentation fault #0 memory_listener_register (qemu-kvm + 0x6cda0f) #1 vhost_dev_start

[PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-26 Thread Cédric Le Goater
From: Alexander Bulekov As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov [clg: mark opb_master_regs as re-entrancy safe also ] Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_lpc.c | 3 +++ 1 file change

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-26 Thread Andrea Bolognani
On Fri, May 26, 2023 at 08:39:07AM +0200, Andrew Jones wrote: > On Thu, May 25, 2023 at 11:03:52AM -0700, Andrea Bolognani wrote: > > With these patches applied, libvirt built from the master branch, > > edk2 built from your branch and a JSON firmware descriptor for it > > installed (attached), it'

Re: [PATCH v1 1/1] hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0

2023-05-26 Thread Juan Quintela
Jiri Denemark wrote: > On Thu, May 11, 2023 at 13:43:47 +0200, Juan Quintela wrote: >> "Michael S. Tsirkin" wrote: >> >> [Added libvirt people to the party, see the end of the message ] > > Sorry, I'm not that much into parties :-) > >> That would fix the: >> >> qemu-8.0 -M pc-7.2 -> qemu-8.0.1

Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-26 Thread Frederic Barrat
On 26/05/2023 09:38, Cédric Le Goater wrote: From: Alexander Bulekov As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov [clg: mark opb_master_regs as re-entrancy safe also ] Signed-off-by: Cédric Le Go

Re: [PATCH 0/5] Restore vmstate on cancelled/failed migration

2023-05-26 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 18.05.23 14:23, Juan Quintela wrote: >> Vladimir Sementsov-Ogievskiy wrote: >>> Hi all. >>> >>> The problem I want to solve is that guest-panicked state may be lost >>> when migration is failed (or cancelled) after source stop. >>> >>> Still, I try to go f

Re: io-qcow2 failures on zfs

2023-05-26 Thread Thomas Huth
On 25/05/2023 20.29, Richard Henderson wrote: Ping. On 5/19/23 15:44, Richard Henderson wrote: I'm doing some testing on one of the Linaro build machines and I reliably see Summary of Failures: 712/790 qemu:block / io-qcow2-150 ERROR 5

Re: [PATCH v2 02/16] migration: Correct transferred bytes value

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: >> We forget several places to add to trasferred amount of data. With >> this fixes I get: >> >>qemu_file_transferred() + multifd_bytes == transferred >> >> The only place whrer this is not true is during devices

Re: [PATCH v3 0/4] hw/arm/sbsa-ref: platform version 0.1

2023-05-26 Thread Marcin Juszkiewicz
W dniu 25.05.2023 o 12:08, Peter Maydell pisze: The cover message subject says there should be 4 patches in this series, but there are only 3 listed here and only 3 emails arrived on list. Is there a missing patch? I am sorry for mess - 4th patch turned out to be WIP one so I removed it.

Re: Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-26 Thread Lukáš Doktor
Dne 25. 05. 23 v 17:21 Stefan Hajnoczi napsal(a): > On Thu, 25 May 2023 at 06:18, Lukáš Doktor wrote: >> the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest poll >> handlers - as a performance improvement when using multiple concurrent jobs >> and 4k (22%) as well as 1024k (63

Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-26 Thread Thomas Huth
On 26/05/2023 09.38, Cédric Le Goater wrote: From: Alexander Bulekov As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov [clg: mark opb_master_regs as re-entrancy safe also ] Signed-off-by: Cédric Le Goate

Re: [PATCH v2 03/16] migration: Move setup_time to mig_stats

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: >> It is a time that needs to be cleaned each time cancel migration. >> Once there create migration_time_since() to calculate how time since a >> time in the past. >> >> Signed-off-by: Juan Quintela >> >> --- >> >>

Re: [PATCH v2 04/16] qemu-file: Account for rate_limit usage on qemu_fflush()

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:56 +0200, Juan Quintela wrote: >> That is the moment we know we have transferred something. >> >> Signed-off-by: Juan Quintela >> Reviewed-by: Cédric Le Goater >> --- >> migration/qemu-file.c | 7 +++ >> 1 file changed, 3 insertions(+), 4 del

Re: [PATCH v2 08/16] migration: Use migration_transferred_bytes() to calculate rate_limit

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Cédric Le Goater >> --- >> migration/migration-stats.h | 8 +++- >> migration/migration-stats.c | 7 +-- >> migration/migration.c | 2 +- >> 3 files chang

[PATCH] monitor: remove more unnecessary atomics

2023-05-26 Thread Paolo Bonzini
Simplify monitor_cleanup by: - using main_loop_wait() to poll both the block layer AioContext and the I/O handlers - using a bottom half to clear qmp_dispatcher_co; this removes the atomics but also forces an exit out of main_loop_wait. Signed-off-by: Paolo Bonzini --- monitor/monitor.c |

[PATCH] atomics: eliminate mb_read/mb_set

2023-05-26 Thread Paolo Bonzini
qatomic_mb_read and qatomic_mb_set were the very first atomic primitives introduced for QEMU; their semantics are unclear and they provide a false sense of safety. The last use of qatomic_mb_read() has been removed, so delete it. qatomic_mb_set() instead can survive as an optimized qatomic_set()+s

Re: [PATCH v2 09/16] migration: We don't need the field rate_limit_used anymore

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: >> Since previous commit, we calculate how much data we have send with >> migration_transferred_bytes() so no need to maintain this counter and >> remember to always update it. >> >> Signed-off-by: Juan Quintela >> Re

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-26 Thread Sunil V L
On Fri, May 26, 2023 at 03:49:11AM -0400, Andrea Bolognani wrote: > On Fri, May 26, 2023 at 08:39:07AM +0200, Andrew Jones wrote: > > On Thu, May 25, 2023 at 11:03:52AM -0700, Andrea Bolognani wrote: > > > With these patches applied, libvirt built from the master branch, > > > edk2 built from your

Re: [PATCH v2 15/16] migration/rdma: Simplify the function that saves a page

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: >> When we sent a page through QEMUFile hooks (RDMA) there are three >> posiblities: >> - We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and >> control_save_page() returns false to let anything else to proceed

Re: [PATCH v2 16/16] migration/multifd: Compute transferred bytes correctly

2023-05-26 Thread Juan Quintela
Leonardo Brás wrote: > On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: >> In the past, we had to put the in the main thread all the operations >> related with sizes due to qemu_file not beeing thread safe. As now >> all counters are atomic, we can update the counters just after the >> do

Re: [PATCH 03/12] block: Take main AioContext lock when calling bdrv_open()

2023-05-26 Thread Kevin Wolf
Am 25.05.2023 um 20:20 hat Stefan Hajnoczi geschrieben: > On Thu, May 25, 2023 at 02:47:04PM +0200, Kevin Wolf wrote: > > The function documentation already says that all callers must hold the > > main AioContext lock, but not all of them do. This can cause assertion > > failures when functions cal

Re: [PATCH 2/5] migration: never fail in global_state_store()

2023-05-26 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Actually global_state_store() can never fail. Let's get rid of extra > error paths. > > To make things clear, use new runstate_get() and use same approach for > global_state_store() and global_state_store_running(). > > Signed-off-by: Vladimir Sementsov-Ogievs

Re: [PATCH 2/4] hw/i386/microvm: Simplify using object_dynamic_cast()

2023-05-26 Thread Sergio Lopez
On Tue, May 23, 2023 at 08:12:05AM +0200, Philippe Mathieu-Daudé wrote: > Use object_dynamic_cast() to determine if 'dev' is a TYPE_VIRTIO_MMIO. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/microvm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Sergio Lope

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-26 Thread Andrew Jones
On Fri, May 26, 2023 at 03:49:11AM -0400, Andrea Bolognani wrote: > On Fri, May 26, 2023 at 08:39:07AM +0200, Andrew Jones wrote: > > On Thu, May 25, 2023 at 11:03:52AM -0700, Andrea Bolognani wrote: > > > With these patches applied, libvirt built from the master branch, > > > edk2 built from your

Re: Re: [PATCH] cryptodev: fix memory leak during stats query

2023-05-26 Thread zhenwei pi
On 5/3/23 20:59, Peter Maydell wrote: On Wed, 3 May 2023 at 12:54, zhenwei pi wrote: object_get_canonical_path already returns newly allocated memory, this means no additional g_strdup required. Remove g_strdup to avoid memory leak. Fixes: Coverity CID 1508074 Fixes: f2b901098 ("cryptodev:

Re: [PATCH 06/12] qcow2: Fix open with 'file' in iothread

2023-05-26 Thread Kevin Wolf
Am 25.05.2023 um 20:51 hat Stefan Hajnoczi geschrieben: > On Thu, May 25, 2023 at 02:47:07PM +0200, Kevin Wolf wrote: > > qcow2_open() doesn't work correctly when opening the 'file' child moves > > bs to an iothread, for several reasons: > > > > - It uses BDRV_POLL_WHILE() to wait for the qcow2_op

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-26 Thread Andrea Bolognani
On Fri, May 26, 2023 at 10:34:36AM +0200, Andrew Jones wrote: > On Fri, May 26, 2023 at 03:49:11AM -0400, Andrea Bolognani wrote: > > So, are edk2 users the only ones who would (temporarily) need to > > manually turn ACPI off if virt-manager started enabling it by > > default? > > I assume so, but

RE: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-26 Thread Liu, Yi L
> From: Jason Wang > Sent: Friday, May 26, 2023 2:28 PM > > On Fri, May 26, 2023 at 2:22 PM Duan, Zhenzhong > wrote: > > > > > > >-Original Message- > > >From: Peter Xu > > >Sent: Thursday, May 25, 2023 9:54 PM > > >Subject: Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP >

Re: [PATCH v2] migration: hold the BQL during setup

2023-05-26 Thread Juan Quintela
Fiona Ebner wrote: > This is intended to be a semantic revert of commit 9b09503752 > ("migration: run setup callbacks out of big lock"). There have been so > many changes since that commit (e.g. a new setup callback > dirty_bitmap_save_setup() that also needs to be adapted now), it's > easier to d

Re: [PULL 09/12] migration: Use migration_transferred_bytes() to calculate rate_limit

2023-05-26 Thread Juan Quintela
Fiona Ebner wrote: > Am 18.05.23 um 19:13 schrieb Juan Quintela: >> diff --git a/migration/migration-stats.c b/migration/migration-stats.c >> index feec7d7369..97759a45f3 100644 >> --- a/migration/migration-stats.c >> +++ b/migration/migration-stats.c >> @@ -24,7 +24,9 @@ bool migration_rate_excee

Re: query-command-line-options

2023-05-26 Thread Markus Armbruster
Stefan, one question regarding your commit 40e07370f21 inline. Peter Krempa writes: [...] > In fact I strive to eliminate it after your suggestions, but we can't > still detect the few outstanding flags from anywhere else. > > List of currently outstanding queries using query-command-line-optio

Re: [PATCH v2 01/20] target/arm: Add commentary for CPUARMState.exclusive_high

2023-05-26 Thread Philippe Mathieu-Daudé
Hi, On 26/5/23 01:25, Richard Henderson wrote: Document the meaning of exclusive_high in a big-endian context, and why we can't change it now. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h

Re: [PATCH 06/12] qcow2: Fix open with 'file' in iothread

2023-05-26 Thread Kevin Wolf
Am 26.05.2023 um 10:40 hat Kevin Wolf geschrieben: > Am 25.05.2023 um 20:51 hat Stefan Hajnoczi geschrieben: > > On Thu, May 25, 2023 at 02:47:07PM +0200, Kevin Wolf wrote: > > > qcow2_open() doesn't work correctly when opening the 'file' child moves > > > bs to an iothread, for several reasons: >

Re: [PATCH v2 0/4] tests/decode: Convert tests to meson

2023-05-26 Thread Philippe Mathieu-Daudé
On 26/5/23 04:12, Richard Henderson wrote: Richard Henderson (4): decodetree: Add --test-for-error decodetree: Fix recursion in prop_format and build_tree decodetree: Diagnose empty pattern group tests/decode: Convert tests to meson Reviewed-by: Philippe Mathieu-Daudé

[PULL 08/15] tests/qtest/usb-hcd-uhci-test: Check whether "usb-storage" is available

2023-05-26 Thread Thomas Huth
The "usb-storage" device might not have been compiled into the binary (e.g. when compiling with "--without-default-devices"), so we have to check first before using it. Message-Id: <20230525081016.1870364-2-th...@redhat.com> Reviewed-by: Ani Sinha Signed-off-by: Thomas Huth --- tests/qtest/usb-

[PULL 10/15] tests/qtest/rtl8139-test: Check whether the rtl8139 device is available

2023-05-26 Thread Thomas Huth
Though we are already using CONFIG_RTL8139_PCI in the meson.build file for testing whether the rtl8139 device is available or not, this is not enough: The CONFIG switch might have been selected by another target (e.g. the mips fuloong2e machine has the rtl8139 chip soldered on the board), so CONFIG

[PULL 04/15] hw/loongarch64: Use MachineClass->default_nic in the virt machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230523110435.1375774-5-th...@redhat.co

[PULL 14/15] lsi53c895a: disable reentrancy detection for MMIO region, too

2023-05-26 Thread Thomas Huth
While trying to use a SCSI disk on the LSI controller with an older version of Fedora (25), I'm getting: qemu: warning: Blocked re-entrant IO on MemoryRegion: lsi-mmio at addr: 0x34 and the SCSI controller is not usable. Seems like we have to disable the reentrancy checker for the MMIO region, t

[PULL 00/15] Improve --without-default-devices testing, fix CVE-2023-0330

2023-05-26 Thread Thomas Huth
The following changes since commit a3cb6d5004ff638aefe686ecd540718a793bd1b1: Merge tag 'pull-tcg-20230525' of https://gitlab.com/rth7680/qemu into staging (2023-05-25 11:11:52 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2023-05-26 for

[PULL 12/15] tests/qtest/ac97-test: add up-/downsampling tests

2023-05-26 Thread Thomas Huth
From: Volker Rümelin Test if the audio subsystem can handle extreme up- and down- sampling ratios like 44100/1 and 1/44100. For some time these used to trigger QEMU aborts. The test was taken from https://gitlab.com/qemu-project/qemu/-/issues/71 where it was used to demonstrate a very different i

[PULL 07/15] hw/mips: Use MachineClass->default_nic in the virt machine

2023-05-26 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Inspired-by: Thomas Hu

[PULL 03/15] hw/arm: Use MachineClass->default_nic in the virt machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230523110435.1375774-4-th...@redhat.co

[PULL 02/15] hw/alpha: Use MachineClass->default_nic in the alpha machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230523110435.1375774-3-th...@redhat.co

[PULL 01/15] hw/hppa: Use MachineClass->default_nic in the hppa machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230523110435.1375774-2-th...@redhat.co

[PULL 11/15] tests/qtest/usb-hcd-ehci-test: Check for EHCI and UHCI HCDs before using them

2023-05-26 Thread Thomas Huth
The devices might not be available in the binary (e.g. when compiling with "--without-default-devices"), so we have to check before we can use them. Message-Id: <20230525081016.1870364-5-th...@redhat.com> Reviewed-by: Ani Sinha Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-ehci-test.c | 5

[PULL 06/15] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230524082037.1620952-1-th...@redhat.co

[PULL 13/15] machine: do not crash if default RAM backend name has been stolen

2023-05-26 Thread Thomas Huth
From: Igor Mammedov QEMU aborts when default RAM backend should be used (i.e. no explicit '-machine memory-backend=' specified) but user has created an object which 'id' equals to default RAM backend name used by board. $QEMU -machine pc \ -object memory-backend-ram,id=pc.ram,size=429496

[PULL 05/15] hw/xtensa: Use MachineClass->default_nic in the virt machine

2023-05-26 Thread Thomas Huth
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230523110435.1375774-6-th...@redhat.co

[PULL 15/15] hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330)

2023-05-26 Thread Thomas Huth
We cannot use the generic reentrancy guard in the LSI code, so we have to manually prevent endless reentrancy here. The problematic lsi_execute_script() function has already a way to detect whether too many instructions have been executed - we just have to slightly change the logic here that it als

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-05-26 Thread Andrew Jones
On Fri, May 26, 2023 at 04:42:57AM -0400, Andrea Bolognani wrote: > On Fri, May 26, 2023 at 10:34:36AM +0200, Andrew Jones wrote: > > On Fri, May 26, 2023 at 03:49:11AM -0400, Andrea Bolognani wrote: > > > So, are edk2 users the only ones who would (temporarily) need to > > > manually turn ACPI off

[PULL 09/15] tests/qtest: Check for virtio-blk before using -cdrom with the arm virt machine

2023-05-26 Thread Thomas Huth
The arm "virt" machine needs "virtio-blk-pci" for devices that get attached via the "-cdrom" option. Since this is an optional device that might not be available in the binary, we should check for the availability of this device first before using it. Message-Id: <20230525081016.1870364-3-th...@re

Re: [RFC PATCH 2/6] block: Mark bdrv_co_get_allocated_file_size() as mixed

2023-05-26 Thread Kevin Wolf
Am 23.05.2023 um 23:38 hat Fabiano Rosas geschrieben: > Some callers of this function are about to be converted to use > coroutines, so allow it to be executed both inside and outside a > coroutine. > > Signed-off-by: Fabiano Rosas This is not a sufficient justification for introducing a new mix

Re: [PATCH v2 14/27] tests/vm: add py310-expat to NetBSD

2023-05-26 Thread Philippe Mathieu-Daudé
On 16/5/23 12:58, Paolo Bonzini wrote: From: John Snow NetBSD cannot successfully run "ensurepip" without access to the pyexpat module, which NetBSD debundles. Like the Debian patch, it would be strictly faster long term to install pip/setuptools, and I recommend developers at their workstation

Re: [PATCH v2 13/27] tests/vm: Configure netbsd to use Python 3.10

2023-05-26 Thread Philippe Mathieu-Daudé
On 16/5/23 12:58, Paolo Bonzini wrote: From: John Snow NetBSD removes some packages from the Python stdlib, but only re-packages them for Python 3.10. Switch to using Python 3.10. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Message-Id: <20230511035435.734312-13-js...@redhat.com>

Re: [PATCH v2 12/27] tests/docker: add python3-venv dependency

2023-05-26 Thread Philippe Mathieu-Daudé
On 16/5/23 12:58, Paolo Bonzini wrote: From: John Snow Several debian-based tests need the python3-venv dependency as a consequence of Debian debundling the "ensurepip" module normally included with Python. As mkvenv.py stands as of this commit, Debian requires EITHER: (A) setuptools and pip,

Re: [PATCH] qapi: better docs for calc-dirty-rate and friends

2023-05-26 Thread gudkov . andrei--- via
On Thu, May 25, 2023 at 03:08:35PM +0200, Markus Armbruster wrote: > Andrei Gudkov writes: > > > Rewrote calc-dirty-rate documentation. Briefly described > > different modes of dirty page rate measurement. Added some > > examples. Fixed obvious grammar errors. > > > > Signed-off-by: Andrei Gudkov

[PULL 1/2] target/loongarch: Fix LD/ST{LE/GT} instructions get wrong CSR_ERA and CSR_BADV

2023-05-26 Thread Song Gao
1.helper_asrtle_d/helper_asrtgt_d need use GETPC() to get PC; 2 LD/ST{LE/GT} need set CSR_BADV = gpr[rj]; 3 ASRTLE.D/ASRTGT.D also write CSR_BADV, but this value is random and has no reference value. Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <20230515130042.2719712-1-g

[PULL 2/2] target/loongarch: Fix the vinsgr2vr/vpickve2gr instructions cause system coredump

2023-05-26 Thread Song Gao
The vinsgr2vr/vpickve2gr instructions need use get_src/get_dst to get gpr registers value, not cpu_gpr[]. The $zero register does not have cpu_gpr[0] allocated. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1662 Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <20230

[PULL 0/2] loongarch-to-apply queue

2023-05-26 Thread Song Gao
The following changes since commit a3cb6d5004ff638aefe686ecd540718a793bd1b1: Merge tag 'pull-tcg-20230525' of https://gitlab.com/rth7680/qemu into staging (2023-05-25 11:11:52 -0700) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarc

Re: [RFC PATCH 5/6] block: Allow bdrv_get_allocated_file_size to run in bdrv context

2023-05-26 Thread Kevin Wolf
Am 23.05.2023 um 23:39 hat Fabiano Rosas geschrieben: > We're about to move calls to 'fstat' into the thread-pool to avoid > blocking VCPU threads should the system call take too long. > > To achieve that we first need to make sure none of its callers is > holding the aio_context lock, otherwise y

Re: [PATCH v1 2/3] memory-device: Factor out device memory initialization into memory_devices_init()

2023-05-26 Thread David Hildenbrand
On 25.05.23 15:30, Philippe Mathieu-Daudé wrote: Hi David, On 23/5/23 20:51, David Hildenbrand wrote: Let's factor the common setup out, to prepare for further changes. On arm64, we'll add the subregion to system RAM now earlier -- which shouldn't matter, because the system RAM memory region s

Re: [PATCH v4 3/3] docs/system: riscv: Add pflash usage details

2023-05-26 Thread Philippe Mathieu-Daudé
On 25/5/23 18:48, Sunil V L wrote: pflash devices can be used in virt machine for different purposes like for ROM code or S-mode FW payload. Add a section in the documentation on how to use pflash devices for different purposes. Signed-off-by: Sunil V L --- docs/system/riscv/virt.rst | 29 +++

Re: [PATCH v2 01/20] target/arm: Add commentary for CPUARMState.exclusive_high

2023-05-26 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > Hi, > > On 26/5/23 01:25, Richard Henderson wrote: >> Document the meaning of exclusive_high in a big-endian context, >> and why we can't change it now. >> Signed-off-by: Richard Henderson >> --- >> target/arm/cpu.h | 7 +++ >> 1 file changed, 7 insertions(+

Re: [PATCH v4 2/3] riscv/virt: Support using pflash via -blockdev option

2023-05-26 Thread Philippe Mathieu-Daudé
On 25/5/23 18:48, Sunil V L wrote: Currently, pflash devices can be configured only via -pflash or if=pflash options. This is the legacy way and the better way is to use -blockdev as in other architectures. libvirt also has moved to -blockdev method. To support -blockdev option, pflash devices n

Re: [PATCH v2] migration: hold the BQL during setup

2023-05-26 Thread Juan Quintela
Fiona Ebner wrote: Nak Sometimes it works, and sometimes it hangs. When I was preparing with make check to send the pull request, I got this: Thread 5 (Thread 0x7f01d6ffd6c0 (LWP 921583) "live_migration"): #0 0x7f0217ff81d9 in __futex_abstimed_wait_common64 (private=0, cancel=true, abst

[PATCH v2 0/5] gitlab: improvements to handling of stable staging branches

2023-05-26 Thread Daniel P . Berrangé
We just (re)discovered that our gitlab rules don't work nicely with pipelines running from stable staging branches. Every pipeline gets published with the 'latest' tag, whether its the main staging branch or one of the stable staging branches. If pipelines for multiple staging branches run concurre

[PATCH v2 2/5] gitlab: allow overriding name of the upstream repository

2023-05-26 Thread Daniel P . Berrangé
The CI rules have special logic for what happens in upstream. To enable contributors who modify CI rules to test this logic, however, they need to be able to override which repo is considered upstream. This introduces the 'QEMU_CI_UPSTREAM' variable git push gitlab -o ci.variable=QEMU_CI_UPSTRE

[PATCH v2 3/5] gitlab: stable staging branches publish containers in a separate tag

2023-05-26 Thread Daniel P . Berrangé
If the stable staging branches publish containers under the 'latest' tag they will clash with containers published on the primary staging branch, as well as with each other. This introduces logic that overrides the container tag when jobs run against the stable staging branches. The CI_COMMIT_REF

[PATCH v2 4/5] gitlab: avoid extra pipelines for tags and stable branches

2023-05-26 Thread Daniel P . Berrangé
In upstream context we only run pipelines on staging branches, and limited publishing jobs on the default branch. We don't want to run pipelines on stable branches, or tags, because the content will have already been tested on a staging branch before getting pushed. Reviewed-by: Michael Tokarev

[PATCH v2 1/5] gitlab: centralize the container tag name

2023-05-26 Thread Daniel P . Berrangé
We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on throwaway feature branches. This fixed tag causes problems running CI upstream in stable staging branches, however, because the stable staging branch will pub

[PATCH v2 5/5] gitlab: support disabling job auto-run in upstream

2023-05-26 Thread Daniel P . Berrangé
In forks QEMU_CI=1 can be used to create a pipeline but not auto-run any jobs. In upstream jobs always auto-run, which is equiv of QEMU_CI=2. This supports setting QEMU_CI=1 in upstream, to disable job auto-run. This can be used to preserve CI minutes if repushing a branch to staging with a specif

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-26 Thread Daniel P . Berrangé
On Fri, May 26, 2023 at 09:25:39AM +0200, Thomas Huth wrote: > On 17/05/2023 15.54, Daniel P. Berrangé wrote: > > We use a fixed container tag of 'latest' so that contributors' forks > > don't end up with an ever growing number of containers as they work > > on throwaway feature branches. > > > >

Re: [PATCH v4 2/3] riscv/virt: Support using pflash via -blockdev option

2023-05-26 Thread Sunil V L
On Fri, May 26, 2023 at 11:53:18AM +0200, Philippe Mathieu-Daudé wrote: > On 25/5/23 18:48, Sunil V L wrote: > > Currently, pflash devices can be configured only via -pflash > > or if=pflash options. This is the legacy way and the > > better way is to use -blockdev as in other architectures. > > li

[PATCH 0/3] docs: update x86 CPU model ABI matrix docs

2023-05-26 Thread Daniel P . Berrangé
Daniel P. Berrangé (3): docs: re-generate x86_64 ABI compatibility CSV scripts: drop comment about autogenerated CPU API file docs: fix highlighting of CPU ABI header rows docs/system/cpu-models-x86-abi.csv | 17 +++-- docs/system/cpu-models-x86.rst.inc | 2 +- scripts/cpu-x

[PATCH 3/3] docs: fix highlighting of CPU ABI header rows

2023-05-26 Thread Daniel P . Berrangé
The 'header-rows' directive indicates how many rows in the generated table are to be highlighted as headers. We only have one such row in the CSV file included. Signed-off-by: Daniel P. Berrangé --- docs/system/cpu-models-x86.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 2/3] scripts: drop comment about autogenerated CPU API file

2023-05-26 Thread Daniel P . Berrangé
The RST doc include can't be made to skip the comment, so it must be left out entirely. Signed-off-by: Daniel P. Berrangé --- scripts/cpu-x86-uarch-abi.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 82ff07582f..b6285247a1 1

[PATCH 1/3] docs: re-generate x86_64 ABI compatibility CSV

2023-05-26 Thread Daniel P . Berrangé
This picks up the new EPYC-Genoa & SapphireRapids CPUs, removes the now deleted Icelake-Client CPU, and adds the newer versions of many existing CPUs. Signed-off-by: Daniel P. Berrangé --- docs/system/cpu-models-x86-abi.csv | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-)

[PATCH] virtio: qmp: fix memory leak

2023-05-26 Thread Paolo Bonzini
The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and need not be allocated by the caller. Fixes Coverity CID 1508724. Signed-off-by: Paolo Bonzini --- hw/virtio/virtio-qmp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-qmp.c b/hw/v

Re: [PATCH] virtio: qmp: fix memory leak

2023-05-26 Thread Daniel P . Berrangé
On Fri, May 26, 2023 at 12:24:53PM +0200, Paolo Bonzini wrote: > The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and > need not be allocated by the caller. > > Fixes Coverity CID 1508724. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio-qmp.c | 11 +-- > 1 file cha

[PATCH] slirp: update wrap to latest master

2023-05-26 Thread Paolo Bonzini
It is recommended to use SSIZE_T for ssize_t on win32, but the commit that is being used for slirp.wrap uses int. Update to include the fix as well as the other bugfix commit "ip: Enforce strict aliasing". Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- subprojects/slirp.wrap | 2

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-26 Thread Thomas Huth
On 26/05/2023 12.20, Daniel P. Berrangé wrote: On Fri, May 26, 2023 at 09:25:39AM +0200, Thomas Huth wrote: On 17/05/2023 15.54, Daniel P. Berrangé wrote: We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on

Re: [PATCH qemu 1/1] [meson.build] Add conditional dependency for libkeyutils

2023-05-26 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 02:12:02AM +0200, ~_6d6178667269747a wrote: > From: Max Fritz > > This modification enables better control over the inclusion of libkeyutils > based on the configuration, enhancing the flexibility of the build system. > > Signed-off-by: Max Fritz > --- > meson.build | 7

Re: [PATCH 2/2] meson: Add static glib dependency for initrd-stress.img

2023-05-26 Thread Juan Quintela
Fabiano Rosas wrote: > We recently moved glib detection code to meson but the static libs > were left out. Add a specific dependency for stress.c which is linked > statically. > > $ make V=1 tests/migration/initrd-stress.img > > before: > cc -m64 -mcx16 -o tests/migration/stress ... -static -Wl,-

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-26 Thread Daniel P . Berrangé
On Fri, May 26, 2023 at 12:31:21PM +0200, Thomas Huth wrote: > On 26/05/2023 12.20, Daniel P. Berrangé wrote: > > On Fri, May 26, 2023 at 09:25:39AM +0200, Thomas Huth wrote: > > > On 17/05/2023 15.54, Daniel P. Berrangé wrote: > > > > We use a fixed container tag of 'latest' so that contributors'

Re: [PATCH 2/2] meson: Add static glib dependency for initrd-stress.img

2023-05-26 Thread Daniel P . Berrangé
On Thu, May 25, 2023 at 06:20:44PM -0300, Fabiano Rosas wrote: > We recently moved glib detection code to meson but the static libs > were left out. Add a specific dependency for stress.c which is linked > statically. > > $ make V=1 tests/migration/initrd-stress.img > > before: > cc -m64 -mcx16

Re: [PATCH] crypto: Always initialize splitkeylen

2023-05-26 Thread Daniel P . Berrangé
On Mon, May 22, 2023 at 08:47:37PM +0900, Akihiko Odaki wrote: > When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is > 12.1.0, the compiler complains as follows: > > In file included from /usr/include/string.h:535, > from /home/alarm/q/var/qemu/include/qemu/osdep.h:9

Re: Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-26 Thread Stefan Hajnoczi
On Fri, 26 May 2023 at 04:07, Lukáš Doktor wrote: > > Dne 25. 05. 23 v 17:21 Stefan Hajnoczi napsal(a): > > On Thu, 25 May 2023 at 06:18, Lukáš Doktor wrote: > >> the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest > >> poll handlers - as a performance improvement when using m

Re: query-command-line-options

2023-05-26 Thread Ján Tomko
On a Friday in 2023, Markus Armbruster wrote: { "sandbox", NULL, QEMU_CAPS_SECCOMP_SANDBOX }, Does option -sandbox exist? It does since v1.2. If CONFIG_SECCOMP is off, actually using it is a fatal error. Compiling out the option entirely would be more useful, I guess. Is this probe stil

  1   2   3   >