]> git.proxmox.com Git - qemu.git/commitdiff
pc: don't access fw cfg if NULL
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 10 Jul 2013 15:28:04 +0000 (18:28 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 15 Jul 2013 18:26:32 +0000 (21:26 +0300)
commit f8c457b88d72a48989f190bc3d7b79f4f3b7d11c
     "pc: pass PCI hole ranges to Guests"
broke Xen as it has no fw_cfg.
Check for this configuration and boil out.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/i386/pc.c

index 80c27d6a30c3dd16d41508206215d50c307c8ec1..cb3897e146ea7e3f81d0dd529a5bf30676461601 100644 (file)
@@ -1000,7 +1000,7 @@ typedef struct PcRomPciInfo {
 static void pc_fw_cfg_guest_info(PcGuestInfo *guest_info)
 {
     PcRomPciInfo *info;
-    if (!guest_info->has_pci_info) {
+    if (!guest_info->has_pci_info || !guest_info->fw_cfg) {
         return;
     }