]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen: Introduce xen_pv_disk_disabled
authorJulien Grall <julien.grall@citrix.com>
Fri, 16 Oct 2015 18:18:21 +0000 (19:18 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 19 Oct 2015 14:50:58 +0000 (15:50 +0100)
ARM guest is considered as HVM in Freebsd but they only support PV disk
(no emulation available).

sys/dev/xen/blkfront/blkfront.c
sys/x86/include/xen/xen-os.h
sys/xen/xen-os.h

index 6768749c3d39a231c345a9d5a521201ca5f4aa0f..8115680dc9c079655bc1efa970c4dbe85e7da4c9 100644 (file)
@@ -1373,7 +1373,7 @@ xbd_probe(device_t dev)
        if (strcmp(xenbus_get_type(dev), "vbd") != 0)
                return (ENXIO);
 
-       if (xen_hvm_domain() && xen_disable_pv_disks != 0)
+       if (xen_pv_disks_disabled())
                return (ENXIO);
 
        if (xen_hvm_domain()) {
index 02810f2901a09d21e5cbacbb659f0eef7f63263a..e7a6d1bff6553ddd0106fc03d921acc0da084138 100644 (file)
@@ -46,6 +46,15 @@ xen_support_evtchn_rebind(void)
        return (!xen_hvm_domain() || xen_vector_callback_enabled == 0);
 }
 
+extern int xen_disable_pv_disks;
+
+static inline bool
+xen_pv_disks_disabled(void)
+{
+
+       return (xen_hvm_domain() && xen_disable_pv_disks != 0);
+}
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _MACHINE_X86_XEN_XEN_OS_H_ */
index eec8244f2d3e50b4839ded6929ca8c276baccf73..70e804a409f9870970e3ad23d8f3507f8cf003be 100644 (file)
@@ -53,7 +53,6 @@ extern start_info_t *HYPERVISOR_start_info;
 /* XXX: we need to get rid of this and use HYPERVISOR_start_info directly */
 extern char *console_page;
 
-extern int xen_disable_pv_disks;
 extern int xen_disable_pv_nics;
 
 enum xen_domain_type {