cryptospore / rpms / qemu-kvm

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