hw/i386/pc: Remove PCMachineClass::pvh_enabled field
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>
Philippe Mathieu-Daudé committed
Apr 29, 2025 at 16:48 UTC
16d07e251ca8645f8509d404d177065e919a43e3
4 files changed
+4
-10
hw/i386/nitro_enclave.c
+1
-1
@@ -164,7 +164,7 @@ static void nitro_enclave_machine_initfn(Object *obj)
164
}
165
166
static void x86_load_eif(X86MachineState *x86ms, FWCfgState *fw_cfg,
167
- int acpi_data_size, bool pvh_enabled)
167
+ int acpi_data_size)
168
{
169
Error *err = NULL;
170
char *eif_kernel, *eif_initrd, *eif_cmdline;
hw/i386/pc.c
+2
-4
@@ -588,7 +588,6 @@ void xen_load_linux(PCMachineState *pcms)
588
{
589
int i;
590
FWCfgState *fw_cfg;
591
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
591
X86MachineState *x86ms = X86_MACHINE(pcms);
592
593
assert(MACHINE(pcms)->kernel_filename != NULL);
@@ -598,7 +597,7 @@ void xen_load_linux(PCMachineState *pcms)
597
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus);
598
rom_set_fw(fw_cfg);
599
601
- x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
600
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, true);
601
for (i = 0; i < nb_option_roms; i++) {
602
assert(!strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
603
!strcmp(option_rom[i].name, "pvh.bin") ||
@@ -932,7 +931,7 @@ void pc_memory_init(PCMachineState *pcms,
931
}
932
933
if (linux_boot) {
935
- x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled);
934
+ x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, true);
935
}
936
937
for (i = 0; i < nb_option_roms; i++) {
@@ -1673,7 +1672,6 @@ static void pc_machine_class_init(ObjectClass *oc, const void *data)
1672
pcmc->has_reserved_memory = true;
1673
pcmc->enforce_amd_1tb_hole = true;
1674
pcmc->isa_bios_alias = true;
1676
- pcmc->pvh_enabled = true;
1675
pcmc->kvmclock_create_always = true;
1676
x86mc->apic_xrupt_override = true;
1677
assert(!mc->get_hotplug_handler);
hw/i386/x86-common.c
+1
-2
@@ -704,8 +704,7 @@ void x86_load_linux(X86MachineState *x86ms,
704
* saving the PVH entry point used by the x86/HVM direct boot ABI.
705
* If load_elfboot() is successful, populate the fw_cfg info.
706
*/
707
- if (pvh_enabled &&
708
- load_elfboot(kernel_filename, kernel_size,
707
+ if (load_elfboot(kernel_filename, kernel_size,
708
header, pvh_start_addr, fw_cfg)) {
709
fclose(f);
710
include/hw/i386/pc.h
-3
@@ -110,9 +110,6 @@ struct PCMachineClass {
110
bool enforce_amd_1tb_hole;
111
bool isa_bios_alias;
112
113
- /* use PVH to load kernels that support this feature */
114
- bool pvh_enabled;
115
-
113
/* create kvmclock device even when KVM PV features are not exposed */
114
bool kvmclock_create_always;
115