qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

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 "anthony.perard@citrix.com"
# gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" [marginal]
# gpg: aka "Anthony PERARD <anthony.perard@citrix.com>" [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 <peter.maydell@linaro.org>

+10 -6
+6 -3
hw/i386/pc_piix.c
··· 186 186 if (!xen_enabled()) { 187 187 pc_memory_init(pcms, system_memory, 188 188 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 + } 192 195 } 193 196 194 197 gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled);
+1 -1
hw/i386/pc_sysfw.c
··· 108 108 } 109 109 } 110 110 111 - static void pc_system_flash_cleanup_unused(PCMachineState *pcms) 111 + void pc_system_flash_cleanup_unused(PCMachineState *pcms) 112 112 { 113 113 char *prop_name; 114 114 int i;
+2 -2
hw/xen/xen-legacy-backend.c
··· 789 789 set_bit(DEVICE_CATEGORY_MISC, dc->categories); 790 790 /* xen-backend devices can be plugged/unplugged dynamically */ 791 791 dc->user_creatable = true; 792 + dc->bus_type = TYPE_XENSYSBUS; 792 793 } 793 794 794 795 static const TypeInfo xendev_type_info = { 795 796 .name = TYPE_XENBACKEND, 796 - .parent = TYPE_XENSYSDEV, 797 + .parent = TYPE_DEVICE, 797 798 .class_init = xendev_class_init, 798 799 .instance_size = sizeof(struct XenLegacyDevice), 799 800 }; ··· 824 825 DeviceClass *dc = DEVICE_CLASS(klass); 825 826 826 827 device_class_set_props(dc, xen_sysdev_properties); 827 - dc->bus_type = TYPE_XENSYSBUS; 828 828 } 829 829 830 830 static const TypeInfo xensysdev_info = {
+1
include/hw/i386/pc.h
··· 186 186 187 187 /* pc_sysfw.c */ 188 188 void pc_system_flash_create(PCMachineState *pcms); 189 + void pc_system_flash_cleanup_unused(PCMachineState *pcms); 189 190 void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory); 190 191 191 192 /* acpi-build.c */