Re: [PATCH v3] target/i386: Fix CPUID encoding of Fn8000001E_ECX

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

[PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password

2024-05-03 Thread Paolo Bonzini
qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else branch). Signed-off-by: Paolo Bonzini --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/co

[PATCH] kvm: ppc: disable sPAPR code if CONFIG_PSERIES is disabled

2024-05-03 Thread Paolo Bonzini
kvmppc_set_papr(). Signed-off-by: Paolo Bonzini --- target/ppc/kvm.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 63930d4a77d..46fccff7865 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -49,6 +49,8 @@ #include

Re: [PATCH] gitlab-ci: adjust msys2-64bit to be able to run qtest

2024-05-03 Thread Paolo Bonzini
On Fri, May 3, 2024 at 2:29 PM Daniel P. Berrangé wrote: > We have compile coverage of x86_64-softmmu on the cross-win64 mingw > job. So we're not loosing any compile coverage in aggregate with > this change, in fact we improve it by compiling sparc here. > > The msys2-64bit job currently takes

[PATCH] gitlab-ci: adjust msys2-64bit to be able to run qtest

2024-05-03 Thread Paolo Bonzini
sparc-softmmu is able to run a subset of qtests when compiled --without-default-devices, so use it instead of x86_64-softmmu for the msys2 run. Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/windows.yml | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.d

Re: [PATCH 1/5] accel/tcg: Simplify meson.build using subdir_done()

2024-05-03 Thread Paolo Bonzini
On Fri, May 3, 2024 at 11:17 AM Philippe Mathieu-Daudé wrote: > > If CONFIG_TCG is not defined, skip this directory calling > subdir_done(). Then since we know CONFIG_TCG is defined, > we don't need to check for it. You can only remove the check if you assume that TCG (unlike e.g. KVM) is

[PATCH] stm32l4x5_usart: add missing class_size

2024-05-03 Thread Paolo Bonzini
: main (main.c:47) Cc: Arnaud Minier Cc: Inès Varhol Cc: Peter Maydell Signed-off-by: Paolo Bonzini --- hw/char/stm32l4x5_usart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/stm32l4x5_usart.c b/hw/char/stm32l4x5_usart.c index 2627aab8324..8dbcc7e19e7 100644 --- a/hw/char

[PATCH] migration: do not include coroutine_int.h

2024-05-03 Thread Paolo Bonzini
Migration code needs no private fields of the coroutine backend. Include the "regular" coroutine.h header. Signed-off-by: Paolo Bonzini --- migration/migration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.h b/migration/migration.h index 8

[PATCH] tests/qtest: skip m48t59-test if the machine is not absent

2024-05-03 Thread Paolo Bonzini
Together with the series at https://patchew.org/QEMU/20240423131612.28362-1-pbonz...@redhat.com/, this allows adding sparc-softmmu to the target list of the build-without-defaults CI job. Signed-off-by: Paolo Bonzini --- tests/qtest/m48t59-test.c | 11 ++- 1 file changed, 6 insertions

Re: [PATCH 00/22] configs: switch boards to "default y"

2024-05-03 Thread Paolo Bonzini
On Tue, Apr 23, 2024 at 3:16 PM Paolo Bonzini wrote: > > Some boards, notably ARM boards that use TCG, are already using > "default y". This was done to remove TCG-only boards from > a KVM-only build in commit 29d9efca16 (2023-04-26). > > This series converts

[PATCH 12/13] tcg: remove CPU* types from typedefs.h

2024-05-02 Thread Paolo Bonzini
-off-by: Paolo Bonzini --- accel/tcg/tb-jmp-cache.h | 4 ++-- include/hw/core/cpu.h| 10 -- include/qemu/typedefs.h | 3 --- system/physmem.c | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/accel/tcg/tb-jmp-cache.h b/accel/tcg/tb-jmp-cache.h index

[PATCH 10/13] qapi/machine: remove types from typedefs.h

2024-05-02 Thread Paolo Bonzini
They are needed in very few places, which already depends on other generated QAPI files. The benefit of having these types in typedefs.h is small. Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 1 + include/qemu/typedefs.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions

[PATCH 02/13] qdev-core: remove DeviceListener from typedefs.h

2024-05-02 Thread Paolo Bonzini
It is needed in very few places, which already depend on other parts of qdev-core.h files. The benefit of having it in typedefs.h is small. Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 03/13] numa: remove types from typedefs.h

2024-05-02 Thread Paolo Bonzini
Exactly nobody needs them there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini --- include/qemu/typedefs.h | 2 -- include/sysemu/numa.h | 8 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu

[PATCH 13/13] pci: remove some types from typedefs.h

2024-05-02 Thread Paolo Bonzini
For types that are embedded in structs defined by pci.h, the definition is pretty much required to be available. Remove them from typedefs.h. Signed-off-by: Paolo Bonzini --- include/hw/pci/pcie.h | 3 +++ include/hw/pci/pcie_aer.h | 38 ++--- include

[PATCH 01/13] fw_cfg: remove useless declarations from typedefs.h

2024-05-02 Thread Paolo Bonzini
Only FWCfgState is used as part of APIs such as acpi_ghes_add_fw_cfg. Everything else need not be in typedefs.h. Signed-off-by: Paolo Bonzini --- include/hw/nvram/fw_cfg.h | 2 ++ include/qemu/typedefs.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/nvram

[PATCH 07/13] lockable: remove QemuLockable from typedefs.h

2024-05-02 Thread Paolo Bonzini
*and* using QemuLockable as a part of the CoQueue API). Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 4 ++-- include/qemu/lockable.h | 4 ++-- include/qemu/typedefs.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu

[PATCH 04/13] net: remove AnnounceTimer from typedefs.h

2024-05-02 Thread Paolo Bonzini
Exactly nobody needs it there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini --- include/net/announce.h | 4 ++-- include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/net/announce.h b/include/net

[PATCH 11/13] display: remove GraphicHwOps from typedefs.h

2024-05-02 Thread Paolo Bonzini
Basically all uses of GraphicHwOps are defining an instance of it, which requires the full definition of the struct. It is pointless to have it in typedefs.h. Signed-off-by: Paolo Bonzini --- hw/display/vga_int.h| 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1

[PATCH 06/13] intc: remove PICCommonState from typedefs.h

2024-05-02 Thread Paolo Bonzini
Move it to the existing "PIC related things" header, hw/intc/i8259.h. Signed-off-by: Paolo Bonzini --- include/hw/intc/i8259.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h index c

[PATCH 05/13] qemu-option: remove QemuOpt from typedefs.h

2024-05-02 Thread Paolo Bonzini
QemuOpt is basically an internal data structure. It has no business being defined except if you need functions from include/qemu/option.h. Signed-off-by: Paolo Bonzini --- include/qemu/option.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 08/13] migration: remove PostcopyDiscardState from typedefs.h

2024-05-02 Thread Paolo Bonzini
It is defined and referred to exclusively from a .c file. Signed-off-by: Paolo Bonzini --- include/qemu/typedefs.h | 1 - migration/postcopy-ram.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index ab24ca2876c

[PATCH 09/13] monitor: remove MonitorDef from typedefs.h

2024-05-02 Thread Paolo Bonzini
in typedefs.h is very small, do it and remove the type from typedefs.h. Signed-off-by: Paolo Bonzini --- include/monitor/hmp-target.h | 11 +++ include/qemu/typedefs.h | 1 - stubs/target-monitor-defs.c | 3 +-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include

[PATCH 00/13] remove some types from typedefs.h

2024-05-02 Thread Paolo Bonzini
eclarations of structs. I did that for patch 12 (tcg) because there are already a couple of forward declataions in include/hw/core/cpu.h, but that's more as food for thought than anything else. Paolo Paolo Bonzini (13): fw_cfg: remove useless declarations from typedefs.h qdev-core: remove DeviceListener

[PATCH] kvm: move target-dependent interrupt routing out of kvm-all.c

2024-05-02 Thread Paolo Bonzini
Let hw/hyperv/hyperv.c and hw/intc/s390_flic.c handle (respectively) SynIC and adapter routes, removing the code from target-independent files. This also removes the only occurrence of AdapterInfo outside s390 code, so remove that from typedefs.h. Signed-off-by: Paolo Bonzini --- include/qemu

[PATCH v2] bitmap: Use g_try_new0/g_renew

2024-05-02 Thread Paolo Bonzini
() has worse diagnostics than g_new0, which uses g_error to report the actual allocation size that failed. Cc: qemu-triv...@nongnu.org Cc: Roman Kiryanov Cc: Daniel Berrange Signed-off-by: Paolo Bonzini --- include/qemu/bitmap.h | 19 --- 1 file changed, 8 insertions(+), 11

Re: QEMU headers in C++

2024-05-02 Thread Paolo Bonzini
On 5/2/24 10:02, Daniel P. Berrangé wrote: Hi QEMU, I work in Android Studio Emulator and we would like to develop devices in C++. Unfortunately, QEMU headers cannot be used with C++ as is (e.g. they use C++ keywords as variable names or implicitly cast void* to T*). NB, in recent past QEMU

[PATCH] bitmap: Use g_try_new0/g_renew

2024-05-02 Thread Paolo Bonzini
Avoids an explicit use of sizeof(). The GLib allocation macros ensure that the multiplication by the size of the element uses the right type and does not overflow. Cc: qemu-triv...@nongnu.org Cc: Roman Kiryanov Cc: Daniel Berrange Signed-off-by: Paolo Bonzini --- include/qemu/bitmap.h | 12

Re: [PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-30 Thread Paolo Bonzini
On Fri, Apr 26, 2024 at 3:40 PM Peter Maydell wrote: > > +addr = memory_region_get_ram_ptr(mr) + section.offset_within_region; > > +rb = qemu_ram_block_from_host(addr, false, ); > > ...and this call to qemu_ram_block_from_host() will only initialize > offset if it does not fail (i.e.

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-25 Thread Paolo Bonzini
On Tue, Apr 23, 2024 at 10:42 PM Mark Cave-Ayland wrote: > > Let's change "Despite claims to the contrary" with "Despite a > > confusing description". > > Thanks for sorting this, Paolo. I suspect that KVM needs a similar patch as > per >

Re: [PULL v2 00/63] First batch of i386 and build system patch for QEMU 9.1

2024-04-25 Thread Paolo Bonzini
On Wed, Apr 24, 2024 at 8:49 PM Richard Henderson wrote: > > On 4/24/24 01:14, Paolo Bonzini wrote: > > The following changes since commit 62dbe54c24dbf77051bafe1039c31ddc8f37602d: > > > >Update version for v9.0.0-rc4 release (2024-04-16 18:06:15 +0100) > >

Re: [PATCH for-9.1 09/19] target/i386: move 60-BF opcodes to new decoder

2024-04-24 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 5:05 PM Zhao Liu wrote: > HMM, I met Guest boot failure on this patch because of ata unrecognized. > I haven't located the exact error yet, so let me post my log first. > If there are other means I can use to dig further, I'd be happy to try > that too. > > # Command (boot

Re: [PATCH] target/i386: Introduce SapphireRapids-v3 to add missing features

2024-04-24 Thread Paolo Bonzini
Queued, thanks. Paolo

[PULL v2 00/63] First batch of i386 and build system patch for QEMU 9.1

2024-04-24 Thread Paolo Bonzini
to file imports i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects hw/i386/sev: Use legacy SEV VM types for older machine types Paolo Bonzini (28): meson: do not link pixman automatically into all targets tests: only build plugins if TCG is enabled tests/unit

[PULL v2 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-04-24 Thread Paolo Bonzini
. Signed-off-by: Sean Christopherson Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-23-xiaoyao...@intel.com> Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 449 +- 1 file changed, 227 insertions(+

[PATCH] Kconfig: kvm: allow building without any board

2024-04-23 Thread Paolo Bonzini
is overkill, failing the build is impolite. Just include the PCI subsystem if kvm_arch_fixup_msi_route() requires it, as is the case for ARM and x86. Reported-by: Philippe Mathieu-Daudé Tested-by: Fabiano Rosas Signed-off-by: Paolo Bonzini --- target/arm/Kconfig | 2 ++ target/i386/Kconfig | 2 ++ 2

Re: [PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé ha scritto: > Hi Fabiano, > > On 23/4/24 20:02, Fabiano Rosas wrote: > > Paolo Bonzini writes: > > > >> For ARM targets, boards that require TCG are already using "default y". > >>

Re: [PATCH 00/22] configs: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
dit configs/devices/ to set e.g. CONFIG_ARM_VIRT=y, just like you did in order to enable devices. Paolo > > > > Paolo > > > > Paolo Bonzini (22): > > configs: list "implied" device groups in the default configs > > alpha: switch boards to &qu

[PULL 13/63] ramfb: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the ramfb stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/display/ and compile them when ramfb.c is absent. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-14-pb

[PULL 27/63] target/i386: Add new CPU model SierraForest

2024-04-23 Thread Paolo Bonzini
-by: Tao Su Message-ID: <20240320021044.508263-1-tao1...@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 126 ++ 1 file changed, 126 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 3f4b1214683..c295491d8ae

[PULL 44/63] target/i386: SEV: use KVM_SEV_INIT2 if possible

2024-04-23 Thread Paolo Bonzini
type). Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 2 ++ target/i386/sev.c | 41 + 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 974586e57a1..a9e93502734 100644

[PULL 22/63] hw: Add compat machines for 9.1

2024-04-23 Thread Paolo Bonzini
Add 9.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Reviewed-by: Cornelia Huck Acked-by: Thomas Huth Reviewed-by: Harsh Prateek Bora Reviewed-by: Zhao Liu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- include/hw/boards.h| 3 +++ include/hw/i386/pc.h | 3 +++ hw/arm

[PULL 35/63] s390: Switch to use confidential_guest_kvm_init()

2024-04-23 Thread Paolo Bonzini
From: Xiaoyao Li Use unified confidential_guest_kvm_init() for consistency with other architectures. Signed-off-by: Xiaoyao Li Message-Id: <20240229060038.606591-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- target/s390x/kvm/pv.h | 14 -- hw/s390x/s390-

[PULL 28/63] target/i386: Export RFDS bit to guests

2024-04-23 Thread Paolo Bonzini
, and has the microcode to help mitigate RFDS. Make RFDS_CLEAR and RFDS_NO bits available to guests. Signed-off-by: Pawan Gupta Reviewed-by: Xiaoyao Li Reviewed-by: Zhao Liu Message-ID: <9a38877857392b5c2deae7e7db1b170d15510314.1710341348.git.pawan.kumar.gu...@linux.intel.com> Signed-off-by:

[PULL 33/63] i386/sev: Switch to use confidential_guest_kvm_init()

2024-04-23 Thread Paolo Bonzini
/kvm/kvm.c to SEV code. Signed-off-by: Xiaoyao Li Message-Id: <20240229060038.606591-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/sev.h | 2 - target/i386/kvm/kvm.c | 10 +-- target/i386/kvm/sev-stub.c | 21 -- target/i386/sev.c

[PULL 05/63] yank: only build if needed

2024-04-23 Thread Paolo Bonzini
The yank feature is not used in user emulation. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-6-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- util/meson

[PULL 18/63] stubs: move monitor_fdsets_cleanup with other fdset stubs

2024-04-23 Thread Paolo Bonzini
Even though monitor_get_fd() has to remain separate because it is mocked by tests/unit/test-util-sockets, monitor_fdsets_cleanup() is logically part of the stubs for monitor/fds.c, so move it there. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522

[PULL 62/63] pythondeps.toml: warn about updates needed to docs/requirements.txt

2024-04-23 Thread Paolo Bonzini
docs/requirements.txt is expected by readthedocs and should be in sync with pythondeps.toml. Add a comment to both. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- docs/requirements.txt | 3 +++ pythondeps.toml | 1 + 2 files changed, 4

[PULL 63/63] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-23 Thread Paolo Bonzini
information I highly recommend the excellent write-up at https://www.os2museum.com/wp/sgdtsidt-fiction-and-reality/. Message-ID: <20240419195147.434894-1-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 14 -- 1 file changed, 8 inse

[PULL 09/63] stubs: remove obsolete stubs

2024-04-23 Thread Paolo Bonzini
These file define functions are are not called from common code anymore. Delete those functions and, if applicable, the entire files. Signed-off-by: Paolo Bonzini Acked-by: Richard Henderson Message-ID: <20240408155330.522792-10-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- i

[PULL 31/63] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-23 Thread Paolo Bonzini
] Using NULL legacy PIC However, no such log printed in guest kernel unless PCAT_COMPAT is cleared. Signed-off-by: Xiaoyao Li Message-ID: <20240403145953.3082491-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- hw/i386/acpi-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[PULL 23/63] target/i386: add guest-phys-bits cpu property

2024-04-23 Thread Paolo Bonzini
From: Gerd Hoffmann Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann Message-ID: <20240318155336.156197-3-kra...@redhat.com> Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- target/i386/cpu.

[PULL 06/63] util/qemu-config: Extract QMP commands to qemu-config-qmp.c

2024-04-23 Thread Paolo Bonzini
phi...@linaro.org> Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-7-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/config-file.h | 3 + monitor/qemu-config-qmp.c | 206 + util/qemu-config.c

[PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 2 + accel/kvm/kvm-all.c| 98 +- accel/kvm/trace-events | 2 + 3 files changed, 92 insertions(+), 10 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 217f3fe17ba..47f9e

[PULL 20/63] vga: move dirty memory region code together

2024-04-23 Thread Paolo Bonzini
Take into account split screen mode close to wrap around, which is the other special case for dirty memory region computation. Signed-off-by: Paolo Bonzini --- hw/display/vga.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index

[PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-04-23 Thread Paolo Bonzini
. Signed-off-by: Sean Christopherson Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-23-xiaoyao...@intel.com> Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm.c | 449 +- 1 file changed, 227 insertions(+

[PULL 46/63] hw/i386/sev: Use legacy SEV VM types for older machine types

2024-04-23 Thread Paolo Bonzini
to a newer QEMU/kernel version. Avoid this by continuing to use the older KVM_SEV_INIT/KVM_SEV_ES_INIT APIs for older machine types. Signed-off-by: Michael Roth Message-ID: <20240409230743.962513-4-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 1 + target/i386/sev

[PULL 52/63] HostMem: Add mechanism to opt in kvm guest memfd via MachineState

2024-04-23 Thread Paolo Bonzini
.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/hw/boards.h | 2 ++ include/sysemu/hostmem.h | 1 + backends/hostmem-file.c | 1 + backends/hostmem-memfd.c | 1 + backends/hostmem-ram.c | 1 + backends/hostmem.c | 1 + hw/core/machine.c| 5 + 7 files changed, 12 ins

[PULL 42/63] target/i386: introduce x86-confidential-guest

2024-04-23 Thread Paolo Bonzini
Introduce a common superclass for x86 confidential guest implementations. It will extend ConfidentialGuestSupportClass with a method that provides the VM type to be passed to KVM_CREATE_VM. Signed-off-by: Paolo Bonzini --- target/i386/confidential-guest.h | 40

[PULL 19/63] vga: optimize computation of dirty memory region

2024-04-23 Thread Paolo Bonzini
me "bwidth" computation that is used later in the function), thus restricting the slow path to the wraparound case. Signed-off-by: Paolo Bonzini --- hw/display/vga.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga

[PULL 24/63] kvm: add support for guest physical bits

2024-04-23 Thread Paolo Bonzini
Message-ID: <20240318155336.156197-2-kra...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm-cpu.c | 50 --- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c791

[PULL 26/63] target/i386: Introduce Icelake-Server-v7 to enable TSX

2024-04-23 Thread Paolo Bonzini
d ("target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model") Tested-by: Xiangfei Ma Signed-off-by: Zhenzhong Duan Message-ID: <20240320093138.80267-2-zhenzhong.d...@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 10 ++ 1 file chang

[PULL 39/63] runstate: skip initial CPU reset if reset is not actually possible

2024-04-23 Thread Paolo Bonzini
do not touch CPU state and that all such setup is done before, at the time of cpu_synchronize_all_post_init(). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- system/runstate.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/system

[PULL 16/63] stubs: split record/replay stubs further

2024-04-23 Thread Paolo Bonzini
of the tools and emulators, split the replay_mode stub into its own file. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-17-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- stubs/replay-mode.c | 4 stubs/replay.c | 2 -- stubs/meson.build | 1 + 3 files chan

[PULL 47/63] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory()

2024-04-23 Thread Paolo Bonzini
From: Xiaoyao Li The upper 16 bits of kvm_userspace_memory_region::slot are address space id. Parse it separately in trace_kvm_set_user_memory(). Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-5-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c

[PULL 49/63] RAMBlock: Add support of KVM private guest memfd

2024-04-23 Thread Paolo Bonzini
. Signed-off-by: Xiaoyao Li Reviewed-by: David Hildenbrand Message-ID: <20240320083945.991426-7-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 20 +--- include/exec/ram_addr.h | 2 +- include/exec/ramblock.h | 1 + include/sysemu/kvm.h

[PULL 03/63] ebpf: Restrict to system emulation

2024-04-23 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé eBPF is not used in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-2-phi...@linaro.org> Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-4-pbonz...@redhat.com>

[PULL 40/63] KVM: track whether guest state is encrypted

2024-04-23 Thread Paolo Bonzini
rom that point, skip reading registers so that cpu->vcpu_dirty is never true: if it ever becomes true, kvm_arch_put_registers() will fail miserably. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 2 ++ include/sysemu/kvm_int.h | 1 + accel/kvm/kvm

[PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import list

2024-04-23 Thread Paolo Bonzini
the list of allowed includes: it does not have a matching substitution, and therefore it would not be possible to use it on non-Linux systems where there is no /usr/include/asm-generic/ directory. Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini --- scripts/update-linux-headers.sh | 6

[PULL 43/63] target/i386: Implement mc->kvm_type() to get VM type

2024-04-23 Thread Paolo Bonzini
upport, but it will also enable support for VMSA features such as DebugSwap, which are only available via KVM_SEV_INIT2. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini --- target/i386/confidential-guest.h | 19 ++ target/i386/kvm/kvm_i386.h | 2 ++ hw/i386

[PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "notified". Signed-off-by: Zhao Liu Message-ID: <20240418100716.1085491-1-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- accel/tcg/icount-common.c | 6 ++ 1 file changed, 2

[PULL 32/63] confidential guest support: Add kvm_init() and kvm_reset() in class

2024-04-23 Thread Paolo Bonzini
yao...@intel.com> Signed-off-by: Paolo Bonzini --- include/exec/confidential-guest-support.h | 34 ++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/include/exec/confidential-guest-support.h b/include/exec/confidential-guest-support.h index ba2dd4b5dfc..e5b188cffbf

[PULL 41/63] KVM: remove kvm_arch_cpu_check_are_resettable

2024-04-23 Thread Paolo Bonzini
Board reset requires writing a fresh CPU state. As far as KVM is concerned, the only thing that blocks reset is that CPU state is encrypted; therefore, kvm_cpus_are_resettable() can simply check if that is the case. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- include

[PULL 15/63] colo: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the colo stubs are needed exactly when the build options are not enabled, move them together with the code they stub. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-16-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- stubs/colo.c => migration/colo-stub

[PULL 37/63] scripts/update-linux-headers: Add bits.h to file imports

2024-04-23 Thread Paolo Bonzini
From: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index d48856f9e24..5f20434d5c5 100755

[PULL 29/63] pci-host/q35: Move PAM initialization above SMRAM initialization

2024-04-23 Thread Paolo Bonzini
-18-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- hw/pci-host/q35.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 0d7d4e3f086..98d4a7c253a 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@

[PULL 59/63] target/i386/cpu: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
e to print the information only once without a static local variable "ht_warned". Signed-off-by: Zhao Liu Message-ID: <20240327103951.3853425-3-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-)

[PULL 54/63] physmem: Introduce ram_block_discard_guest_memfd_range()

2024-04-23 Thread Paolo Bonzini
Hildenbrand Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-12-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/exec/cpu-common.h | 2 ++ system/physmem.c | 23 +++ 2 files changed, 25 insertions(+) diff --git a/include/ex

[PULL 07/63] hw/core: Move system emulation files to system_ss

2024-04-23 Thread Paolo Bonzini
hotplug.c, qdev-hotplug.c and reset.c are not used by user emulation and need not be included in hwcore_ss. Move them to system_ss, where they belong, by letting the linker pull in the stubs when needed. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID

[PULL 60/63] target/i386/cpu: Merge the warning and error messages for AMD HT check

2024-04-23 Thread Paolo Bonzini
: Zhao Liu Message-ID: <20240327103951.3853425-4-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 28452983786..fd6af0d7632 100644 --- a/target/i386/cp

[PULL 11/63] hw/virtio: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the virtio memory device stubs are needed exactly when the Kconfig symbol is not enabled, they can be placed in hw/virtio/ and conditionalized on CONFIG_VIRTIO_MD. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-12-pbonz...@redhat.com>

[PULL 45/63] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects

2024-04-23 Thread Paolo Bonzini
-ID: <20240409230743.962513-2-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- qapi/qom.json | 11 ++- target/i386/sev.c | 18 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 85e6b4f84a2..38dde6d785a

[PULL 14/63] memory-device: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the memory-device stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/mem/. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-15-pbonz...@redhat.com> Signed-off-by:

[PULL 58/63] target/i386/host-cpu: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "warned". Signed-off-by: Zhao Liu Message-ID: <20240327103951.3853425-2-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/host-cpu.c | 11 --- 1 file changed, 4

[PULL 38/63] linux-headers: update to current kvm/next

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/standard-headers/asm-x86/bootparam.h | 17 +- include/standard-headers/asm-x86/kvm_para.h | 3 +- include/standard-headers/asm-x86/setup_data.h | 83 +++ include/standard-headers/linux/ethtool.h | 48 ++ include/standard-headers/linux/fuse.h

[PULL 53/63] RAMBlock: make guest_memfd require uncoordinated discard

2024-04-23 Thread Paolo Bonzini
inated discard, i.e. use ram_block_coordinated_discard_require(). [Commit message mostly by Michael Roth ] Signed-off-by: Paolo Bonzini --- system/physmem.c | 8 1 file changed, 8 insertions(+) diff --git a/system/physmem.c b/system/physmem.c index f5dfa20e57e..5ebcf5be116 100644 --- a/

[PULL 48/63] kvm: Introduce support for memory_attributes

2024-04-23 Thread Paolo Bonzini
or guest_memfd based private memory. Signed-off-by: Xiaoyao Li Message-ID: <20240320083945.991426-11-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 4 accel/kvm/kvm-all.c | 32 2 files changed, 36 insertions(+) diff --git a/i

[PULL 12/63] semihosting: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the semihosting stubs are needed exactly when the Kconfig symbols are not needed, move them to semihosting/ and conditionalize them on CONFIG_SEMIHOSTING and/or CONFIG_SYSTEM_ONLY. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-13-pbonz...@redhat.com> Signed-off-by:

[PULL 08/63] hw: Include minimal source set in user emulation build

2024-04-23 Thread Paolo Bonzini
. This removes about 10% from the time needed to run "../configure --disable-system --disable-tools --disable-guest-agent". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-8-phi...@linaro.org> Signed-off-by: Paolo Bon

[PULL 51/63] kvm/memory: Make memory type private by default if it has guest memfd backend

2024-04-23 Thread Paolo Bonzini
to private when memory region has valid guest memfd backend. Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-16-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a

[PULL 34/63] ppc/pef: switch to use confidential_guest_kvm_init/reset()

2024-04-23 Thread Paolo Bonzini
-by: Paolo Bonzini --- include/hw/ppc/pef.h | 17 - hw/ppc/pef.c | 9 ++--- hw/ppc/spapr.c | 10 +++--- 3 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 include/hw/ppc/pef.h diff --git a/include/hw/ppc/pef.h b/include/hw/ppc/pef.h deleted file

[PULL 57/63] kvm/tdx: Ignore memory conversion to shared of unassigned region

2024-04-23 Thread Paolo Bonzini
conversion request of non-assigned region to shared and return success. Otherwise OVMF is confused and panics there. Signed-off-by: Isaku Yamahata Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-35-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.

[PULL 56/63] kvm/tdx: Don't complain when converting vMMIO region to shared

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9eef2c64003..0911154bf8e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2927,9 +2927,22

[PULL 30/63] q35: Introduce smm_ranges property for q35-pci-host

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Sean Christopherson Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-19-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 1 + include/hw/pci-host/q35.h | 1 + hw/i386/pc_q35.c | 2 ++

[PULL 50/63] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot

2024-04-23 Thread Paolo Bonzini
-by: Xiaoyao Li Message-ID: <20240320083945.991426-10-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm_int.h | 2 ++ accel/kvm/kvm-all.c | 46 +--- accel/kvm/trace-events | 2 +- 3 files changed, 41 insertions(+), 9 del

[PULL 21/63] kvm: use configs/ definition to conditionalize debug support

2024-04-23 Thread Paolo Bonzini
If an architecture adds support for KVM_CAP_SET_GUEST_DEBUG but QEMU does not have the necessary code, QEMU will fail to build after updating kernel headers. Avoid this by using a #define in config-target.h instead of KVM_CAP_SET_GUEST_DEBUG. Signed-off-by: Paolo Bonzini --- configs/targets

[PULL 04/63] tests/unit: match some unit tests to corresponding feature switches

2024-04-23 Thread Paolo Bonzini
-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-5-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- tests/unit/meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build

[PULL 17/63] stubs: include stubs only if needed

2024-04-23 Thread Paolo Bonzini
Currently it is not documented anywhere why some functions need to be stubbed. Group the files in stubs/meson.build according to who needs them, both to reduce the size of the compilation and to clarify the use of stubs. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-18-pb

[PULL 10/63] hw/usb: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the USB stubs are needed exactly when the Kconfig symbols are not enabled, they can be placed in hw/usb/ and conditionalized on CONFIG_USB. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-11-pb

[PULL 01/63] meson: do not link pixman automatically into all targets

2024-04-23 Thread Paolo Bonzini
The dependency on pixman is listed manually in all sourcesets that need it. There is no need to bring into libqemuutil, since there is nothing in util/ that needs pixman either. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID

  1   2   3   4   5   6   7   8   9   10   >