Skip to contentSkip to conversation

qemu-xen-traditional: allow build without blktap1

PATCH In review Ian Campbell 2 participants 2 messages Jul 31, 2013 – Aug 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-xen-traditional: allow build without blktap1

I intend this to become optional at the xen build level so it needs to become optional here. Until the matching Xen patch is applied and exports CONFIG_BLKTAP1=y|n there should be no change.

---
 hw/xen_machine_pv.c |    4 ++--
 xen-config-host.h   |    2 +-
 xen-hooks.mak       |    4 +++-
 3 files changed, 6 insertions(+), 4 deletions(-)
hw/xen_machine_pv.c +2 -2
index c09adbb..e7283b0 100644
@@ -29,7 +29,7 @@
 #include "xen_backend.h"
 #include "qemu-xen.h"
 
-#ifndef CONFIG_STUBDOM
+#if defined(CONFIG_BLKTAP1) && !defined(CONFIG_STUBDOM)
 #include <hw/xen_blktap.h>
 #endif
 
@@ -47,7 +47,7 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size,
     CPUState *env;
     uint32_t domid_target;
 
-#if !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
+#if defined(CONFIG_BLKTAP1) && !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
     /* Initialize tapdisk client */
     init_blktap();
 #endif
xen-config-host.h +1 -1
index 647f6be..3a02021 100644
@@ -18,7 +18,7 @@ extern int domid, domid_backend;
 
 #include "xenctrl.h"
 #include "xenstore.h"
-#if !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
+#if defined(CONFIG_BLKTAP1) && !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
 #include "blktaplib.h"
 #endif
 
xen-hooks.mak +3 -1
index 58d61c9..b91400e 100644
@@ -47,9 +47,11 @@ CONFIG_AUDIO=
 OBJS += xenfbfront.o
 else
 ifndef CONFIG_NetBSD
-CPPFLAGS+= -I$(XEN_ROOT)/tools/blktap/lib
+ifneq ($(CONFIG_BLKTAP1),n)
+CPPFLAGS+= -DCONFIG_BLKTAP1 -I$(XEN_ROOT)/tools/blktap/lib
 LIBS += -L$(XEN_ROOT)/tools/blktap/lib -lblktap
 OBJS += xen_blktap.o
+endif
 OBJS += tpm_tis.o
 endif
 endif
Signature · 1 line
1.7.2.5
Acked-by on v1 1/1
#1 lore raw

Ian Campbell writes ("[PATCH] qemu-xen-traditional: allow build without blktap1"):

Quoted 5 lines

I intend this to become optional at the xen build level so it needs to become optional here. Until the matching Xen patch is applied and exports CONFIG_BLKTAP1=y|n there should be no change.

I have also pushed the corresponding QEMU_TAG update.

Ian.