[PULL 16/23] i386: Support module_id in X86CPUTopoIDs

2024-05-23 Thread Paolo Bonzini
ed-off-by: Zhuocheng Ding Co-developed-by: Zhuocheng Ding Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-16-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/topology.h | 17 + hw/i386/x86-common.c | 27 ++

[PULL 17/23] i386/cpu: Introduce module-id to X86CPU

2024-05-23 Thread Paolo Bonzini
-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-17-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h| 1 + hw/i386/x86-common.c | 33 + target/i386/cpu.c| 2 ++ 3 files changed, 28 insertions(+), 8 del

[PULL 15/23] i386: Expose module level in CPUID[0x1F]

2024-05-23 Thread Paolo Bonzini
1 modules. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-15-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/topology.h | 6 -- target/i386/cpu.h | 1 + hw/i386/x86-common.c | 2 +- t

[PULL 19/23] hw/i386/pc: Support smp.modules for x86 PC machine

2024-05-23 Thread Paolo Bonzini
bu Moger Message-ID: <20240424154929.1487382-19-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc.c| 1 + qemu-options.hx | 18 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6126bfdd2a7..7b638da7aaa

[PULL 14/23] i386: Support modules_per_die in X86CPUTopoInfo

2024-05-23 Thread Paolo Bonzini
Signed-off-by: Zhuocheng Ding Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-14-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/topology.h | 22 +++ hw/i386/x86.c | 9 +++- target/i386/cpu.c

[PULL 07/23] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4]

2024-05-23 Thread Paolo Bonzini
d-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-7-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 50 +-- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git

[PULL 20/23] i386: Add cache topology info in CPUCacheInfo

2024-05-23 Thread Paolo Bonzini
CPUCacheInfo.share_level. Signed-off-by: Zhao Liu Tested-by: Babu Moger Tested-by: Yongwei Ma Acked-by: Michael S. Tsirkin Message-ID: <20240424154929.1487382-20-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 7 +++ target/i386/cpu.

[PULL 13/23] i386: Introduce module level cpu topology to CPUX86State

2024-05-23 Thread Paolo Bonzini
Zhuocheng Ding Signed-off-by: Zhuocheng Ding Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-13-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h| 3 +++ hw/i386/x86-common.c | 5 + target/i386/cpu.c| 1 + 3 files chang

[PULL 05/23] target/i386: add control bits support for LAM

2024-05-23 Thread Paolo Bonzini
uo Reviewed-by: Xiaoyao Li Reviewed-by: Zhao Liu Message-ID: <20240112060042.19925-3-binbin...@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h| 7 ++- target/i386/helper.c | 4 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.

[PULL 21/23] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[4]

2024-05-23 Thread Paolo Bonzini
, wrap the encoding of CPUID[4].EAX[bits 31:26] into a helper to make the code cleaner. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Message-ID: <20240424154929.1487382-21-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.

[PULL 18/23] tests: Add test case of APIC ID for module level parsing

2024-05-23 Thread Paolo Bonzini
S. Tsirkin Message-ID: <20240424154929.1487382-18-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- tests/unit/test-x86-topo.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/unit/test-x86-topo.c b/tests/unit/test-x86-topo.c index f21b8a5d

[PULL 23/23] target-i386: hyper-v: Correct kvm_hv_handle_exit return value

2024-05-23 Thread Paolo Bonzini
: 267e071bd6d6 (“hyperv: make overlay pages for SynIC”) Suggested-by: Chao Gao Signed-off-by: Dongsheng Zhang Message-ID: <20240521200114.11588-1-dongsheng.x.zh...@intel.com> Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/kvm/hyperv.c | 2 +- 1 file changed, 1 inse

[PULL 01/23] target/i386: generate simpler code for ROL/ROR with immediate count

2024-05-23 Thread Paolo Bonzini
. gen_RCL and gen_RCR use a conditional branch to skip the computation if count is zero, so they can pass false unconditionally to gen_rot_overflow. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240522123914.608516-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonz

[PULL 08/23] i386/cpu: Use APIC ID info get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2024-05-23 Thread Paolo Bonzini
APM, vol.3, appendix.E.4.15 Function 8000_001Dh--Cache Topology Information Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Reviewed-by: Babu Moger Tested-by: Babu Moger Reviewed-by: Xiaoyao Li Message-ID: <20240424154929.1487382-8-zhao1....@intel.com> Signed-off-by: Paolo Bo

[PULL 22/23] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2024-05-23 Thread Paolo Bonzini
level to be encoded into CPUID[0x801D].EAX[bits 25:14]. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Reviewed-by: Babu Moger Message-ID: <20240424154929.1487382-22-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 10 +- 1 file c

[PULL 03/23] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-23 Thread Paolo Bonzini
uot;system.flash0" memory region only appears standalone when "isa-bios" is an alias. Signed-off-by: Bernhard Beschow Message-ID: <20240508175507.22270-7-shen...@gmail.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 1 + hw/i386/pc.c | 1 + hw/i386/pc_piix.c

[PULL 11/23] i386: Split topology types of CPUID[0x1F] from the definitions of CPUID[0xB]

2024-05-23 Thread Paolo Bonzini
lippe Mathieu-Daudé Tested-by: Babu Moger Message-ID: <20240424154929.1487382-11-zhao1@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 13 + target/i386/cpu.c | 14 +++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/target/i386/cpu

[PULL 12/23] i386/cpu: Decouple CPUID[0x1F] subleaf with specific topology level

2024-05-23 Thread Paolo Bonzini
CPUID[0x1F] subleaf with specific topology level. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Reviewed-by: Xiaoyao Li Message-ID: <20240424154929.1487382-12-zhao1....@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 135 +++

[PULL 10/23] i386/cpu: Introduce bitmap to cache available CPU topology levels

2024-05-23 Thread Paolo Bonzini
ology details. This is also in preparation for the follow-up to decouple CPUID[0x1F] subleaf with specific topology level. Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Tested-by: Babu Moger Reviewed-by: Xiaoyao Li Message-ID: <20240424154929.1487382-10-zhao1@intel.com> Signed-of

[PULL 09/23] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2024-05-23 Thread Paolo Bonzini
ested-by: Robert Hoo Tested-by: Yongwei Ma Signed-off-by: Zhao Liu Reviewed-by: Xiaoyao Li Reviewed-by: Philippe Mathieu-Daudé Tested-by: Babu Moger Message-ID: <20240424154929.1487382-9-zhao1....@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 31 ++---

[PULL 00/23] i386 changes for 2024-05-23

2024-05-23 Thread Paolo Bonzini
turn value Bernhard Beschow (1): hw/i386/pc_sysfw: Alias rather than copy isa-bios region Binbin Wu (1): target/i386: add control bits support for LAM Paolo Bonzini (2): target/i386: generate simpler code for ROL/ROR with immediate count target/i386: clean up AAM/AAD

[PULL 06/23] i386/cpu: Fix i/d-cache topology to core level for Intel CPU

2024-05-23 Thread Paolo Bonzini
lt;20240424154929.1487382-6-zhao1@intel.com> [Add compat property. - Paolo] Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 1 + target/i386/cpu.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4a2d6f5a97f..6126bfdd2a7 100644 --- a/hw/i

[PULL 04/23] target/i386: add support for LAM in CPUID enumeration

2024-05-23 Thread Paolo Bonzini
y: Xiaoyao Li Reviewed-by: Zhao Liu Message-ID: <20240112060042.19925-2-binbin...@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 2 ++ target/i386/cpu.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h i

[PULL 02/23] target/i386: clean up AAM/AAD

2024-05-23 Thread Paolo Bonzini
t;regs[R_EAX] that generic load/writeback code already does. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240522123912.608497-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/helper.h | 4 ++-- target/i386/tcg/int_helpe

Re: [PATCH] meson.build: add -mcx16 flag

2024-05-23 Thread Paolo Bonzini
On 5/22/24 21:30, Artyom Kunakovsky wrote: fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command Signed-off-by: Artyom Kunakovsky --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build

Re: [PATCH v3 3/3] meson: Drop the .fa library prefix

2024-05-22 Thread Paolo Bonzini
On Wed, May 22, 2024 at 3:45 PM Paolo Bonzini wrote: > > On Wed, May 22, 2024 at 12:49 PM Akihiko Odaki > wrote: > > The non-standard .fa library prefix breaks the link source > > de-duplication done by Meson so drop it. > > Can you show the difference in the command

Re: [PATCH v3 3/3] meson: Drop the .fa library prefix

2024-05-22 Thread Paolo Bonzini
On Wed, May 22, 2024 at 12:49 PM Akihiko Odaki wrote: > The non-standard .fa library prefix breaks the link source > de-duplication done by Meson so drop it. Can you show the difference in the command lines? One possibility to force de-duplication of objects is to change "link_whole: foo" to "ob

[PATCH] target/i386: generate simpler code for ROL/ROR with immediate count

2024-05-22 Thread Paolo Bonzini
. gen_RCL and gen_RCR use a conditional branch to skip the computation if count is zero, so they can pass false unconditionally to gen_rot_overflow. Signed-off-by: Paolo Bonzini --- target/i386/tcg/emit.c.inc | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) di

[PATCH] target/i386: clean up AAM/AAD

2024-05-22 Thread Paolo Bonzini
t;regs[R_EAX] that generic load/writeback code already does. Signed-off-by: Paolo Bonzini --- target/i386/helper.h | 4 ++-- target/i386/tcg/int_helper.c | 19 --- target/i386/tcg/decode-new.c.inc | 4 ++-- target/i386/tcg/emit.c.inc | 8 4 files chang

Re: [PATCH] Hyperv: Correct kvm_hv_handle_exit return value

2024-05-22 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v4 0/2] Add support for LAM in QEMU

2024-05-22 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v4 0/2] Add support for LAM in QEMU

2024-05-22 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-21 Thread Paolo Bonzini
Il mar 21 mag 2024, 09:10 Bernhard Beschow ha scritto: > This is the only patch in this series which hasn't got an R-b tag yet (the > others are already in master) and I'm not aware of any open issues. > I will queue it then. Paolo > Best regards, > Bernhard > >

[PULL 01/27] target/i386: remove PCOMMIT from TCG, deprecate property

2024-05-12 Thread Paolo Bonzini
sions, and deprecate the property just in case someone is using it as "pcommit=off". Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 8 target/i386/cpu.h | 2 -- target/i386/cpu.c | 2 +- target/i386/

[PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt

2024-05-12 Thread Paolo Bonzini
Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- tests/tcg/i386/test-i386.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 864c4e620d5..ce3bf74b5a8 100644 --- a/tests/tcg/i386/test-i386.c +++ b

[PULL 00/27] Build/arch cleanups, target/i386 fixes for 2024-05-10

2024-05-12 Thread Paolo Bonzini
ated * fix --without-default-devices build * fix --without-default-devices qtests on s390x and arm -------- Paolo Bonzini (27): target/i386: remove PCOMMIT from TCG, deprecate property target/i386: fix operand size for DATA16 RE

[PULL 27/27] configs: disable emulators that require it if libfdt is not found

2024-05-12 Thread Paolo Bonzini
mentioned explicitly in --target-list, in which case the build will fail. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + configs/targets/i386-softmmu.mak | 1 - confi

[PULL 26/27] hw/xtensa: require libfdt

2024-05-12 Thread Paolo Bonzini
All other boards require libfdt if it can be used (including for example i386/x86_64), so change the "imply" to "select" and always allow -dtb in qemu-system-xtensa. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/xtensa/xtfpga.c | 9 - hw

[PULL 03/27] target/i386: rdpkru/wrpkru are no-prefix instructions

2024-05-12 Thread Paolo Bonzini
Reject 0x66/0xf3/0xf2 in front of them. Cc: qemu-sta...@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c

[PULL 21/27] tests/qtest: arm: fix operation in a build without any boards or devices

2024-05-12 Thread Paolo Bonzini
ARM/aarch64 are easy to fix because they already have to pass a machine type by hand. Just guard the tests with a check that the machine actually exists. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-ID: <20240509170044.190795-14-pb

[PULL 15/27] xen: register legacy backends via xen_backend_init

2024-05-12 Thread Paolo Bonzini
backend_register callback, whose only purpose is to avoid registering nonfunctional backends. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240509170044.190795-8-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- include/hw/xen/xen-legacy-backend.

[PULL 02/27] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-12 Thread Paolo Bonzini
} which prints 5//5 on real hardware and 5/0000/ffff on QEMU. Cc: qemu-sta...@nongnu.org Reviewed-by: Zhao Liu Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 17 + 1 file changed, 1 insertion(+), 16 deletion

[PULL 20/27] i386: select correct components for no-board build

2024-05-12 Thread Paolo Bonzini
d but the APIC is. Signed-off-by: Paolo Bonzini Reviewed-by: Zhao Liu Message-ID: <20240509170044.190795-13-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/intc/ioapic-stub.c | 29 + .gitlab-ci.d/buildtest.yml | 2 +- hw/intc/meson.build| 2

[PULL 05/27] target/i386: fix feature dependency for WAITPKG

2024-05-12 Thread Paolo Bonzini
The VMX feature bit depends on general availability of WAITPKG, not the other way round. Fixes: 33cc88261c3 ("target/i386: add support for VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE", 2023-08-28) Cc: qemu-sta...@nongnu.org Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- t

[PULL 08/27] sh4: select correct components for no-board build

2024-05-12 Thread Paolo Bonzini
Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 5 +++-- hw/sh4/meson.build | 2 +- target/sh4/Kconfig | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index

[PULL 24/27] kconfig: allow compiling out QEMU device tree code per target

2024-05-12 Thread Paolo Bonzini
Introduce a new Kconfig symbol, CONFIG_DEVICE_TREE, that specifies whether to include the common device tree code in system/device_tree.c and to link to libfdt. For now, include it unconditionally if libfdt is available. Signed-off-by: Paolo Bonzini --- meson.build | 1

[PULL 10/27] s390_flic: add migration-enabled property

2024-05-12 Thread Paolo Bonzini
Instead of mucking with css_migration_enabled(), add a property specific to the FLIC device, similar to what is done for TYPE_S390_STATTRIB. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth Message-ID: <20240509170044.190795-3-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- i

[PULL 12/27] s390x: select correct components for no-board build

2024-05-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth Message-ID: <20240509170044.190795-5-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 4 ++-- target/s390x/Kconfig | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitla

[PULL 16/27] i386: correctly select code in hw/i386 that depends on other components

2024-05-12 Thread Paolo Bonzini
fw_cfg.c and vapic.c are currently included unconditionally but depend on other components. vapic.c depends on the local APIC, while fw_cfg.c includes a piece of AML builder code that depends on CONFIG_ACPI. Signed-off-by: Paolo Bonzini Reviewed-by: Zhao Liu Message-ID: <20240509170044.190

[PULL 22/27] meson: pick libfdt from common_ss when building target-specific files

2024-05-12 Thread Paolo Bonzini
Avoid having to list dependencies such as libfdt twice, both on common_ss and specific_ss. Instead, just take all the dependencies in common_ss and allow the target-specific libqemu-*.fa library to use them. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- meson.build

[PULL 09/27] s390x: move s390_cpu_addr2state to target/s390x/sigp.c

2024-05-12 Thread Paolo Bonzini
to sigp.c for simplicity. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth Message-ID: <20240509170044.190795-2-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/s390x/s390-virtio-ccw.c | 16 target/s390x/sigp.c| 17 + 2 files chang

[PULL 25/27] kconfig: express dependency of individual boards on libfdt

2024-05-12 Thread Paolo Bonzini
n express whether it needs FDT. It can then include the common code in the build via "select DEVICE_TREE", which will also as tell meson to link with libfdt. This allows building non-microvm x86 emulators without having libfdt available. Reviewed-by: Philippe Mathieu-Daudé

[PULL 18/27] hw/i386: split x86.c in multiple parts

2024-05-12 Thread Paolo Bonzini
Keep the basic X86MachineState definition in x86.c. Move out functions that are only needed by other files: x86-common.c for the pc and microvm machines, x86-cpu.c for those used by accelerator code. Signed-off-by: Paolo Bonzini Reviewed-by: Zhao Liu Message-ID: <20240509170044.190795-11-pb

[PULL 23/27] meson: move libfdt together with other dependencies

2024-05-12 Thread Paolo Bonzini
-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- meson.build | 79 ++--- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/meson.build b/meson.build index ab1f44b25c2..dd4a28f8f8f 100644 --- a/meson.build +++ b/meson.build

[PULL 07/27] configure: quote -D options that are passed through to meson

2024-05-12 Thread Paolo Bonzini
er, a somewhat realistic failure case would be with -Dpkg_config_path and a pkg-config directory that contains spaces. Cc: qemu-sta...@nongnu.org Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure

[PULL 14/27] xen: initialize legacy backends from xen_bus_init()

2024-05-12 Thread Paolo Bonzini
rything is ready at the time the xen_backend_init() functions are called, remove the xen_be_init() function from all the boards and place it directly in xen_bus_init(). Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240509170044.190795-7-pbonz...@redhat.com> Sign

[PULL 17/27] i386: pc: remove unnecessary MachineClass overrides

2024-05-12 Thread Paolo Bonzini
There is no need to override these fields of MachineClass because they are already set to the right value in the superclass. Signed-off-by: Paolo Bonzini Reviewed-by: Zhao Liu Message-ID: <20240509170044.190795-10-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/x86

[PULL 11/27] s390: move css_migration_enabled from machine to css.c

2024-05-12 Thread Paolo Bonzini
The CSS subsystem uses global variables, just face the truth and use a variable also for whether the CSS vmstate is in use; remove the indirection of fetching it from the machine type, which makes the TCG code depend unnecessarily on the virtio-ccw machine. Signed-off-by: Paolo Bonzini Message

[PULL 13/27] tests/qtest: s390x: fix operation in a build without any boards or devices

2024-05-12 Thread Paolo Bonzini
t get the memo; plus another one does not need a machine at all and can be run with -M none. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth Message-ID: <20240509170044.190795-6-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- tests/qtest/drive_del-test.c | 7 ++- 1 file

[PULL 19/27] hw/i386: move rtc-reset-reinjection command out of hw/rtc

2024-05-12 Thread Paolo Bonzini
tracking of all created RTC devices. Move the implementation to hw/i386, so that 1) it is available even if no RTC device exist 2) the only RTC that exists is easily found in x86ms->rtc. Signed-off-by: Paolo Bonzini Reviewed-by: Zhao Liu Message-ID: <20240509170044.190795-12-pbonz...@redh

[PULL 04/27] target/i386: move prefetch and multi-byte UD/NOP to new decoder

2024-05-12 Thread Paolo Bonzini
Henderson Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/translate.c | 30 -- target/i386/tcg/decode-new.c.inc | 24 +--- target/i386/tcg/emit.c.inc | 5 + 4 files changed

Re: [PATCH 03/13] s390: move css_migration_enabled from machine to css.c

2024-05-10 Thread Paolo Bonzini
On Fri, May 10, 2024 at 7:38 AM Thomas Huth wrote: > I think this is wrong: By adding this to ccw_machine_2_9_class_options the > variable now always gets set to false, even for newer machines, since the > *class_options functions are part of the "class_init" which is always done. > You have to ad

[PATCH 13/13] tests/qtest: arm: fix operation in a build without any boards or devices

2024-05-09 Thread Paolo Bonzini
ARM/aarch64 are easy to fix because they already have to pass a machine type by hand. Just guard the tests with a check that the machine actually exists. Signed-off-by: Paolo Bonzini --- tests/qtest/arm-cpu-features.c | 4 tests/qtest/migration-test.c | 6 ++ tests/qtest/numa-test.c

[PATCH 01/13] s390x: move s390_cpu_addr2state to target/s390x/sigp.c

2024-05-09 Thread Paolo Bonzini
to sigp.c for simplicity. Signed-off-by: Paolo Bonzini --- hw/s390x/s390-virtio-ccw.c | 16 target/s390x/sigp.c| 17 + 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index

[PATCH 08/13] i386: correctly select code in hw/i386 that depends on other components

2024-05-09 Thread Paolo Bonzini
fw_cfg.c and vapic.c are currently included unconditionally but depend on other components. vapic.c depends on the local APIC, while fw_cfg.c includes a piece of AML builder code that depends on CONFIG_ACPI. Signed-off-by: Paolo Bonzini --- hw/i386/fw_cfg.c| 2 ++ hw/i386/meson.build | 2

[PATCH 12/13] i386: select correct components for no-board build

2024-05-09 Thread Paolo Bonzini
d but the APIC is. Signed-off-by: Paolo Bonzini --- hw/intc/ioapic-stub.c | 29 + .gitlab-ci.d/buildtest.yml | 2 +- hw/intc/meson.build| 2 +- target/i386/Kconfig| 1 + 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 hw

[PATCH 07/13] xen: register legacy backends via xen_backend_init

2024-05-09 Thread Paolo Bonzini
backend_register callback, whose only purpose is to avoid registering nonfunctional backends. Signed-off-by: Paolo Bonzini --- include/hw/xen/xen-legacy-backend.h | 14 ++ include/hw/xen/xen_pvdev.h | 1 - hw/9pfs/xen-9p-backend.c| 8 +++- hw/display

[PATCH 02/13] s390_flic: add migration-enabled property

2024-05-09 Thread Paolo Bonzini
Instead of mucking with css_migration_enabled(), add a property specific to the FLIC device, similar to what is done for TYPE_S390_STATTRIB. Signed-off-by: Paolo Bonzini --- include/hw/s390x/s390_flic.h | 1 + hw/intc/s390_flic.c | 6 +- hw/s390x/s390-virtio-ccw.c | 1 + 3 files

[PATCH 03/13] s390: move css_migration_enabled from machine to css.c

2024-05-09 Thread Paolo Bonzini
The CSS subsystem uses global variables, just face the truth and use a variable also for whether the CSS vmstate is in use; remove the indirection of fetching it from the machine type, which makes the TCG code depend unnecessarily on the virtio-ccw machine. Signed-off-by: Paolo Bonzini

[PATCH 06/13] xen: initialize legacy backends from xen_bus_init()

2024-05-09 Thread Paolo Bonzini
rything is ready at the time the xen_backend_init() functions are called, remove the xen_be_init() function from all the boards and place it directly in xen_bus_init(). Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 1 - hw/xen/xen-bus.c | 4 hw/xen/xen-hvm-common.c

[PATCH 00/13] fix --without-default-devices build and (mostly) tests

2024-05-09 Thread Paolo Bonzini
ut boards on vanilla upstream configs is the more pressing problem, though. Patches 6 and 7 were tested with the Avocado Xen-on-KVM tests. Paolo Paolo Bonzini (13): s390x: move s390_cpu_addr2state to target/s390x/sigp.c s390_flic: add migration-enabled property s390: move css_migration_ena

[PATCH 05/13] tests/qtest: s390x: fix operation in a build without any boards or devices

2024-05-09 Thread Paolo Bonzini
t get the memo; plus another one does not need a machine at all and can be run with -M none. Signed-off-by: Paolo Bonzini --- tests/qtest/drive_del-test.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c

[PATCH 11/13] hw/i386: move rtc-reset-reinjection command out of hw/rtc

2024-05-09 Thread Paolo Bonzini
tracking of all created RTC devices. Move the implementation to hw/i386, so that 1) it is available even if no RTC device exist 2) the only RTC that exists is easily found in x86ms->rtc. Signed-off-by: Paolo Bonzini --- include/hw/rtc/mc146818rtc.h | 2 +- hw/i386/monitor.c|

[PATCH 10/13] hw/i386: split x86.c in multiple parts

2024-05-09 Thread Paolo Bonzini
Keep the basic X86MachineState definition in x86.c. Move out functions that are only needed by other files: x86-common.c for the pc and microvm machines, x86-cpu.c for those used by accelerator code. Signed-off-by: Paolo Bonzini --- include/hw/i386/x86.h |6 +- hw/i386/x86-common.c | 1007

[PATCH 09/13] i386: pc: remove unnecessary MachineClass overrides

2024-05-09 Thread Paolo Bonzini
There is no need to override these fields of MachineClass because they are already set to the right value in the superclass. Signed-off-by: Paolo Bonzini --- include/hw/i386/x86.h | 4 hw/i386/pc.c | 3 --- hw/i386/x86.c | 6 +++--- 3 files changed, 3 insertions(+), 10

[PATCH 04/13] s390x: select correct components for no-board build

2024-05-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 4 ++-- target/s390x/Kconfig | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 13afd0df1f0..f8502905203 100644 --- a/.gitlab-ci.d/buildtest.yml

[PATCH] target/i386: add feature dependency for XSAVE

2024-05-09 Thread Paolo Bonzini
The XSAVEOPT, XSAVEC, XGETBV1, XSAVES features make no sense if you cannot enable XSAVE in the first place. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index f2ea6899e39..6f5ff71c6ee 100644

[PATCH] target/i386: fix feature dependency for WAITPKG

2024-05-09 Thread Paolo Bonzini
The VMX feature bit depends on general availability of WAITPKG, not the other way round. Fixes: 33cc88261c3 ("target/i386: add support for VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE", 2023-08-28) Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 4 ++

[PATCH] target/i386: move prefetch and multi-byte UD/NOP to new decoder

2024-05-09 Thread Paolo Bonzini
These are trivial to add, and moving them to the new decoder fixes some corner cases: raising #UD instead of an instruction fetch page fault for the undefined opcodes, and incorrectly rejecting 0F 18 prefetches with register operands (which are treated as reserved NOPs). Signed-off-by: Paolo

[PATCH] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-09 Thread Paolo Bonzini
); } which prints 5//5 on real hardware and 5// on QEMU. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/target/i386/tcg/translate.c b/t

[PATCH] tests/tcg: cover lzcnt/tzcnt/popcnt

2024-05-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/tcg/i386/test-i386.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 864c4e620d5..ce3bf74b5a8 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386

[PATCH] target/i386: rdpkru/wrpkru are no-prefix instructions

2024-05-09 Thread Paolo Bonzini
Reject 0x66/0xf3/0xf2 in front of them. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 5366dc32dd3..3da4fdf64cc

Re: [PATCH v2 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-08 Thread Paolo Bonzini
On Tue, Apr 30, 2024 at 5:39 PM Philippe Mathieu-Daudé wrote: > I'm still not convinced we need a migration back compat for this... It's absolutely needed, memory_region_init_ram(isa_bios, NULL, "isa-bios", isa_bios_size, &error_fatal); will register a RAM region

[PATCH] target/i386: remove PCOMMIT from TCG, deprecate property

2024-05-08 Thread Paolo Bonzini
sions, and deprecate the property just in case someone is using it as "pcommit=off". Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 8 target/i386/cpu.h | 2 -- target/i386/cpu.c | 2 +- target/i386/tcg/translate.c | 12 +---

Re: Hermetic virtio-vsock in QEMU

2024-05-08 Thread Paolo Bonzini
On Wed, May 8, 2024 at 2:51 PM Daniel P. Berrangé wrote: > Designwise, a native VSOCK backend in QEMU really should implement the > same approach defined by firecracker, so that we have interoperability > with systemd, firecracker and cloud-hypervisor. See > > https://gitlab.com/qemu-project/qem

Re: Hermetic virtio-vsock in QEMU

2024-05-08 Thread Paolo Bonzini
On 5/8/24 11:38, Stefano Garzarella wrote: On Wed, May 08, 2024 at 01:13:09PM GMT, Marc-André Lureau wrote: Hi On Wed, May 8, 2024 at 11:50 AM Stefano Garzarella wrote: Hi Roman, On Tue, May 07, 2024 at 11:20:50PM GMT, Roman Kiryanov wrote: >Hi Stefano, > >On Tue, May 7, 2024 at 1:10 AM St

[PATCH] virtio-blk: remove SCSI passthrough functionality

2024-05-08 Thread Paolo Bonzini
: Paolo Bonzini --- docs/about/deprecated.rst | 10 -- docs/about/removed-features.rst | 8 ++ hw/block/virtio-blk.c | 166 +++- hw/core/machine.c | 2 - 4 files changed, 19 insertions(+), 167 deletions(-) diff --git a/docs/about

[PATCH 5/6] hw/xtensa: require libfdt

2024-05-08 Thread Paolo Bonzini
All other boards require libfdt if it can be used (including for example i386/x86_64), so change the "imply" to "select" and always allow -dtb in qemu-system-xtensa. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/xtensa/xtfpga.c | 9 - hw

[PATCH 6/6] configs: disable emulators that require it if libfdt is not found

2024-05-08 Thread Paolo Bonzini
mentioned explicitly in --target-list, in which case the build will fail. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + configs/targets/i386-softmmu.mak | 1 - confi

[PATCH 3/6] kconfig: allow compiling out QEMU device tree code per target

2024-05-08 Thread Paolo Bonzini
Introduce a new Kconfig symbol, CONFIG_DEVICE_TREE, that specifies whether to include the common device tree code in system/device_tree.c and to link to libfdt. For now, include it unconditionally if libfdt is available. Signed-off-by: Paolo Bonzini --- meson.build | 1

[PATCH 2/6] meson: move libfdt together with other dependencies

2024-05-08 Thread Paolo Bonzini
-off-by: Paolo Bonzini --- meson.build | 79 ++--- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/meson.build b/meson.build index 7ca0ba4987f..2e7e2b15406 100644 --- a/meson.build +++ b/meson.build @@ -1858,6 +1858,34 @@ if numa.found

[PATCH 4/6] kconfig: express dependency of individual boards on libfdt

2024-05-08 Thread Paolo Bonzini
n express whether it needs FDT. It can then include the common code in the build via "select DEVICE_TREE", which will also as tell meson to link with libfdt. This allows building non-microvm x86 emulators without having libfdt available. Reviewed-by: Philippe Mathieu-Daudé

[PATCH 1/6] meson: pick libfdt from common_ss when building target-specific files

2024-05-08 Thread Paolo Bonzini
Avoid having to list dependencies such as libfdt twice, both on common_ss and specific_ss. Instead, just take all the dependencies in common_ss and allow the target-specific libqemu-*.fa library to use them. Signed-off-by: Paolo Bonzini --- meson.build | 14 +++--- hw/arm

[PATCH v2 0/6] kconfig: express dependency of individual boards on libfdt

2024-05-08 Thread Paolo Bonzini
the --without-default-features mode", 2022-02-21) - patch 6 does not - split patch 3 in two parts - fix compilation errors due to missing qmp_dumpdtb/hmp_dumpdtb - make MIPS_BOSTON depend on FDT Paolo Bonzini (6): meson: pick libfdt from common_ss when building target-specific fil

[PATCH] loongarch64: move memory map to boot.c

2024-05-07 Thread Paolo Bonzini
Ensure that it can be used even if virt.c is not included in the build, as is the case for --without-default-devices. Signed-off-by: Paolo Bonzini --- include/hw/loongarch/boot.h | 10 ++ include/hw/loongarch/virt.h | 10 -- hw/loongarch/boot.c | 3 +++ hw/loongarch

[PATCH] sh4: select correct components for no-board build

2024-05-07 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 5 +++-- hw/sh4/meson.build | 2 +- target/sh4/Kconfig | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index bab61945643..13afd0df1f0

Re: [PATCH] configure: quote -D options that are passed to meson

2024-05-07 Thread Paolo Bonzini
On Tue, May 7, 2024 at 1:58 PM Peter Maydell wrote: > > On Tue, 7 May 2024 at 11:50, Paolo Bonzini wrote: > > > > Ensure that they go through unmodified, instead of removing one layer > > of quoting. > > Do you have an example of what goes wrong that we could > m

[PULL 07/26] target/i386: pull cc_op update to callers of gen_jmp_rel{, _csize}

2024-05-07 Thread Paolo Bonzini
should have done it. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 466fee38c0e..024da6d88eb 100644 --- a/target

[PULL 02/26] target/i386: use TSTEQ/TSTNE to test low bits

2024-05-07 Thread Paolo Bonzini
comparison against zero anyway, and it avoids shifts by 64 which are undefined behavior. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 28 target/i386/tcg/emit.c.inc | 5 ++--- 2 files changed, 22 insertions(+), 11

[PULL 23/26] target/i386: remove now-converted opcodes from old decoder

2024-05-07 Thread Paolo Bonzini
Send all converted opcodes to disas_insn_new() directly from the big decoding switch statement; once more, the debugging/bisecting logic disappears. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/helper.h| 11 - target/i386/tcg

<    3   4   5   6   7   8   9   10   11   12   >