[PATCH 0/2] hw/i386: Cleanups around kvmclock_create()

2023-06-20 Thread Philippe Mathieu-Daudé
After removing the kvmclock_create() stub we restrict "hw/kvm/clock.h" to x86, the single arch implementing / using this. Philippe Mathieu-Daudé (2): hw/i386: Remove unuseful kvmclock_create() stub hw/i386: Rename 'hw/kvm/clock.h' -> 'hw/i386/kvm/clock.h' {include/hw => hw/i386}/kvm/clock.h

[PULL 08/16] hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert the #ifdef'ry in TCGCPUOps structure for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 13/16] plugins: Remove unused 'exec/helper-proto.h' header

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230611085846.21415-2-phi...@linaro.org> Signed-off-by: Richard Henderson --- plugins/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/core.c b/plugins/core.c

[PULL 11/16] meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, use the clearer 'CONFIG_SYSTEM_ONLY' key to check for system emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230613133347.82210-9-phi...@linaro.org> Signed-off-by:

[PULL 07/16] target/ppc: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Nicholas Piggin Message-Id: <20230613133347.82210-5-phi...@linaro.org>

[PULL 05/16] target/tricore: Remove pointless CONFIG_SOFTMMU guard

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé We don't build any user emulation target for Tricore, only the system emulation. No need to check for it as it is always defined. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Bastian Koppelmann Message-Id:

[PULL 09/16] accel/tcg: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 00/16] tcg patch queue

2023-06-20 Thread Richard Henderson
/pull-tcg-20230620 for you to fetch changes up to d7ee93e24359703debf4137f4cc632563aa4e8d1: cputlb: Restrict SavedIOTLB to system emulation (2023-06-20 10:02:14 +0200) tcg: Define _CALL_AIX for clang on ppc64 accel/tcg: Build fix

[PULL 01/16] host/include/x86_64: Use __m128i for "x" constraints

2023-06-20 Thread Richard Henderson
The macOS catalina compiler produces an error for __int128_t as the type for allocation with SSE inline asm constraint. Create a new X86Int128Union type and use the vector type for all SSE register inputs and outputs. Tested-by: Peter Maydell Signed-off-by: Richard Henderson ---

[PULL 16/16] cputlb: Restrict SavedIOTLB to system emulation

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Commit 2f3a57ee47 ("cputlb: ensure we save the IOTLB data in case of reset") added the SavedIOTLB structure -- which is system emulation specific -- in the generic CPUState structure. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[PULL 12/16] meson: Replace softmmu_ss -> system_ss

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé We use the user_ss[] array to hold the user emulation sources, and the softmmu_ss[] array to hold the system emulation ones. Hold the latter in the 'system_ss[]' array for parity with user emulation. Mechanical change doing: $ sed -i -e s/softmmu_ss/system_ss/g

[PULL 14/16] accel/tcg/cpu-exec: Use generic 'helper-proto-common.h' header

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé We only need lookup_tb_ptr() prototype. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230611085846.21415-3-phi...@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 2 +- 1 file changed, 1 insertion(+),

[PULL 03/16] tcg/ppc: Define _CALL_AIX for clang on ppc64(be)

2023-06-20 Thread Richard Henderson
Restructure the ifdef ladder, separating 64-bit from 32-bit, and ensure _CALL_AIX is set for ELF v1. Fixes the build for ppc64 big-endian host with clang. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 23 --- 1 file

[PULL 02/16] accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN

2023-06-20 Thread Richard Henderson
Otherwise we hit the default assert not reached. Handle it as MO_ATOM_NONE, because of size and misalignment. We already handle this correctly in do_ld16_beN. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PULL 06/16] target/m68k: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 04/16] target/i386: Simplify i386_tr_init_disas_context()

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since cpu_mmu_index() is well-defined for user-only, we can remove the surrounding #ifdef'ry entirely. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230613133347.82210-2-phi...@linaro.org>

[PULL 15/16] exec/cpu-defs: Check for SOFTMMU instead of !USER_ONLY

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé We want to check the softmmu tlb availability, not if we are targetting system emulation. Besides, this code could be used by user emulation in the future. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 10/16] meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-20 Thread Richard Henderson
From: Philippe Mathieu-Daudé We use the CONFIG_USER_ONLY key to describe user emulation, and the CONFIG_SOFTMMU key to describe system emulation. Alias it as 'CONFIG_SYSTEM_ONLY' for parity with user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

Re: [PATCH v2] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-20 Thread Joao Martins
On 20/06/2023 04:04, Duan, Zhenzhong wrote: >> -Original Message- >> From: Avihai Horon >> Sent: Monday, June 19, 2023 7:14 PM > ... >>> a/hw/vfio/migration.c b/hw/vfio/migration.c index >>> 6b58dddb8859..bc51aa765cb8 100644 >>> --- a/hw/vfio/migration.c >>> +++ b/hw/vfio/migration.c >>>

[PATCH] target/riscv: Remove unuseful KVM stubs

2023-06-20 Thread Philippe Mathieu-Daudé
Since we always check whether KVM is enabled before calling kvm_riscv_reset_vcpu() and kvm_riscv_set_irq(), their call is elided by the compiler when KVM is not available. Therefore the stubs are not even linked. Remove them. Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/kvm-stub.c |

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Cédric Le Goater
On 6/20/23 09:48, Philippe Mathieu-Daudé wrote: Although the PPC target only supports the TCG and KVM accelerators, QEMU supports more. We can no assume that '!kvm == tcg', so test for the correct accelerator. This also eases code review, because here we don't care about KVM, we really want to

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Harsh Prateek Bora
On 6/20/23 13:18, Philippe Mathieu-Daudé wrote: Although the PPC target only supports the TCG and KVM accelerators, QEMU supports more. We can no assume that '!kvm == tcg', so test for the correct accelerator. This also eases code review, because here we don't care about KVM, we really want

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Claudio Fontana
On 6/20/23 09:48, Philippe Mathieu-Daudé wrote: > Although the PPC target only supports the TCG and KVM > accelerators, QEMU supports more. We can no assume that > '!kvm == tcg', so test for the correct accelerator. This > also eases code review, because here we don't care about > KVM, we really

[PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Philippe Mathieu-Daudé
Although the PPC target only supports the TCG and KVM accelerators, QEMU supports more. We can no assume that '!kvm == tcg', so test for the correct accelerator. This also eases code review, because here we don't care about KVM, we really want to test for TCG. Signed-off-by: Philippe

Re: [PATCH] tests/plugin: Remove duplicate insn log from libinsn.so

2023-06-20 Thread Richard Henderson
On 6/19/23 19:34, Alex Bennée wrote: Richard Henderson writes: On 6/12/23 04:50, Richard Henderson wrote: On 6/11/23 02:14, Alex Bennée wrote: Richard Henderson writes: This is a perfectly natural occurrence for x86 "rep movb", where the "rep" prefix forms a counted loop of the one

Re: [PATCH qemu 2/2] gdbstub: Fixed gdb_open() does not work issue while an extra 'x' is being added when converting '%s' to a pointer

2023-06-20 Thread Richard Henderson
On 6/8/23 11:06, ~foxes wrote: From: Foxes Hung Signed-off-by: Foxes Hung --- gdbstub/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c index 02e3a8f74c..4c6b5f728b 100644 --- a/gdbstub/syscalls.c +++ b/gdbstub/syscalls.c

Re: [PATCH qemu 1/2] semihosting: Added to support GDB_O_APPEND flag of host_open()

2023-06-20 Thread Richard Henderson
On 6/8/23 11:07, ~foxes wrote: From: Foxes Hung Signed-off-by: Foxes Hung --- semihosting/syscalls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index 68899ebb1c..1a5d39da01 100644 --- a/semihosting/syscalls.c +++

Re: [PATCH] target/arm: Restructure has_vfp_d32 test

2023-06-20 Thread Richard Henderson
On 6/20/23 07:29, Philippe Mathieu-Daudé wrote: On 19/6/23 16:02, Richard Henderson wrote: One cannot test for feature aa32_simd_r32 without first testing if AArch32 mode is supported at all.  This leads to qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither for Apple M1

[PATCH v4] hw/pci: enforce use of slot only slot 0 when devices have an upstream PCIE port

2023-06-20 Thread Ani Sinha
When a device has an upstream PCIE port, we can only use slot 0. Non-zero slots are invalid. This change ensures that we throw an error if the user tries to hotplug a device with an upstream PCIE port to a non-zero slot. CC: jus...@redhat.com CC: imamm...@redhat.com Resolves:

Re: [PATCH 3/9] MAINTAINERS: Add reviewer for XIVE

2023-06-20 Thread Frederic Barrat
On 20/06/2023 07:59, Cédric Le Goater wrote: Fred discusses frequently with the IBM HW designers, he is fluent in XIVE logic, add him as a reviewer. Cc: Frédéric Barrat Signed-off-by: Cédric Le Goater --- Acked-by: Frederic Barrat Fred MAINTAINERS | 1 + 1 file changed, 1

Re: [PATCH 1/9] MAINTAINERS: Add reviewers for PowerNV baremetal emulation

2023-06-20 Thread Frederic Barrat
On 20/06/2023 07:59, Cédric Le Goater wrote: Fred and Nick have been hacking baremetal POWER systems (OPAL) for many years. They use and modify the QEMU models regularly. Add them as PowerNV reviewers. Cc: Frédéric Barrat Cc: Nicholas Piggin Signed-off-by: Cédric Le Goater ---

[PATCH 8/9] ppc/pnv: Rephrase error when run with KVM

2023-06-20 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 590fc64b32e9..fc083173f346 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -799,7 +799,8 @@ static void pnv_init(MachineState *machine)

[PATCH 7/9] ppc/bamboo: Report an error when run with KVM

2023-06-20 Thread Cédric Le Goater
The 'bamboo' machine was used as a KVM platform in the early days (~2008). It clearly doesn't support it anymore. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc440_bamboo.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/ppc/ppc440_bamboo.c

[PATCH 6/9] ppc/sam460ex: Report an error when run with KVM

2023-06-20 Thread Cédric Le Goater
The 'sam460ex' machine never supported KVM. This piece of code was inherited from another model. Cc: BALATON Zoltan Signed-off-by: Cédric Le Goater --- hw/ppc/sam460ex.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c

[PATCH 5/9] ppc/pegasos2: Report an error when run with KVM

2023-06-20 Thread Cédric Le Goater
The 'pegasos2' machine never supported KVM. This piece of code was inherited from another model. Cc: BALATON Zoltan Signed-off-by: Cédric Le Goater --- hw/ppc/pegasos2.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index

[PATCH 4/9] ppc/prep: Report an error when run with KVM

2023-06-20 Thread Cédric Le Goater
The 'prep' machine never supported KVM. This piece of code was probably inherited from another model. Cc: Hervé Poussineau Signed-off-by: Cédric Le Goater --- hw/ppc/prep.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c

Re: [PATCH] ppc/pnv/pci: Clean up error messages

2023-06-20 Thread Cédric Le Goater
On 6/20/23 01:36, Joel Stanley wrote: The phb error macros add a newline for you, so remove the second one to avoid double whitespace. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 14 +++--- 1 file changed, 7 insertions(+),

[PATCH 9/9] target/ppc: Fix timer register accessors when !KVM

2023-06-20 Thread Cédric Le Goater
When the Timer Control and Timer Status registers are modified, avoid calling the KVM backend when not available Signed-off-by: Cédric Le Goater --- target/ppc/kvm.c | 12 1 file changed, 12 insertions(+) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index

[PATCH 1/9] MAINTAINERS: Add reviewers for PowerNV baremetal emulation

2023-06-20 Thread Cédric Le Goater
Fred and Nick have been hacking baremetal POWER systems (OPAL) for many years. They use and modify the QEMU models regularly. Add them as PowerNV reviewers. Cc: Frédéric Barrat Cc: Nicholas Piggin Signed-off-by: Cédric Le Goater --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 2/9] MAINTAINERS: Add reviewer for PowerPC TCG CPUs

2023-06-20 Thread Cédric Le Goater
Nick has great knowledge of the PowerPC CPUs, software and hardware. Add him as a reviewer on CPU TCG modeling. Cc: Nicholas Piggin Signed-off-by: Cédric Le Goater --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e6f3dade2230..90fb83c4cb58

[PATCH 0/9] ppc: New reviewers and KVM cleanups

2023-06-20 Thread Cédric Le Goater
Hello, Please welcome new reviewers on baremetal POWER systems ! Follow cleanups to report an error when KVM is used on non-KVM machines. Thanks, C. Cédric Le Goater (9): MAINTAINERS: Add reviewers for PowerNV baremetal emulation MAINTAINERS: Add reviewer for PowerPC TCG CPUs

[PATCH 3/9] MAINTAINERS: Add reviewer for XIVE

2023-06-20 Thread Cédric Le Goater
Fred discusses frequently with the IBM HW designers, he is fluent in XIVE logic, add him as a reviewer. Cc: Frédéric Barrat Signed-off-by: Cédric Le Goater --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 90fb83c4cb58..2e8c715eaca4 100644 ---

<    1   2   3   4   5