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] 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

[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

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 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

[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

[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:

[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,

[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 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:

[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:

[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

[PATCH v3 5/6] target/riscv: update APLIC and IMSIC to support KVM AIA

2023-05-26 Thread Yong-Xuan Wang
- Do not set the mmio operations of APLIC and IMSIC when using KVM AIA - Send interrupt signal to KVM AIA via KVM_IRQ_LINE API Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/intc/riscv_aplic.c | 19 +++ hw/intc/riscv_imsic.c | 16 +++- 2 files changed, 26

[PATCH v3 0/6] Add RISC-V KVM AIA Support

2023-05-26 Thread Yong-Xuan Wang
This series adds support for KVM AIA in RISC-V architecture. In order to test these patches, we require Linux with KVM AIA support which can be found in the qemu_kvm_aia branch at https://github.com/yong-xuan/linux.git This kernel branch is based on the riscv_aia_v1 branch available at

[PATCH v3 6/6] target/riscv: select KVM AIA in riscv virt machine

2023-05-26 Thread Yong-Xuan Wang
Select KVM AIA when the host kernel has in-kernel AIA chip support. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/riscv/virt.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 18b94888ab..57a07fa6c5 100644 --- a/hw/riscv/virt.c

[PATCH v3 1/6] update-linux-headers: sync-up header with Linux for KVM AIA support placeholder

2023-05-26 Thread Yong-Xuan Wang
Sync-up Linux header to get latest KVM RISC-V headers having AIA support. Note: This is a placeholder commit and could be replaced when all referenced Linux patchsets are mainlined. The linux-headers changes are from 2 different patchsets. [1]

Re: [PATCH v3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-26 Thread Alistair Francis
On Tue, May 23, 2023 at 8:29 PM Sunil V L wrote: > > Currently, virt machine supports two pflash instances each with > 32MB size. However, the first pflash is always assumed to > contain M-mode firmware and reset vector is set to this if > enabled. Hence, for S-mode payloads like EDK2, only one

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

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: [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 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: [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: [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

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 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

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

[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:

[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:

[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

[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

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

[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:

[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:

Re: [PATCH v2 3/3] cpu, qdict, vl: Enable printing options for CPU type

2023-05-26 Thread Markus Armbruster
This is really, really, *really* for maintainers of the code parsing -cpu to review. Code parsing -cpu: * parse_cpu_option() in cpu.c Eduardo Habkost (supporter:Machine core) Marcel Apfelbaum (supporter:Machine core) "Philippe Mathieu-Daudé" (reviewer:Machine core) Yanan Wang

[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 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

[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

[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

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

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

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

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:

[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:

[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:

[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-loongarch-20230526

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

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

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

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

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

[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 ---

[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

[PATCH v3 2/6] target/riscv: support the AIA device emulation with KVM enabled

2023-05-26 Thread Yong-Xuan Wang
Remove M mode AIA devices when using KVM acceleration Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/riscv/virt.c | 199 +--- 1 file changed, 105 insertions(+), 94 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index

[PATCH v3 3/6] target/riscv: check the in-kernel irqchip support

2023-05-26 Thread Yong-Xuan Wang
We check the in-kernel irqchip support when using KVM acceleration. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- target/riscv/kvm.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index 0f932a5b96..eb469e8ca5

[PATCH v3 4/6] target/riscv: Create an KVM AIA irqchip

2023-05-26 Thread Yong-Xuan Wang
implement a function to create an KVM AIA chip Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- target/riscv/kvm.c | 83 target/riscv/kvm_riscv.h | 3 ++ 2 files changed, 86 insertions(+) diff --git a/target/riscv/kvm.c

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

2023-05-26 Thread Andrew Jones
On Thu, May 25, 2023 at 11:03:52AM -0700, Andrea Bolognani wrote: > On Thu, May 25, 2023 at 10:18:00PM +0530, Sunil V L wrote: > > This series improves the pflash usage in RISC-V virt machine with solutions > > to > > below issues. > > > > 1) Currently the first pflash is reserved for ROM/M-mode

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

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

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

[PATCH v2 6/6] tests/tcg/tricore: Add recursion test for CSAs

2023-05-26 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 3 ++- tests/tcg/tricore/c/test_context_save_areas.c | 15 +++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/tricore/c/test_context_save_areas.c diff --git

[PATCH v2 4/6] target/tricore: Refactor PCXI/ICR register fields

2023-05-26 Thread Bastian Koppelmann
starting from ISA version 1.6.1 (previously known as 1.6P/E), some bitfields in PCXI and ICR have changed. We also refactor these registers using the register fields API. Signed-off-by: Bastian Koppelmann Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1453 --- v1 -> v2: - Created

[PATCH v2 5/6] target/tricore: Fix wrong PSW for call insns

2023-05-26 Thread Bastian Koppelmann
we were copying PSW into a local variable, updated PSW.CDE in the local and never wrote it back. So when we called save_context_upper() we were using the non-local version of PSW which did not contain the updated PSW.CDE. Signed-off-by: Bastian Koppelmann --- target/tricore/op_helper.c | 2 ++

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

2023-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Thursday, May 25, 2023 9:54 PM >Subject: Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP >calls > >On Thu, May 25, 2023 at 11:29:34AM +, Duan, Zhenzhong wrote: >> Hi Peter, >> >> See inline. >> >-Original Message- >>

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

2023-05-26 Thread Prasad Pandit
Hello Peter, all On Thu, 25 May 2023 at 18:33, Peter Xu wrote: > IIRC this bug used to only reproduce on rt kernels, is it still the case? > * Yes, it's a same crash. > Here besides doing correct unregister, does it also mean that even if > event_notifier_init() failed there's totally no

[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 +-

[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

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

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

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: [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

[PATCH v2 0/6] TriCore PCXI/ICR register fixes

2023-05-26 Thread Bastian Koppelmann
Hi, the main motivator for this series was https://gitlab.com/qemu-project/qemu/-/issues/1453. To test that I'm not screwing up this refactor I also extended the tests by C programs so we can test the PCXI/ICR registers by recursive function call. Through these tests I also found a problem, where

[PATCH v2 1/6] tests/tcg/tricore: Move asm tests into 'asm' directory

2023-05-26 Thread Bastian Koppelmann
this seperates these tests from the upcoming tests written in C. Also rename the compiled test to 'test_.asm.tst'. Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile.softmmu-target | 35 --- tests/tcg/tricore/{ => asm}/macros.h | 0 tests/tcg/tricore/{ =>

[PATCH v2 2/6] tests/tcg/tricore: Uses label for memory addresses

2023-05-26 Thread Bastian Koppelmann
the linker might rearrange sections, so lets reference memory by label name instead of addr + off. Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/asm/macros.h | 1 - tests/tcg/tricore/asm/test_ld_bu.S | 4 ++-- tests/tcg/tricore/asm/test_ld_h.S | 8 3 files changed, 6

[PATCH v2 3/6] tests/tcg/tricore: Add first C program

2023-05-26 Thread Bastian Koppelmann
this allows us to exercise the startup code used by GCC to call main(). Signed-off-by: Bastian Koppelmann --- configure | 1 + tests/tcg/tricore/Makefile.softmmu-target | 13 + tests/tcg/tricore/c/crt0-tc2x.S | 335 ++

Re: [PATCH v3 1/1] hw/arm/aspeed:Add vpd data for Rainier machine

2023-05-26 Thread Cédric Le Goater
On 5/25/23 21:57, Ninad Palsule wrote: Hello Cedric, On 5/25/23 1:37 AM, Cédric Le Goater wrote: [ ... ] However, regarding Cédric's log above, a reboot is expected on the first boot of a fresh image when there's valid VPD available. For the first boot of a fresh image we configure the

Re: [PATCH 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-05-26 Thread Thomas Huth
On 26/05/2023 07.05, Jeuk Kim wrote: Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI

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),

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

[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

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

[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 |

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 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é

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

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

2023-05-26 Thread Jason Wang
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 > >calls > > > >On Thu, May 25, 2023 at 11:29:34AM +, Duan, Zhenzhong

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,

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

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 ->

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

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

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

[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

[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

[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

[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

[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

  1   2   3   4   >