The PCMachineClass::pvh_enabled boolean was only used by
the pc-q35-3.1 and pc-i440fx-3.1 machines, which got removed.
Remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20260307152635.83893-3-philmd@linaro.org>
---
include/hw/i386/pc.h | 3 ---
hw/i386/nitro_enclave.c | 2 +-
hw/i386/pc.c | 6 ++----
hw/i386/x86-common.c | 3 +--
4 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 5623660f5dd..908de5e1eab 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -110,9 +110,6 @@ struct PCMachineClass {
bool enforce_amd_1tb_hole;
bool isa_bios_alias;
- /* use PVH to load kernels that support this feature */
- bool pvh_enabled;
-
/* create kvmclock device even when KVM PV features are not exposed */
bool kvmclock_create_always;
diff --git a/hw/i386/nitro_enclave.c b/hw/i386/nitro_enclave.c
index 640b1d8c548..4cd18166ff6 100644
--- a/hw/i386/nitro_enclave.c
+++ b/hw/i386/nitro_enclave.c
@@ -164,7 +164,7 @@ static void nitro_enclave_machine_initfn(Object *obj)
}
static void x86_load_eif(X86MachineState *x86ms, FWCfgState *fw_cfg,
- int acpi_data_size, bool pvh_enabled)
+ int acpi_data_size)
{
Error *err = NULL;
char *eif_kernel, *eif_initrd, *eif_cmdline;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 052226baa57..3fc2f0a057e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -588,7 +588,6 @@ void xen_load_linux(PCMachineState *pcms)
{
int i;
FWCfgState *fw_cfg;
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
X86MachineState *x86ms = X86_MACHINE(pcms);
assert(MACHINE(pcms)->kernel_filename != NULL);
@@ -598,7 +597,7 @@ void xen_load_linux(PCMachineState *pcms)
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus);
rom_set_fw(fw_cfg);
- x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, true);
for (i = 0; i < nb_option_roms; i++) {
assert(!strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
!strcmp(option_rom[i].name, "pvh.bin") ||
@@ -932,7 +931,7 @@ void pc_memory_init(PCMachineState *pcms,
}
if (linux_boot) {
- x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, true);
}
for (i = 0; i < nb_option_roms; i++) {
@@ -1673,7 +1672,6 @@ static void pc_machine_class_init(ObjectClass *oc, const void *data)
pcmc->has_reserved_memory = true;
pcmc->enforce_amd_1tb_hole = true;
pcmc->isa_bios_alias = true;
- pcmc->pvh_enabled = true;
pcmc->kvmclock_create_always = true;
x86mc->apic_xrupt_override = true;
assert(!mc->get_hotplug_handler);
diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c
index a420112666a..db8d4e855f4 100644
--- a/hw/i386/x86-common.c
+++ b/hw/i386/x86-common.c
@@ -704,8 +704,7 @@ void x86_load_linux(X86MachineState *x86ms,
* saving the PVH entry point used by the x86/HVM direct boot ABI.
* If load_elfboot() is successful, populate the fw_cfg info.
*/
- if (pvh_enabled &&
- load_elfboot(kernel_filename, kernel_size,
+ if (load_elfboot(kernel_filename, kernel_size,
header, pvh_start_addr, fw_cfg)) {
fclose(f);
--
2.53.0