aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-23 17:35:57 -0700
committerRichard Henderson <richard.henderson@linaro.org>2024-04-23 17:35:57 -0700
commit13b1e9667737132440f4d500c31cb69320c6b15a (patch)
treec598a1b459bdb3fceabc97393178d34497f65e4a /hw/core
parent1a6f53953df65f31e922f8a1763dac9f10adc81b (diff)
parent7653b44534d3267fa63ebc9d7221eaa7b48bf5ae (diff)
downloadqemu-13b1e9667737132440f4d500c31cb69320c6b15a.zip
qemu-13b1e9667737132440f4d500c31cb69320c6b15a.tar.gz
qemu-13b1e9667737132440f4d500c31cb69320c6b15a.tar.bz2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* cleanups for stubs * do not link pixman automatically into all targets * optimize computation of VGA dirty memory region * kvm: use configs/ definition to conditionalize debug support * hw: Add compat machines for 9.1 * target/i386: add guest-phys-bits cpu property * target/i386: Introduce Icelake-Server-v7 and SierraForest models * target/i386: Export RFDS bit to guests * q35: SMM ranges cleanups * target/i386: basic support for confidential guests * linux-headers: update headers * target/i386: SEV: use KVM_SEV_INIT2 if possible * kvm: Introduce support for memory_attributes * RAMBlock: Add support of KVM private guest memfd * Consolidate use of warn_report_once() * pythondeps.toml: warn about updates needed to docs/requirements.txt * target/i386: always write 32-bits for SGDT and SIDT # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmYn1UkUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroO1nwgAhRQhkYcdtFc649WJWTNvJCNzmek0 # Sg7trH2NKlwA75zG8Qv4TR3E71UrXoY9oItwYstc4Erz+tdf73WyaHMF3cEk1p82 # xx3LcBYhP7jGSjabxTkZsFU8+MM1raOjRN/tHvfcjYLaJOqJZplnkaVhMbNPsVuM # IPJ5bVQohxpmHKPbeFNpF4QJ9wGyZAYOfJOFCk09xQtHnA8CtFjS9to33QPAR/Se # OVZwRCigVjf0KNmCnHC8tJHoW8pG/cdQAr3qqd397XbM1vVELv9fiXiMoGF78UsY # trO4K2yg6N5Sly4Qv/++zZ0OZNkL3BREGp3wf4eTSvLXxqSGvfi8iLpFGA== # =lwSL # -----END PGP SIGNATURE----- # gpg: Signature made Tue 23 Apr 2024 08:35:37 AM PDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (63 commits) target/i386/translate.c: always write 32-bits for SGDT and SIDT pythondeps.toml: warn about updates needed to docs/requirements.txt accel/tcg/icount-common: Consolidate the use of warn_report_once() target/i386/cpu: Merge the warning and error messages for AMD HT check target/i386/cpu: Consolidate the use of warn_report_once() target/i386/host-cpu: Consolidate the use of warn_report_once() kvm/tdx: Ignore memory conversion to shared of unassigned region kvm/tdx: Don't complain when converting vMMIO region to shared kvm: handle KVM_EXIT_MEMORY_FAULT physmem: Introduce ram_block_discard_guest_memfd_range() RAMBlock: make guest_memfd require uncoordinated discard HostMem: Add mechanism to opt in kvm guest memfd via MachineState kvm/memory: Make memory type private by default if it has guest memfd backend kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot RAMBlock: Add support of KVM private guest memfd kvm: Introduce support for memory_attributes trace/kvm: Split address space and slot id in trace_kvm_set_user_memory() hw/i386/sev: Use legacy SEV VM types for older machine types i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects target/i386: SEV: use KVM_SEV_INIT2 if possible ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/hotplug-stubs.c34
-rw-r--r--hw/core/machine.c8
-rw-r--r--hw/core/meson.build14
3 files changed, 11 insertions, 45 deletions
diff --git a/hw/core/hotplug-stubs.c b/hw/core/hotplug-stubs.c
deleted file mode 100644
index 7aadaa2..0000000
--- a/hw/core/hotplug-stubs.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Hotplug handler stubs
- *
- * Copyright (c) Red Hat
- *
- * Authors:
- * Philippe Mathieu-Daudé <philmd@redhat.com>,
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- */
-#include "qemu/osdep.h"
-#include "hw/qdev-core.h"
-
-HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev)
-{
- return NULL;
-}
-
-void hotplug_handler_pre_plug(HotplugHandler *plug_handler,
- DeviceState *plugged_dev,
- Error **errp)
-{
- g_assert_not_reached();
-}
-
-void hotplug_handler_plug(HotplugHandler *plug_handler,
- DeviceState *plugged_dev,
- Error **errp)
-{
- g_assert_not_reached();
-}
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 37ede0e..582c2df 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -33,6 +33,9 @@
#include "hw/virtio/virtio-iommu.h"
#include "audio/audio.h"
+GlobalProperty hw_compat_9_0[] = {};
+const size_t hw_compat_9_0_len = G_N_ELEMENTS(hw_compat_9_0);
+
GlobalProperty hw_compat_8_2[] = {
{ "migration", "zero-page-detection", "legacy"},
{ TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" },
@@ -1198,6 +1201,11 @@ bool machine_mem_merge(MachineState *machine)
return machine->mem_merge;
}
+bool machine_require_guest_memfd(MachineState *machine)
+{
+ return machine->require_guest_memfd;
+}
+
static char *cpu_slot_to_string(const CPUArchId *cpu)
{
GString *s = g_string_new(NULL);
diff --git a/hw/core/meson.build b/hw/core/meson.build
index e26f2e0..f20d414 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -3,7 +3,6 @@ hwcore_ss.add(files(
'bus.c',
'qdev-properties.c',
'qdev.c',
- 'reset.c',
'resetcontainer.c',
'resettable.c',
'vmstate-if.c',
@@ -12,16 +11,6 @@ hwcore_ss.add(files(
'clock.c',
'qdev-clock.c',
))
-if have_system
- hwcore_ss.add(files(
- 'hotplug.c',
- 'qdev-hotplug.c',
- ))
-else
- hwcore_ss.add(files(
- 'hotplug-stubs.c',
- ))
-endif
common_ss.add(files('cpu-common.c'))
common_ss.add(files('machine-smp.c'))
@@ -40,6 +29,7 @@ system_ss.add(files(
'cpu-sysemu.c',
'fw-path-provider.c',
'gpio.c',
+ 'hotplug.c',
'loader.c',
'machine-hmp-cmds.c',
'machine-qmp-cmds.c',
@@ -48,7 +38,9 @@ system_ss.add(files(
'null-machine.c',
'numa.c',
'qdev-fw.c',
+ 'qdev-hotplug.c',
'qdev-properties-system.c',
+ 'reset.c',
'sysbus.c',
'vm-change-state-handler.c',
'clock-vmstate.c',