qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 5/5] pc: don't access fw cfg if NULL


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PULL 5/5] pc: don't access fw cfg if NULL
Date: Wed, 17 Jul 2013 12:48:12 +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 <address@hidden>
Tested-by: Stefano Stabellini <address@hidden>
---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 80c27d6..cb3897e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -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;
     }
 
-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]