]> 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, 2 Nov 2015 11:46:55 +0000 (11:46 +0000)
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 fa8d479331b4fdfc119d56f1d73622f0435cf2dd..0bd8a73f20bc002542925794f1991074ad19c39e 100644 (file)
@@ -1366,7 +1366,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 affca0a2a7a513dfa1ff81b7a553cd62eb2e9ec5..f9c05572cf704cba39451c84103c6fd0696fa68e 100644 (file)
@@ -52,6 +52,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 {