[PATCH QEMU v2 2/3] virtio-blk-pci: introduce auto-num-queues property

2023-08-10 Thread ~hyman
From: Hyman Huang(黄勇) Commit "9445e1e15 virtio-blk-pci: default num_queues to -smp N" implment sizing the number of virtio-blk-pci request virtqueues to match the number of vCPUs automatically. Which improves IO preformance remarkably. To enable this feature for the existing VMs, the cloud platf

[PATCH QEMU v2 0/3] provide a smooth upgrade solution for multi-queues disk

2023-08-10 Thread ~hyman
Ping, This version is a copy of version 1 and is rebased on the master. No functional changes. A 1:1 virtqueue:vCPU mapping implementation for virtio-*-pci disk introduced since qemu >= 5.2.0, which improves IO performance remarkably. To enjoy this feature for exiting running VMs without service

[PATCH QEMU v2 1/3] virtio-scsi-pci: introduce auto-num-queues property

2023-08-10 Thread ~hyman
From: Hyman Huang(黄勇) Commit "6a55882284 virtio-scsi-pci: default num_queues to -smp N" implment sizing the number of virtio-scsi-pci request virtqueues to match the number of vCPUs automatically. Which improves IO preformance remarkably. To enable this feature for the existing VMs, the cloud pl

[PATCH QEMU v2 3/3] vhost-user-blk-pci: introduce auto-num-queues property

2023-08-10 Thread ~hyman
From: Hyman Huang(黄勇) Commit "a4eef0711b vhost-user-blk-pci: default num_queues to -smp N" implment sizing the number of vhost-user-blk-pci request virtqueues to match the number of vCPUs automatically. Which improves IO preformance remarkably. To enable this feature for the existing VMs, the cl

[PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread xianglai li
1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. 3.The cross-compilation toolchain on x86 can be obtained from the link below: https://github.com/loongson/build-tools/tree/2022.09.06 Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel P. Berrangé" Cc: Tho

Re: [PATCH] target/riscv/kvm.c: fix mvendorid size in vcpu_set_machine_ids()

2023-08-10 Thread Andrew Jones
On Wed, Aug 02, 2023 at 03:00:58PM -0300, Daniel Henrique Barboza wrote: > cpu->cfg.mvendorid is a 32 bit field and kvm_set_one_reg() always write > a target_ulong val, i.e. a 64 bit field in a 64 bit host. > > Given that we're passing a pointer to the mvendorid field, the reg is > reading 64 bits

Re: [PATCH] target/riscv/kvm.c: fix mvendorid size in vcpu_set_machine_ids()

2023-08-10 Thread Andrew Jones
On Wed, Aug 09, 2023 at 07:16:00PM -0300, Daniel Henrique Barboza wrote: > Drew, > > On 8/3/23 09:05, Andrew Jones wrote: > > On Thu, Aug 03, 2023 at 08:36:57AM -0300, Daniel Henrique Barboza wrote: ... > > So, I think we need a helper that has a switch on the KVM register type > > and provides th

Re: [RFC v4 01/11] build: Implement logic for sharing cross-building config files

2023-08-10 Thread Alex Bennée
Yeqi Fu writes: > Signed-off-by: Yeqi Fu > --- > configure | 57 +-- > 1 file changed, 34 insertions(+), 23 deletions(-) > > diff --git a/configure b/configure > index 2b41c49c0d..a076583141 100755 > --- a/configure > +++ b/configure > >

LTP test related to virtio releasing and reassigning resource leads to guest hung

2023-08-10 Thread longguang.yue
Hi, all: A ltp test leads to guest hung(io hung), the test releases virtio device resource and then reassign. I find device’s mem prefetchable resource 64-bit is changed. ltp test: https://github.com/linux-test-project/ltp/blob/522d7fba4afc84e07b252aa4cd91b241e81d6613/testcases/kernel/device-dr

Re: LTP test related to virtio releasing and reassigning resource leads to guest hung

2023-08-10 Thread Michael Tokarev
10.08.2023 11:57, longguang.yue wrote: Hi, all: A ltp test leads to guest hung(io hung), the test releases virtio device resource and then reassign. I find device’s mem prefetchable resource 64-bit is changed. ltp test: https://github.com/linux-test-project/ltp/blob/522d7fba4afc84e07b252aa4cd9

Re: [PATCH] Aspeed: i2c: Fixed Tx and Rx error in BUFF Mode

2023-08-10 Thread Cédric Le Goater
Hello, On 8/4/23 10:11, Hang Yu via wrote: 1. Fixed inconsistency between the bit field definition in register I2CD_POOL_CTRL and the ast2600 datasheet 2. Fixed issue of confusing RXSIZE and RXCOUNT, as well as forgetting to add one to TXCOUNT and RXSIZE in buff mode 3. Fixed issue with TXBUF tr

Re: [PATCH][RFC] Add crash handler for qemu-linux-user

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 02:28, Richard Henderson wrote: > > On 8/9/23 16:07, Helge Deller wrote: > > +/* did qemu source code crashed? */ > > +if (unlikely(!h2g_valid(host_addr))) { > > +qemu_show_backtrace(info); > > +} > > This won't do anything

Re: [PATCH 1/5] target/arm: Disable FEAT_TRF in neoverse-v1

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 03:36, Richard Henderson wrote: > > Self-hosted trace is out of scope for QEMU. True, but we already disable this in arm_cpu_realizefn() along with FEAT_SPE, FEAT_AMU and a bunch of other "out of scope" or not-yet-implemented features. I thought it more reliable to do the d

Re: [PATCH v5 3/6] mips: Report an error when KVM_VM_MIPS_VZ is unavailable

2023-08-10 Thread Philippe Mathieu-Daudé
On 27/7/23 09:31, Akihiko Odaki wrote: On MIPS, QEMU requires KVM_VM_MIPS_VZ type for KVM. Report an error in such a case as other architectures do when an error occurred during KVM type decision. Signed-off-by: Akihiko Odaki --- target/mips/kvm.c | 1 + 1 file changed, 1 insertion(+) Revi

Re: [PATCH v5 6/6] accel/kvm: Make kvm_dirty_ring_reaper_init() void

2023-08-10 Thread Philippe Mathieu-Daudé
On 27/7/23 09:31, Akihiko Odaki wrote: The returned value was always zero and had no meaning. Signed-off-by: Akihiko Odaki --- accel/kvm/kvm-all.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 4/6] accel/kvm: Use negative KVM type for error propagation

2023-08-10 Thread Philippe Mathieu-Daudé
On 27/7/23 09:31, Akihiko Odaki wrote: On MIPS, kvm_arch_get_default_type() returns a negative value when an error occurred so handle the case. Also, let other machines return negative values when errors occur and declare returning a negative value as the correct way to propagate an error that ha

Re: [PATCH v5 1/6] kvm: Introduce kvm_arch_get_default_type hook

2023-08-10 Thread Philippe Mathieu-Daudé
On 4/8/23 19:38, Peter Maydell wrote: On Fri, 4 Aug 2023 at 18:26, Peter Maydell wrote: On Thu, 27 Jul 2023 at 08:31, Akihiko Odaki wrote: kvm_arch_get_default_type() returns the default KVM type. This hook is particularly useful to derive a KVM type that is valid for "none" machine model,

Re: [PATCH for-8.2] configure: fix container_hosts misspellings and duplications

2023-08-10 Thread Philippe Mathieu-Daudé
On 7/8/23 11:22, Paolo Bonzini wrote: container_hosts is matched against $cpu, so it must contain QEMU canonical architecture names, not Debian architecture names. Also do not set $container_hosts inside the loop, since it is already set before. Signed-off-by: Paolo Bonzini --- configure | 3

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread bibo mao
Xianglai, I reply inline. 在 2023/8/10 15:42, xianglai li 写道: > 1.Add edk2-platform submodule > 2.Added loongarch UEFI BIOS support to compiled scripts. The description is somewhat too simple, it should be paragraph. > 3.The cross-compilation toolchain on x86 can be obtained from the link below:

Re: [PATCH] gdbstub: Fix client Ctrl-C handling

2023-08-10 Thread Alex Bennée
Matheus Tavares Bernardino writes: > Hi, Nick. > >> Nicholas Piggin wrote: >> >> On Tue Jul 11, 2023 at 9:03 PM AEST, Matheus Tavares Bernardino wrote: >> > > Nicholas Piggin wrote: >> > > >> > > diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c >> > > index 6911b73c07..ce8b42eb15 100644 >>

Re: [RFC v1 0/3] Initial support for SPDM

2023-08-10 Thread Jonathan Cameron via
On Wed, 9 Aug 2023 12:45:35 -0400 Alistair Francis wrote: > On Wed, Aug 9, 2023 at 8:11 AM Jonathan Cameron > wrote: > > > > On Tue, 8 Aug 2023 11:51:21 -0400 > > Alistair Francis wrote: > > > > > The Security Protocol and Data Model (SPDM) Specification defines > > > messages, data objects,

Re: [PATCH 1/3] configure: fix detection for x32 linux-user

2023-08-10 Thread Philippe Mathieu-Daudé
On 7/8/23 11:48, Paolo Bonzini wrote: x32 uses the same signal handling fragments as x86_64, since host_arch is set to x86_64 when Meson runs. Remove the unnecessary forwarder and set the host_arch variable properly in configure. Signed-off-by: Paolo Bonzini --- configure

Re: CXL volatile memory is not listed

2023-08-10 Thread Jonathan Cameron via
On Wed, 9 Aug 2023 04:21:47 +0530 Maverickk 78 wrote: > Hello, > > I am running qemu-system-x86_64 > > qemu-system-x86_64 --version > QEMU emulator version 8.0.92 (v8.1.0-rc2-80-g0450cf0897) > +Cc linux-cxl as the answer is more todo with linux than qemu. > qemu-system-x86_64 \ > -m 2G,slots=

Re: LTP test related to virtio releasing and reassigning resource leads to guest hung

2023-08-10 Thread longguang.yue
could you please give me some tips to diagnose? I could do tests on qemu 8.0, but product environment could not update. I test on different kernel version 5.10.0-X, one is better and results show problem is more about host kernel rather than qemu. test cases are different combination of i440f

Re: [PATCH] linux-user/riscv: Use abi_ulong for target_ucontext

2023-08-10 Thread Philippe Mathieu-Daudé
On 8/8/23 11:34, LIU Zhiwei wrote: We should not use types dependend on host arch for target_ucontext. This bug is found when run rv32 applications. Signed-off-by: LIU Zhiwei --- linux-user/riscv/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/risc

Re: [PATCH] util: Delete a check for IA-64

2023-08-10 Thread Philippe Mathieu-Daudé
On 8/8/23 17:20, Akihiko Odaki wrote: HOST_IA64 will never be defined since IA-64 host is no longer supported. If you send a v2 removing the similar definition in include/exec/user/thunk.h, please mention this is since commit b1cef6d02f("Drop remaining bits of ia64 host support"). Reviewed-

Re: [PATCH] thunk: Delete checks for old host definitions

2023-08-10 Thread Philippe Mathieu-Daudé
Helge and myself sometime run the tests on a HPPA host (testing the QEMU tools). I guess remember John Paul also runs some on Alpha (so Cc'ing him). Helge, what is your take on this? On 8/8/23 17:23, Akihiko Odaki wrote: Alpha, IA-64, and PA-RISC hosts are no longer supported. Signed-off-by: A

Re: CXL volatile memory is not listed

2023-08-10 Thread Philippe Mathieu-Daudé
Hi, Cc'ing Igor and David. On 9/8/23 00:51, Maverickk 78 wrote: Hello, I am running qemu-system-x86_64 qemu-system-x86_64 --version QEMU emulator version 8.0.92 (v8.1.0-rc2-80-g0450cf0897) qemu-system-x86_64 \ -m 2G,slots=4,maxmem=4G \ -smp 4 \ -machine type=q35,accel=kvm,cxl=on \ -enable-kv

Re: [PATCH v4 01/11] target/loongarch: Add macro to check current arch

2023-08-10 Thread Philippe Mathieu-Daudé
On 8/8/23 03:54, Jiajie Chen wrote: Add macro to check if the current cpucfg[1].arch equals to 1(LA32) or 2(LA64). Signed-off-by: Jiajie Chen --- target/loongarch/cpu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index fa371ca8ba

Re: [PATCH v4 01/11] target/loongarch: Add macro to check current arch

2023-08-10 Thread Philippe Mathieu-Daudé
On 8/8/23 19:13, Jiajie Chen wrote: On 2023/8/9 01:01, Richard Henderson wrote: On 8/7/23 18:54, Jiajie Chen wrote: Add macro to check if the current cpucfg[1].arch equals to 1(LA32) or 2(LA64). Signed-off-by: Jiajie Chen ---   target/loongarch/cpu.h | 7 +++   1 file changed, 7 insertion

Re: [PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements

2023-08-10 Thread Philippe Mathieu-Daudé
Hi, On 8/8/23 19:26, ThinerLogoer wrote: At 2023-08-08 03:07:31, "David Hildenbrand" wrote: Instead of handling it inside file_ram_open(), handle it in the caller and only fallback to readonly in a MAP_PRIVATE mapping. I have tested the patch on my compilation environment. These patches

Re: CXL volatile memory is not listed

2023-08-10 Thread David Hildenbrand
On 10.08.23 12:59, Philippe Mathieu-Daudé wrote: Hi, Cc'ing Igor and David. On 9/8/23 00:51, Maverickk 78 wrote: Hello, I am running qemu-system-x86_64 qemu-system-x86_64 --version QEMU emulator version 8.0.92 (v8.1.0-rc2-80-g0450cf0897) qemu-system-x86_64 \ -m 2G,slots=4,maxmem=4G \ -smp 4

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread lixianglai
Hi, BiBo On 8/10/23 5:58 PM, bibo mao wrote: Xianglai, I reply inline. 在 2023/8/10 15:42, xianglai li 写道: 1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. The description is somewhat too simple, it should be paragraph. Okay, I'll describe it in detail

Re: [PATCH v2] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-08-10 Thread Andrew Jones
Hi Paolo, Is this good for 8.1? Thanks, drew On Tue, Jul 25, 2023 at 02:26:02PM +0200, Andrew Jones wrote: > Since Linux commit 00f918f61c56 ("RISC-V: KVM: Skeletal in-kernel AIA > irqchip support") checking KVM_CAP_IRQCHIP returns non-zero when the > RISC-V platform has AIA. The cap indicate

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread Philippe Mathieu-Daudé
Hi, On 10/8/23 09:42, xianglai li wrote: 1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. 3.The cross-compilation toolchain on x86 can be obtained from the link below: https://github.com/loongson/build-tools/tree/2022.09.06 Cc: Paolo Bonzini Cc: "Marc-Andr

Re: [PATCH v2] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 12:29, Andrew Jones wrote: > > > Hi Paolo, > > Is this good for 8.1? Is it fixing a regression since 8.0 ? thanks -- PMM > > Thanks, > drew > > > On Tue, Jul 25, 2023 at 02:26:02PM +0200, Andrew Jones wrote: > > Since Linux commit 00f918f61c56 ("RISC-V: KVM: Skeletal in-k

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread Jiajie Chen
On 2023/8/10 15:42, xianglai li wrote: 1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. 3.The cross-compilation toolchain on x86 can be obtained from the link below: https://github.com/loongson/build-tools/tree/2022.09.06 Cc: Paolo Bonzini Cc: "Marc-André L

Re: [PATCH v2] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-08-10 Thread Andrew Jones
On Thu, Aug 10, 2023 at 12:38:28PM +0100, Peter Maydell wrote: > On Thu, 10 Aug 2023 at 12:29, Andrew Jones wrote: > > > > > > Hi Paolo, > > > > Is this good for 8.1? > > Is it fixing a regression since 8.0 ? The fix is for running with KVM which includes 00f918f61c56, which is v6.5-rc1 and late

Re: [PATCH 0/9] Use known good releases when installing in pyvenv

2023-08-10 Thread Philippe Mathieu-Daudé
Hi Paolo, On 9/8/23 11:29, Paolo Bonzini wrote: This series introduce a new installation command for mkvenv.py that retrieves the packages to be installed from a TOML file. This allows being more flexible in using the system version of a package, while at the same time using a known-good version

Re: [PATCH for-8.2] dockerfiles: bump tricore cross compiler container to Debian 11

2023-08-10 Thread Philippe Mathieu-Daudé
On 9/8/23 10:29, Paolo Bonzini wrote: With the release of version 12 on June 10, 2023, Debian 10 is not supported anymore. Modify the cross compiler container to build on a newer version. Signed-off-by: Paolo Bonzini --- tests/docker/dockerfiles/debian-tricore-cross.docker | 2 +- 1 file ch

Re: [PATCH 0/9] Use known good releases when installing in pyvenv

2023-08-10 Thread Paolo Bonzini
On Thu, Aug 10, 2023 at 1:52 PM Philippe Mathieu-Daudé wrote: > Does this fix the second point of commit eaf245becd ("Revert > "tests/requirements.txt: bump up avocado-framework version to 101.0"") > > > Second, the recent changes to Python handling mean that there is > > a single virtual envi

Re: [PATCH for-8.2] configure: fix and complete detection of tricore tools

2023-08-10 Thread Philippe Mathieu-Daudé
On 9/8/23 10:29, Paolo Bonzini wrote: The tricore tools are not detected when they are installed in the host system, only if they are taken from an external container. For this reason the build-tricore-softmmu job was not running the TCG tests. In addition the container provides all tools, not

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread lixianglai
Hi, Jiajie: On 8/10/23 7:48 PM, Jiajie Chen wrote: On 2023/8/10 15:42, xianglai li wrote: 1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. 3.The cross-compilation toolchain on x86 can be obtained from the link below: https://github.com/loongson/build-tool

[PATCH v1 3/6] target/loongarch: Add REQUIRE_LSPW macro to check LSPW instructions

2023-08-10 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/cpu.h | 2 ++ target/loongarch/insn_trans/trans_privileged.c.inc | 8 2 files changed, 10 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 5594d83011..13a4ab316a 100644 --- a/target/

[PATCH v1 0/6] Add some macros to check cpu features

2023-08-10 Thread Song Gao
Based-on: https://patchew.org/QEMU/20230809083258.1787464-...@jia.je/ Hi, This series adds some macros to check CPU features. This includes: CPUCFG[1].IOCSR CPUCFG[2].FP CPUCFG[2].FP_SP CPUCFG[2].FP_DP CPUCFG[2].LSPW CPUCFG[2].LAM CPUCFG[2].LSX Thanks. Song Gao Song Gao (6): target/loong

[PATCH v1 6/6] target/loongarch: Add REQUIRE_IOCSR macro to check IOCSR instructions

2023-08-10 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/cpu.h | 2 ++ target/loongarch/insn_trans/trans_privileged.c.inc | 8 2 files changed, 10 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 19d2a28a47..69a3ab16ee 100644 --- a/target/

[PATCH v1 1/6] target/loongarch: Fix loongarch_la464_initfn() misses setting LSPW.

2023-08-10 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index dd1cd7d7d2..95e00a044c 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -391,6 +391,7 @@ static void loongarch_la464_init

[PATCH v1 2/6] target/loongarch: Add some checks before translating fpu instructions

2023-08-10 Thread Song Gao
This patch adds REQUIRE_FP/FP_SP/FP_DP to check CPUCFG2.FP/FP_SP/FP_DP. Signed-off-by: Song Gao --- target/loongarch/cpu.h| 6 + .../loongarch/insn_trans/trans_farith.c.inc | 132 -- target/loongarch/insn_trans/trans_fcmp.c.inc | 4 + target/loongar

[PATCH v1 5/6] target/loongarch: Add REQUIRE_LSX macro to check LSX instructions

2023-08-10 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/cpu.h | 2 + target/loongarch/insn_trans/trans_lsx.c.inc | 71 - 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 0166ec3d7b..19d2a28a47 10064

[PATCH v1 4/6] target/loongarch: Add REQUIRE_LAM macro to check atomic instructions

2023-08-10 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/cpu.h | 2 ++ target/loongarch/insn_trans/trans_atomic.c.inc | 12 2 files changed, 14 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 13a4ab316a..0166ec3d7b 100644 --- a/target/lo

Re: [PATCH v5 11/11] target/loongarch: Add loongarch32 cpu la132

2023-08-10 Thread gaosong
Hi, Jiajie 在 2023/8/9 下午4:26, Jiajie Chen 写道: Add la132 as a loongarch32 cpu type and allow virt machine to be used with la132 instead of la464. Due to lack of public documentation of la132, it is currently a synthetic loongarch32 cpu model. Details need to be added in the future. Signed-off-b

[PATCH v2 1/3] linux-headers: update asm-s390/kvm.h

2023-08-10 Thread Steffen Eiden
Signed-off-by: Steffen Eiden --- linux-headers/asm-s390/kvm.h | 16 1 file changed, 16 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index e2afd95420..023a2763a9 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390/kvm.h

[PATCH v2 3/3] target/s390x: AP-passthrough for PV guests

2023-08-10 Thread Steffen Eiden
Enabling AP-passthrough(AP-pt) for PV-guest by using the new CPU features for PV-AP-pt of KVM. As usual QEMU first checks which CPU features are available and then sets them if available and selected by user. An additional check is done to verify that PV-AP can only be enabled if "regular" AP-pt i

[PATCH v2 2/3] target/s390x/kvm: Refactor AP functionalities

2023-08-10 Thread Steffen Eiden
kvm_s390_set_attr() is a misleading name as it only sets attributes for the KVM_S390_VM_CRYPTO group. Therefore, rename it to kvm_s390_set_crypto_attr(). Add new functions ap_available() and ap_enabled() to avoid code duplication later. Signed-off-by: Steffen Eiden --- target/s390x/kvm/kvm.c |

[PATCH v2 0/3] KVM: s390: Enable AP instructions for pv-guests

2023-08-10 Thread Steffen Eiden
This series enables general QEMU support for AP pass-through for Secure Execution guests (pv-guests). To enable AP-PT on pv-guests QEMU has to turn on the corresponding bits in the KVM CPU-model[1] if the CPU firmware supports it. However, it only makes sense to turn on AP-PT if the QEMU user enab

Re: [PATCH] roms: Support compile the efi bios for loongarch

2023-08-10 Thread lixianglai
On 8/10/23 7:34 PM, Philippe Mathieu-Daudé wrote: Hi, On 10/8/23 09:42, xianglai li wrote: 1.Add edk2-platform submodule 2.Added loongarch UEFI BIOS support to compiled scripts. 3.The cross-compilation toolchain on x86 can be obtained from the link below: https://github.com/loongson/build-t

Re: [PATCH v3 0/6] target/arm: Fixes for RME

2023-08-10 Thread Peter Maydell
On Wed, 9 Aug 2023 at 13:37, Jean-Philippe Brucker wrote: > > A few patches to fix RME support and allow booting a realm guest, based > on "[PATCH v2 00/15] target/arm/ptw: Cleanups and a few bugfixes" > https://lore.kernel.org/all/20230807141514.19075-1-peter.mayd...@linaro.org/ > > Since v2: > >

Re: [PATCH v3] Fix SEGFAULT on getting physical address of MMIO region.

2023-08-10 Thread Jonathan Cameron via
On Fri, 4 Aug 2023 09:15:13 -0700 Richard Henderson wrote: > On 8/4/23 04:09, Mikhail Tyutin wrote: > > Apply save_iotlb_data() to io_readx() as well as to io_writex(). This fixes > > SEGFAULT on qemu_plugin_hwaddr_phys_addr() call plugins for addresses > > inside of > > MMIO region. > > > > Si

Re: [PATCH v3 0/6] target/arm: Fixes for RME

2023-08-10 Thread Jean-Philippe Brucker
On Thu, Aug 10, 2023 at 02:16:56PM +0100, Peter Maydell wrote: > This didn't build for the linux-user targets. I squashed > this into patch 6: > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index 7df1f7600b1..d906d2b1caa 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -2169,9

Re: [PATCH v1 1/6] target/loongarch: Fix loongarch_la464_initfn() misses setting LSPW.

2023-08-10 Thread Richard Henderson
On 8/10/23 05:41, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index dd1cd7d7d2..95e00a044c 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -391,6 +391

Re: [PATCH 2/5] target/arm: Reduce dcz_blocksize to uint8_t

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 03:37, Richard Henderson wrote: > > This value is only 4 bits wide. True. Any particular reason to change the type, though? > Signed-off-by: Richard Henderson > --- > target/arm/cpu.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Peter Maydell

Re: [PATCH 3/5] target/arm: Allow cpu to configure GM blocksize

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 03:37, Richard Henderson wrote: > > Previously we hard-coded the blocksize with GMID_EL1_BS. > But the value we choose for -cpu max does not match the > value that cortex-a710 uses. > > Mirror the way we handle dcz_blocksize. > > Signed-off-by: Richard Henderson Reviewed-b

Re: LTP test related to virtio releasing and reassigning resource leads to guest hung

2023-08-10 Thread Stefan Hajnoczi
On Thu, Aug 10, 2023 at 06:35:32PM +0800, longguang.yue wrote: > could you please give me some tips to diagnose? I could do tests on qemu > 8.0, but product environment could not update. > I test on different kernel version 5.10.0-X, one is better and results show > problem is more about host ke

Re: [PATCH v1 1/3] softmmu/physmem: fallback to opening guest RAM file as readonly in a MAP_PRIVATE mapping

2023-08-10 Thread David Hildenbrand
Most importantly, we won't be corrupting/touching the original file in any case, because it is R/O. If we really want to be careful, we could clue that behavior to compat machines. I'm not really sure yet if we really have to go down that path. Any other alternatives? I'd like to avoid new flags

Re: [PATCH 4/5] target/arm: Support more GM blocksizes

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 03:36, Richard Henderson wrote: > > Support all of the easy GM block sizes. > Use direct memory operations, since the pointers are aligned. > > While BS=2 (16 bytes, 1 tag) is a legal setting, that requires > an atomic store of one nibble. This is not difficult, but there >

Re: [PATCH] Aspeed: i2c: Fixed Tx and Rx error in BUFF Mode

2023-08-10 Thread Hang Yu
Hello > Hello, >  > On 8/4/23 10:11, Hang Yu via wrote: > > 1. Fixed inconsistency between the bit field definition in register > > I2CD_POOL_CTRL and the ast2600 datasheet > > 2. Fixed issue of confusing RXSIZE and RXCOUNT, as well as forgetting > > to add one to TXCOUNT and RXSIZE in buff mode

Re: [PATCH v1 2/6] target/loongarch: Add some checks before translating fpu instructions

2023-08-10 Thread Richard Henderson
On 8/10/23 05:41, Song Gao wrote: This patch adds REQUIRE_FP/FP_SP/FP_DP to check CPUCFG2.FP/FP_SP/FP_DP. Signed-off-by: Song Gao --- target/loongarch/cpu.h| 6 + .../loongarch/insn_trans/trans_farith.c.inc | 132 -- target/loongarch/insn_trans/tr

Re: LTP test related to virtio releasing and reassigning resource leads to guest hung

2023-08-10 Thread Stefan Hajnoczi
On Thu, 10 Aug 2023 at 10:14, Stefan Hajnoczi wrote: > > On Thu, Aug 10, 2023 at 06:35:32PM +0800, longguang.yue wrote: > > could you please give me some tips to diagnose? I could do tests on qemu > > 8.0, but product environment could not update. > > I test on different kernel version 5.10.0-X,

Re: [PATCH 0/1] gitlab: enable ccache for many build jobs

2023-08-10 Thread Alex Bennée
Daniel P. Berrangé writes: > Thomas has previously proposed adding ccache: > >https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg02189.html > > This is an pretty much suggesting the same. Queued to for-8.1/misc-fixes, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] disas/riscv: Further correction to LUI disassembly

2023-08-10 Thread Andrew Jones
On Mon, Jul 31, 2023 at 11:33:20AM -0700, Richard Bagley wrote: > The recent commit 36df75a0a9 corrected one aspect of LUI disassembly > by recovering the immediate argument from the result of LUI with a > shift right by 12. However, the shift right will left-fill with the > sign. By applying a mas

[PATCH v2 1/5] vdpa: use first queue SVQ state for CVQ default

2023-08-10 Thread Eugenio Pérez
Previous to this patch the only way CVQ would be shadowed is if it does support to isolate CVQ group or if all vqs were shadowed from the beginning. The second condition was checked at the beginning, and no more configuration was done. After this series we need to check if data queues are shadowe

[PATCH v2 3/5] vdpa: rename vhost_vdpa_net_load to vhost_vdpa_net_cvq_load

2023-08-10 Thread Eugenio Pérez
Next patches will add the corresponding data load. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index a772540250..9251351b4b 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -9

[PATCH 1/8] gitlab: enable ccache for many build jobs

2023-08-10 Thread Alex Bennée
From: Daniel P. Berrangé The `ccache` tool can be very effective at reducing compilation times when re-running pipelines with only minor changes each time. For example a fresh 'build-system-fedora' job will typically take 20 minutes on the gitlab.com shared runners. With ccache this is reduced to

[PATCH v2 2/5] vdpa: export vhost_vdpa_set_vring_ready

2023-08-10 Thread Eugenio Pérez
The vhost-vdpa net backend needs to enable vrings in a different order than default, so export it. No functional change intended except for tracing, that now includes the (virtio) index being enabled and the return value of the ioctl. Still ignoring return value of this function if called from vh

[PATCH 8/8] gdbstub: don't complain about preemptive ACK chars

2023-08-10 Thread Alex Bennée
When starting a remote connection GDB sends an '+': /* Ack any packet which the remote side has already sent. */ remote_serial_write ("+", 1); which gets flagged as a garbage character in the gdbstub state machine. As gdb does send it out lets be permissive about the handling so we can bette

[PATCH 7/8] gdbstub: more fixes for client Ctrl-C handling

2023-08-10 Thread Alex Bennée
The original fix caused problems with spurious characters on other system emulation. So: - instead of spamming output make the warning a trace point - ensure we only allow a stop reply if it was 0x3 Suggested-by: Matheus Tavares Bernardino Signed-off-by: Alex Bennée Message-Id: <456ed33184

[PATCH v2 0/5] Enable vdpa net migration with features depending on CVQ

2023-08-10 Thread Eugenio Pérez
At this moment the migration of net features that depends on CVQ is not possible, as there is no reliable way to restore the device state like mac address, number of enabled queues, etc to the destination. This is mainly caused because the device must only read CVQ, and process all the commands be

[PATCH 4/8] tests: remove test-gdbstub.py

2023-08-10 Thread Alex Bennée
This isn't directly called by our CI and because it doesn't run via our run-test.py script does things slightly differently. Lets remove it as we have plenty of working in-tree tests now for various aspects of gdbstub. Signed-off-by: Alex Bennée --- tests/guest-debug/test-gdbstub.py | 177 --

[PATCH 2/8] tests/docker: cleanup non-verbose output

2023-08-10 Thread Alex Bennée
Even with --quiet docker will spam the sha256 to the console. Avoid this by redirecting stdout. While we are at it fix the name we echo which was broken during 0b1a649047 (tests/docker: use direct RUNC call to build containers). Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 6 ++

[PATCH 6/8] tests/tcg: ensure system-mode gdb tests start stopped

2023-08-10 Thread Alex Bennée
Without -S we run into potential races with tests starting before the gdbstub attaches. We don't need to worry about user-mode as enabling the gdbstub implies we wait for the initial connection. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 9 +++-- 1 file changed, 3 inserti

[PATCH 3/8] tests/tcg: remove quoting for info output

2023-08-10 Thread Alex Bennée
This avoids ugly multi-line wrapping for the test on non V=1 builds. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 2 +- tests/tcg/multiarch/system/Makefile.softmmu-target | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/aar

[PATCH v2 5/5] vdpa: remove net cvq migration blocker

2023-08-10 Thread Eugenio Pérez
Now that we have add migration blockers if the device does not support all the needed features, remove the general blocker applied to all net devices with CVQ. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 12 1 file changed, 12 deletions(-) diff --git a/net/vhost-vdpa.c b/ne

[PATCH 5/8] tests/tcg: clean-up gdb confirm/pagination settings

2023-08-10 Thread Alex Bennée
We can do this all in the run-test.py script so remove the extraneous bits from the individual tests which got copied from the original non-CI gdb tests. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 2 ++ tests/tcg/aarch64/gdbstub/test-sve-ioctl.py

[PATCH 0/8] some testing and gdbstub fixes

2023-08-10 Thread Alex Bennée
This is mostly gdbstub focused but I cleaned up some bits while I was in the testing makefiles. This is mostly to make the "check-tcg" output as clean as possible without ugly line wraps. I tried to eliminate the gdbstub info() output but sadly this is harder than expected. I've tweaked the gdbstu

[PATCH v2 4/5] vdpa: move vhost_vdpa_set_vrings_ready to the caller

2023-08-10 Thread Eugenio Pérez
Doing that way allows CVQ to be enabled before the dataplane vqs, restoring the state as MQ or MAC addresses properly in the case of a migration. Signed-off-by: Eugenio Pérez --- hw/virtio/vdpa-dev.c | 3 +++ hw/virtio/vhost-vdpa.c | 3 --- net/vhost-vdpa.c | 57 +++

Re: [PATCH 5/8] tests/tcg: clean-up gdb confirm/pagination settings

2023-08-10 Thread Philippe Mathieu-Daudé
On 10/8/23 17:36, Alex Bennée wrote: We can do this all in the run-test.py script so remove the extraneous bits from the individual tests which got copied from the original non-CI gdb tests. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 2 ++ tests/tc

[PATCH for-8.1] accel/tcg: Avoid reading too much in load_atom_{2,4}

2023-08-10 Thread Richard Henderson
When load_atom_extract_al16_or_al8 is inexpensive, we want to use it early, in order to avoid the overhead of required_atomicity. However, we must not read past the end of the page. Reported-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- This should solve the problem that Mark report

Re: [PATCH 6/8] tests/tcg: ensure system-mode gdb tests start stopped

2023-08-10 Thread Philippe Mathieu-Daudé
On 10/8/23 17:36, Alex Bennée wrote: Without -S we run into potential races with tests starting before the gdbstub attaches. We don't need to worry about user-mode as enabling the gdbstub implies we wait for the initial connection. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py

Re: [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars

2023-08-10 Thread Philippe Mathieu-Daudé
On 10/8/23 17:36, Alex Bennée wrote: When starting a remote connection GDB sends an '+': /* Ack any packet which the remote side has already sent. */ remote_serial_write ("+", 1); which gets flagged as a garbage character in the gdbstub state machine. As gdb does send it out lets be perm

Re: [PATCH 5/5] target/arm: Implement cortex-a710

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 03:36, Richard Henderson wrote: > > The cortex-a710 is a first generation ARMv9.0-A processor. > > Signed-off-by: Richard Henderson > --- > docs/system/arm/virt.rst | 1 + > hw/arm/virt.c| 1 + > target/arm/tcg/cpu64.c | 167 ++

Re: [PATCH] virtio: don't zero out memory region cache for indirect descriptors

2023-08-10 Thread Stefan Hajnoczi
On Tue, Aug 08, 2023 at 12:28:47AM +0200, Ilya Maximets wrote: > Lots of virtio functions that are on a hot path in data transmission > are initializing indirect descriptor cache at the point of stack > allocation. It's a 112 byte structure that is getting zeroed out on > each call adding unnecess

Re: [PATCH for-8.1] accel/tcg: Avoid reading too much in load_atom_{2,4}

2023-08-10 Thread Philippe Mathieu-Daudé
On 10/8/23 17:48, Richard Henderson wrote: When load_atom_extract_al16_or_al8 is inexpensive, we want to use it early, in order to avoid the overhead of required_atomicity. However, we must not read past the end of the page. Reported-by: Mark Cave-Ayland Signed-off-by: Richard Henderson ---

Re: [PATCH 7/8] gdbstub: more fixes for client Ctrl-C handling

2023-08-10 Thread Philippe Mathieu-Daudé
On 10/8/23 17:36, Alex Bennée wrote: The original fix caused problems with spurious characters on other system emulation. So: - instead of spamming output make the warning a trace point - ensure we only allow a stop reply if it was 0x3 Suggested-by: Matheus Tavares Bernardino Signed-off-

Re: [PATCH for-8.1] accel/tcg: Avoid reading too much in load_atom_{2, 4}

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 16:49, Richard Henderson wrote: > > When load_atom_extract_al16_or_al8 is inexpensive, we want to use > it early, in order to avoid the overhead of required_atomicity. > However, we must not read past the end of the page. > > Reported-by: Mark Cave-Ayland > Signed-off-by: R

Re: [PATCH 0/8] some testing and gdbstub fixes

2023-08-10 Thread Peter Maydell
On Thu, 10 Aug 2023 at 16:36, Alex Bennée wrote: > > This is mostly gdbstub focused but I cleaned up some bits while I was > in the testing makefiles. This is mostly to make the "check-tcg" > output as clean as possible without ugly line wraps. I tried to > eliminate the gdbstub info() output but

Re: [RFC PATCH 00/19] QEMU gmem implemention

2023-08-10 Thread Michael Roth via
On Tue, Aug 01, 2023 at 09:45:41AM +0800, Xiaoyao Li wrote: > On 8/1/2023 12:51 AM, Daniel P. Berrangé wrote: > > On Mon, Jul 31, 2023 at 12:21:42PM -0400, Xiaoyao Li wrote: > > > This is the first RFC version of enabling KVM gmem[1] as the backend for > > > private memory of KVM_X86_PROTECTED_VM.

Re: [PATCH] disas/riscv: Further correction to LUI disassembly

2023-08-10 Thread Palmer Dabbelt
On Thu, 10 Aug 2023 08:31:46 PDT (-0700), ajo...@ventanamicro.com wrote: On Mon, Jul 31, 2023 at 11:33:20AM -0700, Richard Bagley wrote: The recent commit 36df75a0a9 corrected one aspect of LUI disassembly by recovering the immediate argument from the result of LUI with a shift right by 12. Howe

Re: [PATCH 01/24] tcg: Introduce negsetcond opcodes

2023-08-10 Thread Peter Maydell
On Tue, 8 Aug 2023 at 04:12, Richard Henderson wrote: > > Introduce a new opcode for negative setcond. > > Signed-off-by: Richard Henderson > +static bool fold_negsetcond(OptContext *ctx, TCGOp *op) > +{ > +TCGCond cond = op->args[3]; > +int i; > + > +if (swap_commutative(op->args

[PATCH-for-8.2] target/arm/cpu: Allow logging disabled CPU features at UNIMP level

2023-08-10 Thread Philippe Mathieu-Daudé
Some CPU features aren't strictly required to run guest code (such debugging features), so we don't model them. To prevent the guest to access non-existent system registers, we disable the feature bit in the ID registers (see commit 7d8c283e10 "target/arm: Suppress more TCG unimplemented features i

Re: [PATCH 02/24] tcg: Use tcg_gen_negsetcond_*

2023-08-10 Thread Peter Maydell
On Tue, 8 Aug 2023 at 04:13, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

  1   2   3   >