Skip to content

Commit 8279371

Browse files
committed
Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200710' into staging
xen patches Fixes following harden checks in qdev. # gpg: Signature made Fri 10 Jul 2020 14:05:46 BST # gpg: using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF # gpg: issuer "[email protected]" # gpg: Good signature from "Anthony PERARD <[email protected]>" [marginal] # gpg: aka "Anthony PERARD <[email protected]>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5379 2F71 024C 600F 778A 7161 D8D5 7199 DF83 42C8 # Subkey fingerprint: F80C 0063 08E2 2CFD 8A92 E798 0CF5 572F D7FB 55AF * remotes/aperard/tags/pull-xen-20200710: xen: cleanup unrealized flash devices xen: Fix xen-legacy-backend qdev types Signed-off-by: Peter Maydell <[email protected]>
2 parents 0fb7ea4 + dd29b5c commit 8279371

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

hw/i386/pc_piix.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,12 @@ static void pc_init1(MachineState *machine,
186186
if (!xen_enabled()) {
187187
pc_memory_init(pcms, system_memory,
188188
rom_memory, &ram_memory);
189-
} else if (machine->kernel_filename != NULL) {
190-
/* For xen HVM direct kernel boot, load linux here */
191-
xen_load_linux(pcms);
189+
} else {
190+
pc_system_flash_cleanup_unused(pcms);
191+
if (machine->kernel_filename != NULL) {
192+
/* For xen HVM direct kernel boot, load linux here */
193+
xen_load_linux(pcms);
194+
}
192195
}
193196

194197
gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled);

hw/i386/pc_sysfw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void pc_system_flash_create(PCMachineState *pcms)
108108
}
109109
}
110110

111-
static void pc_system_flash_cleanup_unused(PCMachineState *pcms)
111+
void pc_system_flash_cleanup_unused(PCMachineState *pcms)
112112
{
113113
char *prop_name;
114114
int i;

hw/xen/xen-legacy-backend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,12 @@ static void xendev_class_init(ObjectClass *klass, void *data)
789789
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
790790
/* xen-backend devices can be plugged/unplugged dynamically */
791791
dc->user_creatable = true;
792+
dc->bus_type = TYPE_XENSYSBUS;
792793
}
793794

794795
static const TypeInfo xendev_type_info = {
795796
.name = TYPE_XENBACKEND,
796-
.parent = TYPE_XENSYSDEV,
797+
.parent = TYPE_DEVICE,
797798
.class_init = xendev_class_init,
798799
.instance_size = sizeof(struct XenLegacyDevice),
799800
};
@@ -824,7 +825,6 @@ static void xen_sysdev_class_init(ObjectClass *klass, void *data)
824825
DeviceClass *dc = DEVICE_CLASS(klass);
825826

826827
device_class_set_props(dc, xen_sysdev_properties);
827-
dc->bus_type = TYPE_XENSYSBUS;
828828
}
829829

830830
static const TypeInfo xensysdev_info = {

include/hw/i386/pc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ ISADevice *pc_find_fdc0(void);
186186

187187
/* pc_sysfw.c */
188188
void pc_system_flash_create(PCMachineState *pcms);
189+
void pc_system_flash_cleanup_unused(PCMachineState *pcms);
189190
void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory);
190191

191192
/* acpi-build.c */

0 commit comments

Comments
 (0)