thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
9ae3a8
From 2cd283cab24c3765c11a19897d4ee3f1ce37000f Mon Sep 17 00:00:00 2001
9ae3a8
Message-Id: <2cd283cab24c3765c11a19897d4ee3f1ce37000f.1387298827.git.minovotn@redhat.com>
9ae3a8
In-Reply-To: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
9ae3a8
References: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
9ae3a8
From: "Michael S. Tsirkin" <mst@redhat.com>
9ae3a8
Date: Tue, 17 Dec 2013 15:17:29 +0100
9ae3a8
Subject: [PATCH 16/56] pc: don't access fw cfg if NULL
9ae3a8
9ae3a8
RH-Author: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Message-id: <1387293161-4085-17-git-send-email-mst@redhat.com>
9ae3a8
Patchwork-id: 56322
9ae3a8
O-Subject: [PATCH qemu-kvm RHEL7.0 v2 16/57] pc: don't access fw cfg if NULL
9ae3a8
Bugzilla: 1034876
9ae3a8
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
9ae3a8
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
commit f8c457b88d72a48989f190bc3d7b79f4f3b7d11c
9ae3a8
     "pc: pass PCI hole ranges to Guests"
9ae3a8
broke Xen as it has no fw_cfg.
9ae3a8
Check for this configuration and boil out.
9ae3a8
9ae3a8
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
9ae3a8
(cherry picked from commit d26d9e14c15837eba2b7447e8d15230bab8e0940)
9ae3a8
---
9ae3a8
 hw/i386/pc.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
---
9ae3a8
 hw/i386/pc.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
9ae3a8
index 238f6a0..9d9f5d2 100644
9ae3a8
--- a/hw/i386/pc.c
9ae3a8
+++ b/hw/i386/pc.c
9ae3a8
@@ -996,7 +996,7 @@ typedef struct PcRomPciInfo {
9ae3a8
 static void pc_fw_cfg_guest_info(PcGuestInfo *guest_info)
9ae3a8
 {
9ae3a8
     PcRomPciInfo *info;
9ae3a8
-    if (!guest_info->has_pci_info) {
9ae3a8
+    if (!guest_info->has_pci_info || !guest_info->fw_cfg) {
9ae3a8
         return;
9ae3a8
     }
9ae3a8
 
9ae3a8
-- 
9ae3a8
1.7.11.7
9ae3a8