Re: [SPAM] Re: [PATCH v4 09/16] aspeed/smc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/27/24 17:58, Philippe Mathieu-Daudé wrote: Hi, On 27/5/24 10:02, Jamin Lin wrote: AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 f

[PATCH v4 01/11] ppc: Add Power11 DD2.0 processor

2024-05-28 Thread Aditya Gupta
Add CPU target code to add support for new Power11 Processor. Power11 core is same as Power10, hence reuse functions defined for Power10. Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: A

[PATCH v4 03/11] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-05-28 Thread Aditya Gupta
Introduce 'PnvChipClass::logical_pvr' to know corresponding logical PVR of a PowerPC CPU. This helps to have a one-to-one mapping between PVR and logical PVR for a CPU, and used in a later commit to handle cases where PCR of two generations of Power chip is same, which causes regressions with compa

[PATCH v4 07/11] ppc/pnv: Add a LPC controller for POWER11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10 core, declare PNV11_LPC as a child class of PNV10_LPC, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta --

[PATCH v4 06/11] ppc/pnv: Add HOMER for POWER11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, declare PNV11_HOMER as a child class of PNV10_HOMER, so it goes through same class init Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta ---

[PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, use the existing functionalities to introduce a Power11 chip and machine, with Power10 chip as parent of Power11 chip, thus going through similar class_init paths Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicho

[PATCH v4 00/11] Power11 support for QEMU

2024-05-28 Thread Aditya Gupta
Overview Add support for Power11 pseries and powernv machine types, to emulate VMs running on Power11. As Power11 core is same as Power10, hence much of the code has been reused from Power10. Power11 was added in Linux in: commit c2ed087ed35c ("powerpc: Add Power11 architected and

[PATCH v4 08/11] ppc/pnv: Add OCC for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_OCC initialisation, by declaring `PNV11_OCC` as child class of `PNV10_OCC` Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta ---

[PATCH v4 09/11] ppc/pnv: Add a PSI bridge model for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_PSI initialisation, by declaring 'PNV11_PSI' as child class of 'PNV10_PSI' Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta ---

[PATCH v4 04/11] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-05-28 Thread Aditya Gupta
Power11 has the same PCR (Processor Compatibility Register) value, as Power10. Due to this, QEMU considers Power11 as a valid compat-mode for Power10, ie. earlier it was possible to run QEMU with '-M pseries,max-compat-mode=power11 --cpu power10' Same PCR also introduced a regression where `-M p

[PATCH v4 02/11] ppc/pseries: Add Power11 cpu type

2024-05-28 Thread Aditya Gupta
Add sPAPR CPU Core definition for Power11 Cc: David Gibson (reviewer:sPAPR (pseries)) Cc: Harsh Prateek Bora (reviewer:sPAPR (pseries)) Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Ad

[PATCH v4 10/11] ppc/pnv: Add SBE model for Power11

2024-05-28 Thread Aditya Gupta
Power11 core is same as Power10, reuse PNV10_SBER initialisation, by declaring PNV11_PSI as child class of PNV10_PSI Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Aditya Gupta --- hw

Re: [RFC PATCH 04/10] ppc/pnv: specialise init for powernv8/9/10 machines

2024-05-28 Thread Harsh Prateek Bora
Hi Nick, On 5/26/24 17:56, Nicholas Piggin wrote: This will allow different settings and checks for different machine types with later changes. Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --

Re: [PATCH] targer/riscv: Implement Zabha extension

2024-05-28 Thread Alexandre Ghiti
Hi Zhiwei, On Tue, May 28, 2024 at 8:57 AM LIU Zhiwei wrote: > > Hi Alexandre, > > I have sent the patch set about Zabha before last week. Sorry I did not check! > > https://lore.kernel.org/all/fed99165-58da-458c-b68f-a9717fc15...@linux.alibaba.com/T/ > > Welcome to review it and give comments.

Re: [PATCH v4 11/11] ppc/pnv: Update skiboot.lid to support Power11

2024-05-28 Thread Cédric Le Goater
On 5/28/24 09:05, Aditya Gupta wrote: Skiboot/OPAL patches are in discussion upstream [1], with corresponding commits in github repository [2]. Update skiboot.lid, with binary built from 'upstream_power11' branch of skiboot repository with Power11 enablement patches [2]. --- This patch can be s

Re: [PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-28 Thread Daniil Tatianin
On 5/27/24 8:01 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 21/5/24 10:08, Daniil Tatianin wrote: Could you please take a look at this revision? I think I've taken everyone's feedback into account. Sorry for the delay, I missed your patch since you didn't Cc me (Markus asked me to look a

[PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-28 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Acked-by: Philippe Mathieu-Daudé Sign

[PATCH v2 2/3] target/riscv/kvm: handle the exit with debug reason

2024-05-28 Thread Chao Du
If the breakpoint belongs to the userspace then set the ret value. Signed-off-by: Chao Du Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target/riscv/kvm/kvm-cpu.c | 20 1 file changed, 20 insertions(+) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/

[PATCH v2 1/3] target/riscv/kvm: add software breakpoints support

2024-05-28 Thread Chao Du
This patch implements insert/remove software breakpoint process. For RISC-V, GDB treats single-step similarly to breakpoint: add a breakpoint at the next step address, then continue. So this also works for single-step debugging. Implement kvm_arch_update_guest_debug(): Set the control flag when t

[PATCH v2 0/3] target/riscv/kvm: QEMU support for KVM Guest Debug on RISC-V

2024-05-28 Thread Chao Du
This series implements QEMU KVM Guest Debug on RISC-V, with which we could debug RISC-V KVM guest from the host side, using software breakpoints. This series is based on riscv-to-apply.next branch (v9.0.0) and is also available at: https://github.com/Du-Chao/alistair23-qemu/tree/riscv-to-apply.nex

[PATCH v2 3/3] target/riscv/kvm: define TARGET_KVM_HAVE_GUEST_DEBUG

2024-05-28 Thread Chao Du
To enable the KVM GUEST DEBUG for RISC-V at QEMU side. Signed-off-by: Chao Du Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- configs/targets/riscv64-softmmu.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/riscv64-softmmu.mak b/configs/targets/riscv6

[PATCH 0/3] RISC-V: ACPI: Namespace updates

2024-05-28 Thread Sunil V L
This series adds few updates to RISC-V ACPI namespace for virt platform. 1) PCI Link devices need to be created outside the scope of the PCI root complex to ensure correct probe ordering by the OS. This matches the example given in ACPI spec as well. 2) Add PLIC and APLIC as platform devices as w

[PATCH 2/3] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-05-28 Thread Sunil V L
PLIC and APLIC should be in namespace as well. So, add them using the defined HID. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 832

[PATCH 3/3] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-05-28 Thread Sunil V L
RISC-V is going to use new HID RSCV0003 for generi UART. So, update the HID. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 47ec78e432..7f80368415 100644 ---

[PATCH 1/3] gpex-acpi: Support PCI link devices outside the host bridge

2024-05-28 Thread Sunil V L
Currently, PCI link devices (PNP0C0F) are always created within the scope of the PCI root complex. However, RISC-V needs PCI link devices to be outside the scope of the PCI host bridge to properly enable the probe order. This matches the example given in the ACPI specification section 6.2.13.1 as w

Re: [RFC 1/6] scripts/simpletrace-rust: Add the basic cargo framework

2024-05-28 Thread Zhao Liu
Hi Stefan, [snip] > > diff --git a/scripts/simpletrace-rust/.rustfmt.toml > > b/scripts/simpletrace-rust/.rustfmt.toml > > new file mode 100644 > > index ..97a97c24ebfb > > --- /dev/null > > +++ b/scripts/simpletrace-rust/.rustfmt.toml > > @@ -0,0 +1,9 @@ > > +brace_style = "AlwaysNe

Re: [PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-28 Thread Cédric Le Goater
Hello Aditya On 5/28/24 09:05, Aditya Gupta wrote: Power11 core is same as Power10, use the existing functionalities to introduce a Power11 chip and machine, with Power10 chip as parent of Power11 chip, thus going through similar class_init paths This patch should come last, after all the POWE

Re: [RFC PATCH 04/10] ppc/pnv: specialise init for powernv8/9/10 machines

2024-05-28 Thread Cédric Le Goater
On 5/28/24 09:10, Harsh Prateek Bora wrote: Hi Nick, On 5/26/24 17:56, Nicholas Piggin wrote: This will allow different settings and checks for different machine types with later changes. Signed-off-by: Nicholas Piggin ---   hw/ppc/pnv.c | 35 ++-   1 file chang

Re: [RFC PATCH 02/10] ppc/pnv: Move timebase state into PnvCore

2024-05-28 Thread Cédric Le Goater
On 5/28/24 08:28, Harsh Prateek Bora wrote: On 5/26/24 17:56, Nicholas Piggin wrote: The timebase state machine is per per-core state and can be driven by any thread in the core. It is currently implemented as a hack where the state is in a CPU structure and only thread 0's state is accessed b

[PATCH RESEND v2 2/3] target/riscv/kvm: handle the exit with debug reason

2024-05-28 Thread Chao Du
If the breakpoint belongs to the userspace then set the ret value. Signed-off-by: Chao Du Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target/riscv/kvm/kvm-cpu.c | 20 1 file changed, 20 insertions(+) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/

[PATCH RESEND v2 0/3] target/riscv/kvm: QEMU support for KVM Guest Debug on RISC-V

2024-05-28 Thread Chao Du
This series implements QEMU KVM Guest Debug on RISC-V, with which we could debug RISC-V KVM guest from the host side, using software breakpoints. This series is based on riscv-to-apply.next branch (v9.0.0) and is also available at: https://github.com/Du-Chao/alistair23-qemu/tree/riscv-to-apply.nex

[PATCH RESEND v2 3/3] target/riscv/kvm: define TARGET_KVM_HAVE_GUEST_DEBUG

2024-05-28 Thread Chao Du
To enable the KVM GUEST DEBUG for RISC-V at QEMU side. Signed-off-by: Chao Du Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- configs/targets/riscv64-softmmu.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/riscv64-softmmu.mak b/configs/targets/riscv6

[PATCH RESEND v2 1/3] target/riscv/kvm: add software breakpoints support

2024-05-28 Thread Chao Du
This patch implements insert/remove software breakpoint process. For RISC-V, GDB treats single-step similarly to breakpoint: add a breakpoint at the next step address, then continue. So this also works for single-step debugging. Implement kvm_arch_update_guest_debug(): Set the control flag when t

Re: [RFC 2/6] scripts/simpletrace-rust: Support Event & Arguments in trace module

2024-05-28 Thread Zhao Liu
> > +/* > > + * Refer to the description of ALLOWED_TYPES in > > + * scripts/tracetool/__init__.py. > > Please don't reference the Python implementation because this will not > age well. It may bitrot if the Python code changes or if the Python > implementation is deprecated then the source file w

[PATCH] tests/libqos: Add loongarch virt machine node

2024-05-28 Thread Bibo Mao
Add loongarch virt machine to the graph. It is a modified copy of the existing riscv virtmachine in riscv-virt-machine.c It contains a generic-pcihost controller, and an extra function loongarch_config_qpci_bus() to configure GPEX pci host controller information, such as ecam and pio_base addresse

[PATCH] tests/qtest: Add numa test for loongarch system

2024-05-28 Thread Bibo Mao
Add numa test case for loongarch system, it passes to run with command "make check-qtest". Signed-off-by: Bibo Mao --- tests/qtest/meson.build | 2 +- tests/qtest/numa-test.c | 53 + 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/tests/qte

Re: [RFC 3/6] scripts/simpletrace-rust: Add helpers to parse trace file

2024-05-28 Thread Zhao Liu
> > +fn read_type(mut fobj: &File) -> Result > > +{ > > +let mut tbuf = [0u8; 8]; > > +if let Err(e) = fobj.read_exact(&mut tbuf) { > > +if e.kind() == ErrorKind::UnexpectedEof { > > +return Ok(RecordType::Empty); > > +} else { > > +

Re: [PATCH v4 12/16] aspeed/soc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, Jamin Lin wrote: Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers. AST

Re: [RFC PATCH 05/10] ppc/pnv: Extend chip_pir class method to TIR as well

2024-05-28 Thread Harsh Prateek Bora
On 5/26/24 17:56, Nicholas Piggin wrote: The chip_pir chip class method allows the platform to set the PIR processor identification register. Extend this to a more general ID function which also allows the TIR to be set. This is in preparation for "big core", which is a more complicated topolo

[PATCH v2 0/4] MAINTAINERS: update kraxel's entries.

2024-05-28 Thread Gerd Hoffmann
I have not found much time to work on qemu due to being busy with firmware (edk2 for the most part). Time to update the MAINTAINERS file entries to match reality. I drop spice, ui, audio and usb due to lack of time. I drop virtio-gpu, I don't follow recent development (venus etc.) close enough t

[PATCH v4 3/3] hw/loongarch/virt: Enable extioi virt extension

2024-05-28 Thread Song Gao
This patch adds a new board attribute 'v-eiointc'. A value of true enables the virt extended I/O interrupt controller. VMs working in kvm mode have 'v-eiointc' enabled by default. Signed-off-by: Song Gao --- include/hw/loongarch/virt.h | 1 + target/loongarch/cpu.h | 1 + hw/loongarch/vir

[PATCH v4 1/3] hw/intc/loongarch_extioi: Add extioi virt extension definition

2024-05-28 Thread Song Gao
On LoongArch, IRQs can be routed to four vcpus with hardware extended IRQ model. This patch adds the virt extension definition so that the IRQ can route to 256 vcpus. 1.Extended IRQ model: | +---+ +-|+ +---+

[PATCH v2 3/4] MAINTAINERS: drop virtio-gpu maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from virtio-gpu entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index a0375627

[PATCH v2 4/4] MAINTAINERS: drop spice+ui maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from spice and ui entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 37f2be

[PATCH v4 2/3] hw/loongarch/virt: Use MemTxAttrs interface for misc ops

2024-05-28 Thread Song Gao
Use MemTxAttrs interface read_with_attrs/write_with_attrs for virt_iocsr_misc_ops. Signed-off-by: Song Gao --- hw/loongarch/virt.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 4db0d82dbd

[PATCH v2 2/4] MAINTAINERS: drop usb maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from usb entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 58e44885ce94..a

[PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-28 Thread Gerd Hoffmann
Remove myself from audio (both devices and backend) entries. Flip status to "Orphan" for entries which have nobody else listed. Cc: Manos Pitsidianakis Cc: Matias Ezequiel Vara Larsen Cc: Thomas Huth Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 30 ++ 1 file chan

[PATCH v4 0/3] Add extioi virt extension support

2024-05-28 Thread Song Gao
On LoongArch, IRQs can be routed to four vcpus with hardware extioi. This patch adds the extioi virt extension support so that the IRQ can route to 256 vcpus. v4: - Put patch3 ahead of patch2; - patch1 Introduce two IRQ model(Extended IRQ model and Virt extended IRQ model); - Link to v3: https:/

Re: [RFC PATCH 06/10] ppc: Add a core_index to CPUPPCState for SMT vCPUs

2024-05-28 Thread Harsh Prateek Bora
On 5/26/24 17:56, Nicholas Piggin wrote: The way SMT thread siblings are matched is clunky, using hard-coded logic that checks the PIR SPR. Change that to use a new core_index variable in the CPUPPCState, where all siblings have the same core_index. CPU realize routines have flexibility in se

Re: [PATCH v4 11/16] aspeed/intc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, Jamin Lin wrote: AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize handlers

Re: [PATCH v4 12/16] aspeed/soc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, Jamin Lin wrote: Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers. AST

[PATCH v2] virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one()

2024-05-28 Thread Cindy Lu
In function kvm_virtio_pci_vector_use_one(), the function will only use the irqfd/vector for itself. Therefore, in the undo label, the failing process is incorrect. To fix this, we can just remove this label. Fixes: f9a09ca3ea ("vhost: add support for configure interrupt") Cc: qemu-sta...@nongnu.o

Re: [RFC PATCH 06/10] ppc: Add a core_index to CPUPPCState for SMT vCPUs

2024-05-28 Thread Harsh Prateek Bora
corrected typo, it's bitwise. On 5/28/24 14:18, Harsh Prateek Bora wrote: -    (POWERPC_CPU(cs)->env.spr_cb[SPR_PIR].default_value & ~(cs->nr_threads - 1)) +    (POWERPC_CPU(cs)->env.core_index) Dont we want to keep the bitwise & with ~(cs->nr_threads - 1) ? How's it taken care ?

Re: [PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-28 Thread Manos Pitsidianakis
On Tue, 28 May 2024 at 11:39, Gerd Hoffmann wrote: > > Remove myself from audio (both devices and backend) entries. > Flip status to "Orphan" for entries which have nobody else listed. > Signed-off-by: Gerd Hoffmann > --- > MAINTAINERS | 30 ++ > 1 file changed, 10 in

RE: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-28 Thread Gonglei (Arei)
Hi Peter, > -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Wednesday, May 22, 2024 6:15 AM > To: Yu Zhang > Cc: Michael Galaxy ; Jinpu Wang > ; Elmar Gerdes ; > zhengchuan ; Gonglei (Arei) > ; Daniel P. Berrangé ; > Markus Armbruster ; Zhijian Li (Fujitsu) > ; qemu

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-28 Thread Jinpu Wang
Hi Gonglei, On Tue, May 28, 2024 at 11:06 AM Gonglei (Arei) wrote: > > Hi Peter, > > > -Original Message- > > From: Peter Xu [mailto:pet...@redhat.com] > > Sent: Wednesday, May 22, 2024 6:15 AM > > To: Yu Zhang > > Cc: Michael Galaxy ; Jinpu Wang > > ; Elmar Gerdes ; > > zhengchuan ; Gon

Re: [RFC 4/6] scripts/simpletrace-rust: Parse and check trace recode file

2024-05-28 Thread Zhao Liu
> > +fn read_trace_records( > > +events: &Vec, > > +fobj: &File, > > +analyzer: &mut Formatter, > > +read_header: bool, > > +) -> Result> > > +{ > > +/* backtrace::Backtrace needs this env variable. */ > > +env::set_var("RUST_BACKTRACE", "1"); > > +let bt = Backtrace::ne

Re: [RFC PATCH 07/10] target/ppc: Add helpers to check for SMT sibling threads

2024-05-28 Thread Harsh Prateek Bora
On 5/26/24 17:56, Nicholas Piggin wrote: Add helpers for TCG code to determine if there are SMT siblings sharing per-core and per-lpar registers. This simplifies the callers and makes SMT register topology simpler to modify with later changes. Signed-off-by: Nicholas Piggin --- target/ppc/

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-28 Thread Igor Mammedov
On Fri, 24 May 2024 13:00:14 -0700 Zide Chen wrote: > Currently, if running "-overcommit cpu-pm=on" on hosts that don't > have MWAIT support, the MWAIT/MONITOR feature is advertised to the > guest and executing MWAIT/MONITOR on the guest triggers #UD. this is missing proper description how do yo

RE: [PATCH v4 05/16] aspeed/sdmc: Add AST2700 support

2024-05-28 Thread Jamin Lin
Hi Cedric, > -Original Message- > From: Cédric Le Goater > Sent: Tuesday, May 28, 2024 2:34 PM > To: Jamin Lin ; Philippe Mathieu-Daudé > ; Peter Maydell ; Andrew > Jeffery ; Joel Stanley ; > Alistair Francis ; Cleber Rosa ; > Wainer dos Santos Moschetta ; Beraldo Leal > ; open list:ASPEED

Re: [PATCH v4 05/16] aspeed/sdmc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
[ ... ] I don't think this is necessary to do so now. Possibly, increase the version number in the vmstate when resending a v5. If I understand your request, do you mean to change as following in this patch? static const VMStateDescription vmstate_aspeed_sdmc = { .name = "aspeed.sdmc",

[PATCH 2/4] usb: add config options for the hub and hid devices

2024-05-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/Kconfig | 10 ++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f569ed7eeaa1..84bc7fbe36cd 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -65,6 +65,16 @@ c

[PATCH 3/4] usb/ohci-pci: deprecate, don't build by default

2024-05-28 Thread Gerd Hoffmann
The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci-pci.c | 1 + hw/usb/Kconfig| 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index 33ed9b6f5a52..88de657def71 100644 --- a/hw/

[PATCH 1/4] qom: allow to mark objects (including devices) as deprecated.

2024-05-28 Thread Gerd Hoffmann
Add deprecation_note field (string) to ObjectClass. Add deprecated bool to ObjectTypeInfo, report in 'qom-list-types'. Print the note when listing devices via '-device help'. Signed-off-by: Gerd Hoffmann --- include/qom/object.h | 1 + qom/qom-qmp-cmds.c| 4 system/qdev-monitor.c | 5 +

RE: [PATCH v4 05/16] aspeed/sdmc: Add AST2700 support

2024-05-28 Thread Jamin Lin
Hi Cedric, > From: Cédric Le Goater > [ ... ] > > >> I don't think this is necessary to do so now. Possibly, increase the > >> version number in the vmstate when resending a v5. > >> > > If I understand your request, do you mean to change as following in this > patch? > > > > static const VMState

[PATCH 4/4] usb/hub: deprecate, don't build by default

2024-05-28 Thread Gerd Hoffmann
The hub supports only USB 1.1. When running out of usb ports it is in almost all cases the much better choice to add another usb host adapter (or increase the number of root ports when using xhci) instead of using the usb hub. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 1 + hw/usb/Kcon

[PATCH 0/4] allow to deprecate objects and devices

2024-05-28 Thread Gerd Hoffmann
Put some infrastructure in place to allow tagging objects (including devices) as deprected. Use it to mark the ohci pci host adapter and the usb hub as deprecated. Gerd Hoffmann (4): qom: allow to mark objects (including devices) as deprecated. usb: add config options for the hub and hid devi

Re: [PATCH v4 00/16] Add AST2700 support

2024-05-28 Thread Cédric Le Goater
Jamin, I think you should add your self as a Reviewer to the ASPEED BMCs machine in the MAINTAINERS files. Would you agree ? Thanks, C. On 5/27/24 10:02, Jamin Lin wrote: Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: - replac

Re: [PATCH v2 1/4] MAINTAINERS: drop audio maintainership

2024-05-28 Thread Gerd Hoffmann
Hi, > > virtio-snd > > -M: Gerd Hoffmann > > -R: Manos Pitsidianakis > > +M: Manos Pitsidianakis > > +R: Matias Ezequiel Vara Larsen > > S: Supported > > F: hw/audio/virtio-snd.c > > F: hw/audio/virtio-snd-pci.c > > While extra reviewers are always helpful, someone like Volker would > m

RE: [PATCH v4 00/16] Add AST2700 support

2024-05-28 Thread Jamin Lin
Hi Cedric, > -Original Message- > From: Cédric Le Goater > Sent: Tuesday, May 28, 2024 5:56 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; Alistair Francis ; > Cleber > Rosa ; Philippe Mathieu-Daudé ; > Wainer dos Santos Moschetta ; Beraldo Leal > ; open list:AS

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-05-28 Thread Shiyang Ruan via
在 2024/5/24 23:15, Shiyang Ruan 写道: 在 2024/5/22 14:45, Dan Williams 写道: Shiyang Ruan wrote: [..] My expectation is MF_ACTION_REQUIRED is not appropriate for CXL event reported errors since action is only required for direct consumption events and those need not be reported through the devi

Re: [PATCH v4 00/16] Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/28/24 12:02, Jamin Lin wrote: Hi Cedric, -Original Message- From: Cédric Le Goater Sent: Tuesday, May 28, 2024 5:56 PM To: Jamin Lin ; Peter Maydell ; Andrew Jeffery ; Joel Stanley ; Alistair Francis ; Cleber Rosa ; Philippe Mathieu-Daudé ; Wainer dos Santos Moschetta ; Beraldo Le

[PATCH] Issue #2294 | Machine microvm doesn't run under Xen accel for x86_64

2024-05-28 Thread Will Gyda
Issue #2294: Machine microvm doesn't run under Xen accel for qemu-system-x86_64. Solution: microvm is now not build if only Xen is available. Signed-off-by: Will Gyda --- configs/devices/i386-softmmu/default.mak | 2 +- hw/i386/Kconfig | 2 ++ 2 files changed, 3 inser

Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default

2024-05-28 Thread Thomas Huth
On 28/05/2024 11.54, Gerd Hoffmann wrote: The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci-pci.c | 1 + hw/usb/Kconfig| 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c in

[PATCH v6 01/12] libvhost-user: set msg.msg_control to NULL when it is empty

2024-05-28 Thread Stefano Garzarella
On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if the `struct msghdr` has the field `msg_controllen` set to 0, but `msg_control` is not NULL. Reviewed-by: Eric Blake Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stef

[PATCH v6 05/12] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-05-28 Thread Stefano Garzarella
On macOS passing `-s /tmp/vhost.socket` parameter to the vhost-user-blk application, the bind was done on `/tmp/vhost.socke` pathname, missing the last character. This sounds like one of the portability problems described in the unix(7) manpage: Pathname sockets When binding a socket

[PATCH v6 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-05-28 Thread Stefano Garzarella
v1: https://patchew.org/QEMU/20240228114759.44758-1-sgarz...@redhat.com/ v2: https://patchew.org/QEMU/20240326133936.125332-1-sgarz...@redhat.com/ v3: https://patchew.org/QEMU/20240404122330.92710-1-sgarz...@redhat.com/ v4: https://patchew.org/QEMU/20240508074457.12367-1-sgarz...@redhat.com/ v5: ht

[PATCH v6 07/12] vhost-user: enable frontends on any POSIX system

2024-05-28 Thread Stefano Garzarella
The vhost-user protocol is not really Linux-specific so let's enable vhost-user frontends for any POSIX system. In vhost_net.c we use VHOST_FILE_UNBIND which is defined in a Linux specific header, let's define it for other systems as well. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe

[PATCH v6 04/12] vhost-user-server: do not set memory fd non-blocking

2024-05-28 Thread Stefano Garzarella
In vhost-user-server we set all fd received from the other peer in non-blocking mode. For some of them (e.g. memfd, shm_open, etc.) it's not really needed, because we don't use these fd with blocking operations, but only to map memory. In addition, in some systems this operation can fail (e.g. in

[PATCH v6 06/12] contrib/vhost-user-*: use QEMU bswap helper functions

2024-05-28 Thread Stefano Garzarella
Let's replace the calls to le*toh() and htole*() with qemu/bswap.h helpers to make the code more portable. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano

[PATCH v6 02/12] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-05-28 Thread Stefano Garzarella
In vu_message_write() we use sendmsg() to send the message header, then a write() to send the payload. If sendmsg() fails we should avoid sending the payload, since we were unable to send the header. Discovered before fixing the issue with the previous patch, where sendmsg() failed on macOS due t

[PATCH v6 08/12] libvhost-user: enable it on any POSIX system

2024-05-28 Thread Stefano Garzarella
The vhost-user protocol is not really Linux-specific so let's enable libvhost-user for any POSIX system. Compiling it on macOS and FreeBSD some problems came up: - avoid to include linux/vhost.h which is available only on Linux (vhost_types.h contains many of the things we need) - macOS doesn't

[PATCH v6 03/12] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-05-28 Thread Stefano Garzarella
libvhost-user will panic when receiving VHOST_USER_GET_INFLIGHT_FD message if MFD_ALLOW_SEALING is not defined, since it's not able to create a memfd. VHOST_USER_GET_INFLIGHT_FD is used only if VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD is negotiated. So, let's mask that feature if the backend is not ab

[PATCH v6 09/12] contrib/vhost-user-blk: enable it on any POSIX system

2024-05-28 Thread Stefano Garzarella
Let's make the code more portable by adding defines from block/file-posix.c to support O_DIRECT in other systems (e.g. macOS). vhost-user-server.c is a dependency, let's enable it for any POSIX system. Acked-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Dau

[PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-28 Thread Stefano Garzarella
shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes (e.g. vhost-user). The new `memory-backend-shm` can be used as an alternative when `memory-backen

[PATCH v6 12/12] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-05-28 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23 +++ 1 file changed, 23 in

[PATCH v6 11/12] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-05-28 Thread Stefano Garzarella
`memory-backend-memfd` is available only on Linux while the new `memory-backend-shm` can be used on any POSIX-compliant operating system. Let's use it so we can run the test in multiple environments. Since we are here, let`s remove `share=on` which is the default for shm (and also for memfd). Ack

Re: [PATCH 2/4] usb: add config options for the hub and hid devices

2024-05-28 Thread Thomas Huth
On 28/05/2024 11.54, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- hw/usb/Kconfig | 10 ++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v4 3/4] qapi: Do not cast function pointers

2024-05-28 Thread Markus Armbruster
Akihiko Odaki writes: > -fsanitize=undefined complains if function pointers are casted. It > also prevents enabling teh strict mode of CFI which is currently Typo: the > disabled with -fsanitize-cfi-icall-generalize-pointers. The above describes the problem the patch solves. Good! Two sugges

[PATCH v2 1/2] copy-before-write: allow specifying minimum cluster size

2024-05-28 Thread Fiona Ebner
In the context of backup fleecing, discarding the source will not work when the fleecing image has a larger granularity than the one used for block-copy operations (can happen if the backup target has smaller cluster size), because cbw_co_pdiscard_snapshot() will align down the discard requests and

[PATCH v2 2/2] backup: add minimum cluster size to performance options

2024-05-28 Thread Fiona Ebner
In the context of backup fleecing, discarding the source will not work when the fleecing image has a larger granularity than the one used for block-copy operations (can happen if the backup target has smaller cluster size), because cbw_co_pdiscard_snapshot() will align down the discard requests and

[PATCH v2 0/2] backup: allow specifying minimum cluster size

2024-05-28 Thread Fiona Ebner
Based-on: https://lore.kernel.org/qemu-devel/20240429115157.2260885-1-vsement...@yandex-team.ru/ Discussion for v1: https://lore.kernel.org/qemu-devel/20240308155158.830258-1-f.eb...@proxmox.com/ Changes in v2: * Use 'size' type in QAPI. * Remove option in cbw_parse_options(), i.e. before parsin

Re: [PATCH v2 21/67] target/arm: Introduce vfp_load_reg16

2024-05-28 Thread Peter Maydell
On Sat, 25 May 2024 at 00:23, Richard Henderson wrote: > > Load and zero-extend float16 into a TCGv_i32 before > all scalar operations. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH] target/riscv: zvbb implies zvkb

2024-05-28 Thread Jerry Zhang Jian
Sorry, I had the bad mail client setting. Please ignore the previous email, and I will resubmit the patch. -- Jerry Jerry ZJ 於 2024年5月28日 週二 下午8:12寫道: > > *Canary Mail You've received a secure email* > jerry.zhangj...@sifive.com has sent you a secure email via Canary Mail. > Read Secure Email >

Re: [PATCH v2 06/67] target/arm: Verify sz=0 for Advanced SIMD scalar pairwise (fp16)

2024-05-28 Thread Peter Maydell
On Sat, 25 May 2024 at 00:22, Richard Henderson wrote: > > All of these insns have "if sz == '1' then UNDEFINED" in their pseudocode. > Fixes a RISU miscompare for invalid insn 0x5ef0c87a. > > Fixes: 5c36d89567c ("arm/translate-a64: add all FP16 ops in > simd_scalar_pairwise") > Signed-off-by: Ri

Re: [PATCH v2 05/67] target/arm: Fix decode of FMOV (hp) vs MOVI

2024-05-28 Thread Peter Maydell
On Sat, 25 May 2024 at 00:30, Richard Henderson wrote: > > The decode of FMOV (vector, immediate, half-precision) vs > invalid cases of MOVI are incorrect. > > Fixes RISU mismatch for invalid insn 0x2f01fd31. > > Fixes: 70b4e6a4457 ("arm/translate-a64: add FP16 FMOV to simd_mod_imm") > Signed-off-

Re: [PATCH] target/riscv: zvbb implies zvkb

2024-05-28 Thread Jerry ZJ
Canary Mail You've received a secure email jerry.zhangj...@sifive.com has sent you a secure email via Canary Mail. Read Secure Email (https://secure.canarymail.io/read?obj_id=04c03de7-d745-472e-b026-7dd839bc34a0&obj_key=eGJUOWtORkFXenBvWTJyMSt4VGpWdz09&thr_id=04c03de7-d745-472e-b026-7dd839bc34a

Re: [PATCH v6 12/12] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-05-28 Thread Philippe Mathieu-Daudé
On 28/5/24 12:38, Stefano Garzarella wrote: `memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23

Re: [PATCH v2 04/67] target/arm: Zero-extend writeback for fp16 FCVTZS (scalar, integer)

2024-05-28 Thread Peter Maydell
On Sat, 25 May 2024 at 00:23, Richard Henderson wrote: > > Fixes RISU mismatch for "fcvtzs h31, h0, #14". > > Signed-off-by: Richard Henderson > --- > target/arm/tcg/translate-a64.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/transl

Re: [PATCH] iotests/pylintrc: allow up to 10 similar lines

2024-05-28 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 12:13, Vladimir Sementsov-Ogievskiy wrote: We want to have similar QMP objects in different tests. Reworking these objects to make common parts by calling some helper functions doesn't seem good. It's a lot more comfortable to see the whole QAPI request in one place. So, let's increa

  1   2   3   4   >