Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 01:10:15AM +0200, Paolo Bonzini wrote: > > > Il mer 28 set 2022, 00:09 Michael S. Tsirkin ha scritto: > > On Tue, Sep 27, 2022 at 11:44:56PM +0200, Paolo Bonzini wrote: > > I also second the idea of using avocado instead of pytest, by the way. > > > >

Re: [PATCH v7 2/2] i386: Add notify VM exit support

2022-09-27 Thread Paolo Bonzini
Il mer 28 set 2022, 04:21 Chenyi Qiang ha scritto: > >> +warn_report_once("KVM: encounter a notify exit with %svalid > >> context in" > >> + " guest. It means there can be possible > >> misbehaves in" > >> + " guest, please have a look.", >

Re: [PATCH v5 02/12] blkio: add libblkio block driver

2022-09-27 Thread Markus Armbruster
Stefan Hajnoczi writes: > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > high-performance disk I/O. It currently supports io_uring, > virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers > under development. > > One of the reasons for developing libblkio

Re: Re: [PATCH v2] disas/riscv.c: rvv: Add disas support for vector instructions

2022-09-27 Thread 刘阳
-Original Messages- From: "Alistair Francis" Sent Time: 2022-09-27 09:57:39 (Tuesday) To: "Yang Liu" Cc: "Palmer Dabbelt" , "Alistair Francis" , "Bin Meng" , "Tommy Wu" , "open list:RISC-V" , "qemu-devel@nongnu.org Developers" , wangjunqiang , "Wei Wu (吴伟)" , liweiwei

[PATCH v3] disas/riscv.c: rvv: Add disas support for vector instructions

2022-09-27 Thread Yang Liu
Tested with https://github.com/ksco/rvv-decoder-tests Expected checkpatch errors for consistency and brevity reasons: ERROR: line over 90 characters ERROR: trailing statements should be on next line ERROR: braces {} are necessary for all arms of this statement Signed-off-by: Yang Liu ---

[PATCH v1 2/2] riscv/opentitan: connect lifecycle controller

2022-09-27 Thread Wilfred Mallawa
From: Wilfred Mallawa Connects the ibex lifecycle controller with opentitan, with this change, we can now get past the lifecycle checks in the boot rom. Signed-off-by: Wilfred Mallawa --- hw/riscv/opentitan.c | 10 -- include/hw/riscv/opentitan.h | 2 ++ 2 files changed, 10

[PATCH v1 1/2] hw/misc: add ibex lifecycle controller

2022-09-27 Thread Wilfred Mallawa
From: Wilfred Mallawa Device model for the OpenTitan lifecycle controller as per [1]. Addition of this model is the first of many steps to adding `boot_rom` support for OpenTitan. The OpenTitan `boot_rom` needs to access the lifecycle controller during the init/test sequence before it jumps to

[PATCH v1 0/2] Add OpenTitan lifecycle controller

2022-09-27 Thread Wilfred Mallawa
From: Wilfred Mallawa This series of patches: - Add OpenTitan lifecycle controller with basic functionality - Connects it to OpenTitan Currently in OpenTitan, we skip the `boot_rom` since is has become more complex and we do not have all the support in QEMU to use it. One of the

Re: [PATCH] target/arm: Use the max page size in a 2-stage ptw

2022-09-27 Thread Zenghui Yu via
[ Fix Marc's email address ] On 2022/9/13 21:56, Richard Henderson wrote: We had only been reporting the stage2 page size. This causes problems if stage1 is using a larger page size (16k, 2M, etc), but stage2 is using a smaller page size, because cputlb does not set large_page_{addr,mask}

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Wed, Sep 28, 2022 at 08:38:54AM +0530, Ani Sinha wrote: > > I don't really care where we upload them but only having the > > latest version is just going to break anything expecting > > the old binary. > > In fairness, I am not entirely certain if there is a tight coupling > between the qemu

[PATCH] virtio: del net client if net_init_tap_one failed

2022-09-27 Thread luzhipeng
From: lu zhipeng If the net tap initializes successful, but failed during network card hot-plugging, the net-tap will remains, so cleanup. Signed-off-by: lu zhipeng --- net/tap.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/tap.c b/net/tap.c

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Ani Sinha
On Wed, Sep 28, 2022 at 2:48 AM Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2022 at 09:33:27AM +0100, Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 01:43:15PM +0530, Ani Sinha wrote: > > > On Sun, Sep 18, 2022 at 1:58 AM Michael S. Tsirkin > > > wrote: > > > > > > > > On Fri, Sep 16,

Re: [PATCH v7 2/2] i386: Add notify VM exit support

2022-09-27 Thread Chenyi Qiang
On 9/27/2022 9:43 PM, Paolo Bonzini wrote: On 9/23/22 09:33, Chenyi Qiang wrote: Because there are some concerns, e.g. a notify VM exit may happen with VM_CONTEXT_INVALID set in exit qualification (no cases are anticipated that would set this bit), which means VM context is corrupted. To

Re: [PATCH v7 1/2] i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple fault

2022-09-27 Thread Chenyi Qiang
On 9/27/2022 9:14 PM, Paolo Bonzini wrote: On 9/23/22 09:33, Chenyi Qiang wrote: For the direct triple faults, i.e. hardware detected and KVM morphed to VM-Exit, KVM will never lose them. But for triple faults sythesized by KVM, e.g. the RSM path, if KVM exits to userspace before the request

Re: [PATCH v2 1/3] hw/watchdog: wdt_ibex_aon.c: Implement the watchdog for the OpenTitan

2022-09-27 Thread Tyler Ng
Hi Eddie, On Tue, Sep 27, 2022 at 3:04 PM Dong, Eddie wrote: > Hi Tyler: > > > +} > > + > > +/* Called when the bark timer expires */ static void > > +ibex_aon_barker_expired(void *opaque) { > This may happen during ibex_aon_update_count(), right? > > > +IbexAONTimerState *s =

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-27 Thread Sean Christopherson
On Mon, Sep 26, 2022, David Hildenbrand wrote: > On 26.09.22 16:48, Kirill A. Shutemov wrote: > > On Mon, Sep 26, 2022 at 12:35:34PM +0200, David Hildenbrand wrote: > > > When using DAX, what happens with the shared <->private conversion? Which > > > "type" is supposed to use dax, which not? > > >

Re: [PATCH][RESEND] hyperv: fix SynIC SINT assertion failure on guest reset

2022-09-27 Thread Paolo Bonzini
Why does this need to be a virtual function, if it is the same for all CPUs (it differs between system and user-mode emulation, but it is never called by user-mode emulation so that does not matter)? Paolo Il mar 27 set 2022, 17:12 Maciej S. Szmigiero ha scritto: > From: "Maciej S. Szmigiero"

Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-27 Thread Paolo Bonzini
What is an example of one such huge path? This would mean that LTO is changing the set of tests that are run, which is unexpected. Paolo Il mar 27 set 2022, 23:35 Alex Bennée ha scritto: > It seems the depth of path we need to support can vary depending on > the order of the init constructors

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Paolo Bonzini
Il mer 28 set 2022, 00:09 Michael S. Tsirkin ha scritto: > On Tue, Sep 27, 2022 at 11:44:56PM +0200, Paolo Bonzini wrote: > > I also second the idea of using avocado instead of pytest, by the way. > > > > Paolo > > I do not think this is a good fit for bios tests. > bios tests are intended for a

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-27 Thread Sean Christopherson
On Mon, Sep 26, 2022, Fuad Tabba wrote: > Hi, > > On Mon, Sep 26, 2022 at 3:28 PM Chao Peng wrote: > > > > On Fri, Sep 23, 2022 at 04:19:46PM +0100, Fuad Tabba wrote: > > > > Then on the KVM side, its mmap_start() + mmap_end() sequence would: > > > > > > > > 1. Not be supported for TDX or

[PULL 2/2] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-27 Thread Alex Williamson
On error, vfio_get_iommu_info() frees and clears *info, but vfio_connect_container() continues to use the pointer regardless of the return value. Restructure the code such that a failure of this function triggers an error and clean up the remainder of the function, including updating an outdated

[PULL 1/2] vfio/migration: Fix incorrect initialization value for parameters in VFIOMigration

2022-09-27 Thread Alex Williamson
From: Kunkun Jiang The structure VFIOMigration of a VFIODevice is allocated and initialized in vfio_migration_init(). "device_state" and "vm_running" are initialized to 0, indicating that VFIO device is_STOP and VM is not-running. The initialization value is incorrect. According to the

[PULL 0/2] VFIO updates 2022-09-27

2022-09-27 Thread Alex Williamson
The following changes since commit dbc4f48b5ab3e6d85f78aa4df6bd6ad561c3d152: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2022-09-27 11:08:36 -0400) are available in the Git repository at: https://gitlab.com/alex.williamson/qemu.git

Re: [RFC PATCH v2 13/29] target/ppc: remove unused interrupts from p8_pending_interrupt

2022-09-27 Thread Fabiano Rosas
Matheus Ferst writes: > Remove the following unused interrupts from the POWER8 interrupt masking > method: > - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; > - Debug Interrupt: removed in Power ISA v2.07; > - Hypervisor Virtualization: introduced in Power ISA v3.0; > -

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2022 at 11:44:56PM +0200, Paolo Bonzini wrote: > I also second the idea of using avocado instead of pytest, by the way. > > Paolo I do not think this is a good fit for bios tests. bios tests are intended for a wide audience of ACPI developers across a variety of host systems.

Re: [PATCH v2] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-27 Thread B
Am 20. September 2022 05:29:25 UTC schrieb Bernhard Beschow : >Am 10. September 2022 15:11:17 UTC schrieb Bernhard Beschow >: >>GCC issues a false positive warning, resulting in build failure with -Werror: >> >> In file included from /usr/include/glib-2.0/glib.h:114, >> from

RE: [PATCH v2 1/3] hw/watchdog: wdt_ibex_aon.c: Implement the watchdog for the OpenTitan

2022-09-27 Thread Dong, Eddie
Hi Tyler: > +} > + > +/* Called when the bark timer expires */ static void > +ibex_aon_barker_expired(void *opaque) { This may happen during ibex_aon_update_count(), right? > +    IbexAONTimerState *s = IBEX_AON_TIMER(opaque); > +    if (ibex_aon_update_count(s) && This may happen

Re: qemu and -vga vs. -device

2022-09-27 Thread Adam Williamson
On Tue, 2022-09-27 at 13:34 -0300, Daniel Henrique Barboza wrote: > Hi Adam, > > On 9/26/22 06:26, Gerd Hoffmann wrote: > > On Sat, Sep 24, 2022 at 12:12:45AM -0700, Adam Williamson wrote: > > > On Mon, 2022-09-19 at 06:42 +0200, Gerd Hoffmann wrote: > > > > On Fri, Sep 16, 2022 at 10:02:17AM

RE: [PATCH v2 4/4] virtio-gpu: Don't require udmabuf when blob support is enabled

2022-09-27 Thread Kasireddy, Vivek
Hi Dmitry, > > On 9/27/22 11:32, Gerd Hoffmann wrote: > > On Mon, Sep 26, 2022 at 09:32:40PM +0300, Dmitry Osipenko wrote: > >> On 9/23/22 15:32, Gerd Hoffmann wrote: > >>> On Tue, Sep 13, 2022 at 12:50:22PM +0200, Antonio Caggiano wrote: > From: Dmitry Osipenko > > Host blobs

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Paolo Bonzini
Il dom 10 lug 2022, 19:01 Ani Sinha ha scritto: > This change adds python based test environment that can be used to run > pytest > from within a virtual environment. A bash script sets up a virtual > environment > and then runs the python based tests from within that environment. > All

[RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-27 Thread Alex Bennée
It seems the depth of path we need to support can vary depending on the order of the init constructors getting called. It seems --enable-lto shuffles things around just enough to push you over the limit. Signed-off-by: Alex Bennée Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186 ---

Re: [PATCH v2 10/11] pytest: add pytest to the meson build system

2022-09-27 Thread Michael S. Tsirkin
On Tue, Sep 06, 2022 at 02:10:56PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 12, 2022 at 12:22:10PM +0530, Ani Sinha wrote: > > > > > > On Mon, 11 Jul 2022, John Snow wrote: > > > > > On Sun, Jul 10, 2022 at 1:01 PM Ani Sinha wrote: > > > > > > > > Integrate the pytest framework with the

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2022 at 03:37:39PM +0530, Ani Sinha wrote: > > > > > > > > > > > > > > OK fine. Lets figuire out how to push bits somewhere in > > > > > > > git.qemu.org and > > > > > > > the binaries in some other repo first. Everything else hinges on > > > > > > > that. We > > > > > > > can

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2022 at 04:45:09PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 27, 2022 at 07:35:13PM +0530, Ani Sinha wrote: > > On Tue, Sep 27, 2022 at 5:12 PM Ani Sinha wrote: > > > > > > On Tue, Sep 27, 2022 at 3:48 PM Daniel P. Berrangé > > > wrote: > > > > > > > > On Tue, Sep 27, 2022

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2022 at 09:33:27AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 27, 2022 at 01:43:15PM +0530, Ani Sinha wrote: > > On Sun, Sep 18, 2022 at 1:58 AM Michael S. Tsirkin wrote: > > > > > > On Fri, Sep 16, 2022 at 09:30:42PM +0530, Ani Sinha wrote: > > > > On Thu, Jul 28, 2022 at

Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-09-27 Thread Paolo Bonzini
Il lun 26 set 2022, 14:21 Vladimir Sementsov-Ogievskiy < vsement...@yandex-team.ru> ha scritto: > On 9/18/22 20:12, Emanuele Giuseppe Esposito wrote: > >>> --- a/qemu-img.c > >>> +++ b/qemu-img.c > >>> @@ -911,7 +911,6 @@ static void run_block_job(BlockJob *job, Error > >>> **errp) > >>>

Re: [QEMU][PATCH 0/5] Introduce Xilinx Versal CANFD

2022-09-27 Thread Vikram Garhwal
Hi Peter, Thanks for pointing this. Looks like my configs are outdated. Will take care of this for v2. Regards, Vikram On 9/22/22 7:20 AM, Peter Maydell wrote: On Sat, 10 Sept 2022 at 09:15, Vikram Garhwal wrote: Hi, This patch implements CANFD controller for xlnx-versal-virt machine.

[RFC PATCH v2 29/29] target/ppc: move the p*_interrupt_powersave methods to excp_helper.c

2022-09-27 Thread Matheus Ferst
Move the methods to excp_helper.c and make them static. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 102 --- target/ppc/excp_helper.c | 102 +++ target/ppc/internal.h| 6 --- 3 files changed, 102

[RFC PATCH v2 27/29] target/ppc: introduce ppc_maybe_interrupt

2022-09-27 Thread Matheus Ferst
The method checks if any pending interrupt is unmasked and calls cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers or masks/unmasks interrupts should call this method to keep CPU_INTERRUPT_HARD coherent with env->pending_interrupts. Signed-off-by: Matheus Ferst --- v2: -

[RFC PATCH v2 26/29] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds

2022-09-27 Thread Matheus Ferst
Writes to LPCR are hypervisor privileged. Signed-off-by: Matheus Ferst --- The method introduced in the next patch, ppc_maybe_interrupt, will be called in ppc_store_lpcr and only available in !CONFIG_USER_ONLY builds. --- target/ppc/cpu.c | 2 ++ target/ppc/cpu.h | 2 +- 2 files changed, 3

[RFC PATCH v2 19/29] target/ppc: create an interrupt masking method for POWER7

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p7 to p7_next_unmasked_interrupt;

[RFC PATCH v2 25/29] target/ppc: add power-saving interrupt masking logic to p7_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p7_interrupt_powersave and use it in p7_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 2 +- target/ppc/excp_helper.c | 24 target/ppc/internal.h| 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git

[RFC PATCH v2 18/29] target/ppc: add power-saving interrupt masking logic to p8_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p8_interrupt_powersave and use it in p8_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 2 +- target/ppc/excp_helper.c | 24 target/ppc/internal.h| 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git

[RFC PATCH v2 24/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER7

2022-09-27 Thread Matheus Ferst
Move the interrupt masking logic out of cpu_has_work_POWER7 in a new method, p7_interrupt_powersave, that only returns an interrupt if it can wake the processor from power-saving mode. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 45

[RFC PATCH v2 23/29] target/ppc: remove generic architecture checks from p7_deliver_interrupt

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index de6972d002..ca594c3b9e 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@

[RFC PATCH v2 15/29] target/ppc: remove unused interrupts from p8_deliver_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER8 interrupt processing method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Debug Interrupt: removed in Power ISA v2.07; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Critical Input, Watchdog Timer, and

[RFC PATCH v2 22/29] target/ppc: remove unused interrupts from p7_deliver_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER7 interrupt processing method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Hypervisor Doorbell and Event-Based Branch: introduced in Power ISA v2.07; -

[RFC PATCH v2 20/29] target/ppc: remove unused interrupts from p7_pending_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER7 interrupt masking method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Hypervisor Doorbell and Event-Based Branch: introduced in Power ISA v2.07; - Critical

[RFC PATCH v2 12/29] target/ppc: create an interrupt masking method for POWER8

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p8 to p8_next_unmasked_interrupt - Processor-specific stuff

[RFC PATCH v2 21/29] target/ppc: create an interrupt delivery method for POWER7

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_deliver_interrupt, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 113 +++ 1 file changed, 113 insertions(+)

[RFC PATCH v2 14/29] target/ppc: create an interrupt delivery method for POWER8

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_deliver_interrupt, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 113 +++ 1 file changed, 113 insertions(+)

[RFC PATCH v2 11/29] target/ppc: add power-saving interrupt masking logic to p9_next_unmasked_interrupt

2022-09-27 Thread Matheus Ferst
Export p9_interrupt_powersave and use it in p9_next_unmasked_interrupt. Signed-off-by: Matheus Ferst --- Temporarily putting the prototype in internal.h for lack of a better place, we will un-export p9_interrupt_powersave in future patches. --- target/ppc/cpu_init.c| 2 +-

[RFC PATCH v2 16/29] target/ppc: remove generic architecture checks from p8_deliver_interrupt

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 4cbf6b29fc..2e8d4699a9 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@

[RFC PATCH v2 07/29] target/ppc: create an interrupt delivery method for POWER9/POWER10

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_deliver_interrupt, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 118 +++ 1 file changed, 118 insertions(+)

[RFC PATCH v2 09/29] target/ppc: remove generic architecture checks from p9_deliver_interrupt

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 603c956588..67e73f30ab 100644 --- a/target/ppc/excp_helper.c +++

[RFC PATCH v2 17/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER8

2022-09-27 Thread Matheus Ferst
Move the interrupt masking logic out of cpu_has_work_POWER8 in a new method, p8_interrupt_powersave, that only returns an interrupt if it can wake the processor from power-saving mode. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 61

[RFC PATCH v2 13/29] target/ppc: remove unused interrupts from p8_pending_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER8 interrupt masking method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Debug Interrupt: removed in Power ISA v2.07; - Hypervisor Virtualization: introduced in Power ISA v3.0; - Critical Input, Watchdog Timer, and Fixed

[RFC PATCH v2 08/29] target/ppc: remove unused interrupts from p9_deliver_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER9 interrupt processing method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970 and POWER5p; - Debug Interrupt: removed in Power ISA v2.07; - Critical Input, Watchdog Timer, and Fixed Interval Timer: only defined for embedded CPUs; -

[RFC PATCH v2 28/29] target/ppc: unify cpu->has_work based on cs->interrupt_request

2022-09-27 Thread Matheus Ferst
Now that cs->interrupt_request indicates if there is any unmasked interrupt, checking if the CPU has work to do can be simplified to a single check that works for all CPU models. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 94 +-- 1 file

[RFC PATCH v2 06/29] target/ppc: remove unused interrupts from p9_pending_interrupt

2022-09-27 Thread Matheus Ferst
Remove the following unused interrupts from the POWER9 interrupt masking method: - PPC_INTERRUPT_RESET: only raised for 6xx, 7xx, 970, and POWER5p; - Debug Interrupt: removed in Power ISA v2.07; - Critical Input, Watchdog Timer, and Fixed Interval Timer: only defined for embedded CPUs; -

[RFC PATCH v2 10/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER9

2022-09-27 Thread Matheus Ferst
Move the interrupt masking logic out of cpu_has_work_POWER9 in a new method, p9_interrupt_powersave, that only returns an interrupt if it can wake the processor from power-saving mode. No functional change intended. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 126

[RFC PATCH v2 03/29] target/ppc: split interrupt masking and delivery from ppc_hw_interrupt

2022-09-27 Thread Matheus Ferst
Split ppc_hw_interrupt into an interrupt masking method, ppc_next_unmasked_interrupt, and an interrupt processing method, ppc_deliver_interrupt. Signed-off-by: Matheus Ferst --- v2: - ppc_hw_interrupt renamed as ppc_deliver_interrupt (farosas); - Handle the "Wakeup from PM state but

[RFC PATCH v2 05/29] target/ppc: create an interrupt masking method for POWER9/POWER10

2022-09-27 Thread Matheus Ferst
The new method is identical to ppc_next_unmasked_interrupt_generic, processor-specific code will be added/removed in the following patches. No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Renamed the method from ppc_pending_interrupt_p9 to p9_next_unmasked_interrupt

[RFC PATCH v2 04/29] target/ppc: prepare to split interrupt masking and delivery by excp_model

2022-09-27 Thread Matheus Ferst
No functional change intended. Signed-off-by: Matheus Ferst --- v2: - Use "generic" instead of "legacy" to name the original methods (farosas). --- target/ppc/excp_helper.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/ppc/excp_helper.c

[RFC PATCH v2 02/29] target/ppc: always use ppc_set_irq to set env->pending_interrupts

2022-09-27 Thread Matheus Ferst
Use ppc_set_irq to raise/clear interrupts to ensure CPU_INTERRUPT_HARD will be set/reset accordingly. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 17 +++-- target/ppc/misc_helper.c | 9 ++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git

[RFC PATCH v2 00/29] PowerPC interrupt rework

2022-09-27 Thread Matheus Ferst
Link to v1: https://lists.gnu.org/archive/html/qemu-ppc/2022-08/msg00370.html This series is also available as a git branch: https://github.com/PPC64/qemu/tree/ferst-interrupt-fix-v2 This version addresses Fabiano's feedback and fixes some issues found with the tests suggested by Cédric. While

[RFC PATCH v2 01/29] target/ppc: define PPC_INTERRUPT_* values directly

2022-09-27 Thread Matheus Ferst
This enum defines the bit positions in env->pending_interrupts for each interrupt. However, except for the comparison in kvmppc_set_interrupt, the values are always used as (1 << PPC_INTERRUPT_*). Define them directly like that to save some clutter. No functional change intended. Reviewed-by:

Re: [Virtio-fs] virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-09-27 Thread Stefan Hajnoczi
On Tue, Sep 27, 2022 at 01:51:41PM -0400, Colin Walters wrote: > > > On Tue, Sep 27, 2022, at 1:27 PM, German Maglione wrote: > > > >> > Now all the development has moved to rust virtiofsd. > > Oh, awesome!! The code there looks great. > > > I could work on this for the next major version and

[PATCH v5 12/12] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-09-27 Thread Stefan Hajnoczi
Register guest RAM using BlockRAMRegistrar and set the BDRV_REQ_REGISTERED_BUF flag so block drivers can optimize memory accesses in I/O requests. This is for vdpa-blk, vhost-user-blk, and other I/O interfaces that rely on DMA mapping/unmapping. Signed-off-by: Stefan Hajnoczi ---

[PATCH v5 07/12] block: return errors from bdrv_register_buf()

2022-09-27 Thread Stefan Hajnoczi
Registering an I/O buffer is only a performance optimization hint but it is still necessary to return errors when it fails. Later patches will need to detect errors when registering buffers but an immediate advantage is that error_report() calls are no longer needed in block driver

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-27 Thread Greg Kurz
On Tue, 27 Sep 2022 19:14:33 +0200 Christian Schoenebeck wrote: > On Dienstag, 27. September 2022 15:05:13 CEST Linus Heckemann wrote: > > Christian Schoenebeck writes: > > > Ah, you sent this fix as a separate patch on top. I actually just meant > > > that you would take my already queued

[PATCH v5 10/12] stubs: add qemu_ram_block_from_host() and qemu_ram_get_fd()

2022-09-27 Thread Stefan Hajnoczi
The blkio block driver will need to look up the file descriptor for a given pointer. This is possible in softmmu builds where the RAMBlock API is available for querying guest RAM. Add stubs so tools like qemu-img that link the block layer still build successfully. In this case there is no guest

[PATCH v5 11/12] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-09-27 Thread Stefan Hajnoczi
Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGISTERED_BUF on I/O requests. Therefore no blkio_map_mem_region()

[PATCH v5 05/12] block: use BdrvRequestFlags type for supported flag fields

2022-09-27 Thread Stefan Hajnoczi
Use the enum type so GDB displays the enum members instead of printing a numeric constant. Signed-off-by: Stefan Hajnoczi --- include/block/block_int-common.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/block/block_int-common.h

[PATCH v5 04/12] block: pass size to bdrv_unregister_buf()

2022-09-27 Thread Stefan Hajnoczi
The only implementor of bdrv_register_buf() is block/nvme.c, where the size is not needed when unregistering a buffer. This is because util/vfio-helpers.c can look up mappings by address. Future block drivers that implement bdrv_register_buf() may not be able to do their job given only the buffer

[PATCH v5 09/12] exec/cpu-common: add qemu_ram_get_fd()

2022-09-27 Thread Stefan Hajnoczi
Add a function to get the file descriptor for a RAMBlock. Device emulation code typically uses the MemoryRegion APIs but vhost-style code may use RAMBlock directly for sharing guest memory with another process. This new API will be used by the libblkio block driver so it can share guest memory

[PATCH v5 08/12] block: add BlockRAMRegistrar

2022-09-27 Thread Stefan Hajnoczi
Emulated devices and other BlockBackend users wishing to take advantage of blk_register_buf() all have the same repetitive job: register RAMBlocks with the BlockBackend using RAMBlockNotifier. Add a BlockRAMRegistrar API to do this. A later commit will use this from hw/block/virtio-blk.c.

[PATCH v5 02/12] blkio: add libblkio block driver

2022-09-27 Thread Stefan Hajnoczi
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring, virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers under development. One of the reasons for developing libblkio is that other applications besides

[PATCH v5 06/12] block: add BDRV_REQ_REGISTERED_BUF request flag

2022-09-27 Thread Stefan Hajnoczi
Block drivers may optimize I/O requests accessing buffers previously registered with bdrv_register_buf(). Checking whether all elements of a request's QEMUIOVector are within previously registered buffers is expensive, so we need a hint from the user to avoid costly checks. Add a

[PATCH v5 03/12] numa: call ->ram_block_removed() in ram_block_notifer_remove()

2022-09-27 Thread Stefan Hajnoczi
When a RAMBlockNotifier is added, ->ram_block_added() is called with all existing RAMBlocks. There is no equivalent ->ram_block_removed() call when a RAMBlockNotifier is removed. The util/vfio-helpers.c code (the sole user of RAMBlockNotifier) is fine with this asymmetry because it does not rely

[PATCH v5 00/12] blkio: add libblkio BlockDriver

2022-09-27 Thread Stefan Hajnoczi
v5: - Drop "RFC" since libblkio 1.0 has been released and the library API is stable - Disable BDRV_REQ_REGISTERED_BUF if we run out of blkio_mem_regions. The bounce buffer slow path is taken when there are not enough blkio_mem_regions to cover guest RAM. [Hanna & David Hildenbrand] - Call

[PATCH v5 01/12] coroutine: add flag to re-queue at front of CoQueue

2022-09-27 Thread Stefan Hajnoczi
When a coroutine wakes up it may determine that it must re-queue. Normally coroutines are pushed onto the back of the CoQueue, but for fairness it may be necessary to push it onto the front of the CoQueue. Add a flag to specify that the coroutine should be pushed onto the front of the CoQueue. A

Re: [PATCH v5] 9pfs: use GHashTable for fid table

2022-09-27 Thread Christian Schoenebeck
On Dienstag, 27. September 2022 17:14:57 CEST Linus Heckemann wrote: > Linus Heckemann writes: > > static void coroutine_fn virtfs_reset(V9fsPDU *pdu) > > { > > > > V9fsState *s = pdu->s; > > V9fsFidState *fidp; > > > > +GList *freeing; > > +/* Get a list of all the values

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Stefan Hajnoczi
On Tue, 27 Sept 2022 at 15:04, Thomas Huth wrote: > > On 27/09/2022 20.47, Stefan Hajnoczi wrote: > > On Tue, 27 Sept 2022 at 14:40, Thomas Huth wrote: > >> > >> On 27/09/2022 19.57, Daniel P. Berrangé wrote: > >>> On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: > On Tue,

Re: [PATCH v5] 9pfs: use GHashTable for fid table

2022-09-27 Thread Christian Schoenebeck
On Dienstag, 27. September 2022 16:25:03 CEST Linus Heckemann wrote: > The previous implementation would iterate over the fid table for > lookup operations, resulting in an operation with O(n) complexity on > the number of open files and poor cache locality -- for every open, > stat, read, write,

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Thomas Huth
On 27/09/2022 20.47, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 14:40, Thomas Huth wrote: On 27/09/2022 19.57, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Stefan Hajnoczi
On Tue, 27 Sept 2022 at 14:40, Thomas Huth wrote: > > On 27/09/2022 19.57, Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: > >> On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé > >> wrote: > >>> > >>> On Tue, Sep 27, 2022 at 11:44:45AM -0400,

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Thomas Huth
On 27/09/2022 19.57, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé wrote: On Tue, Sep 27, 2022 at 11:44:45AM -0400, Stefan Hajnoczi wrote: On Tue, 27 Sept 2022 at 05:02, Thomas Huth wrote: now

Re: [PULL 00/14] s390x patches and slirp submodule removal

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/8] Net patches

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/3] M68k for 7.2 patches

2022-09-27 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v11 06/15] target/hexagon: expose next PC in DisasContext

2022-09-27 Thread Anton Johansson via
Missing the rationale. "The idef-parser will use it with IMM_NPC". But I feel I'm missing something, what is the diff between IMM_PC/IMM_NPC? I'll try to clarify. Firstly, why do we need this patch? Hexagon intructions need access to both the current pc and the next pc, for the generated

Re: [PATCH v11 03/15] target/hexagon: make slot number an unsigned

2022-09-27 Thread Anton Johansson via
Using 'unsigned' would keep consistency with the rest of the codebase. Otherwise, Reviewed-by: Philippe Mathieu-Daudé Good catch, I'll make sure to change the various `uint32_t` -> `unsigned`! :) -- Anton Johansson, rev.ng Labs Srl.

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Daniel P . Berrangé
On Tue, Sep 27, 2022 at 01:36:20PM -0400, Stefan Hajnoczi wrote: > On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé wrote: > > > > On Tue, Sep 27, 2022 at 11:44:45AM -0400, Stefan Hajnoczi wrote: > > > On Tue, 27 Sept 2022 at 05:02, Thomas Huth wrote: > > > > now that Gitlab is giving us

Re: [PATCH 1/8] hw/avr: Add limited support for avr gpio registers

2022-09-27 Thread Michael Rolnik
Hi all, Is there any kind of web UI where I can review it? I don't find this patch in https://patchew.org/ (there is only 2 year old version (https://patchew.org/search?q=project%3AQEMU+%22hw%2Favr%22)) Thank you, Michael Rolnik On Mon, Sep 12, 2022 at 2:21 PM Heecheol Yang wrote: > Add some

Re: virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-09-27 Thread Colin Walters
On Tue, Sep 27, 2022, at 1:27 PM, German Maglione wrote: > >> > Now all the development has moved to rust virtiofsd. Oh, awesome!! The code there looks great. > I could work on this for the next major version and see if anything breaks. > But I prefer to add this as a compilation feature,

Re: [PATCH v2] target/arm/kvm: Retry KVM_CREATE_VM call if it fails EINTR

2022-09-27 Thread Peter Maydell
On Tue, 27 Sept 2022 at 18:07, Eric Auger wrote: > > Hi Peter, > > On 9/27/22 18:49, Peter Maydell wrote: > > Occasionally the KVM_CREATE_VM ioctl can return EINTR, even though > > there is no pending signal to be taken. In commit 94ccff13382055 > > we added a retry-on-EINTR loop to the

[PATCH v2] linux-user: Add guest memory layout to exception dump

2022-09-27 Thread Helge Deller
When the emulation stops with a hard exception it's very useful for debugging purposes to dump the current guest memory layout (for an example see /proc/self/maps) beside the CPU registers. The open_self_maps() function provides such a memory dump, but since it's located in the syscall.c file,

Re: Should we maybe move Cirrus-CI jobs away from Gitlab again?

2022-09-27 Thread Stefan Hajnoczi
On Tue, 27 Sept 2022 at 11:54, Daniel P. Berrangé wrote: > > On Tue, Sep 27, 2022 at 11:44:45AM -0400, Stefan Hajnoczi wrote: > > On Tue, 27 Sept 2022 at 05:02, Thomas Huth wrote: > > > now that Gitlab is giving us pressure on the amount of free CI minutes, I > > > wonder whether we should maybe

Re: virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-09-27 Thread German Maglione
On Tue, Sep 27, 2022 at 6:57 PM Vivek Goyal wrote: > > On Tue, Sep 27, 2022 at 12:37:15PM -0400, Vivek Goyal wrote: > > On Fri, Sep 09, 2022 at 05:24:03PM -0400, Colin Walters wrote: > > > We previously had a chat here > > >

  1   2   3   4   5   >