Page MenuHomeFreeBSD

D29403.diff
No OneTemporary

D29403.diff

diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c
--- a/sys/dev/xen/blkfront/blkfront.c
+++ b/sys/dev/xen/blkfront/blkfront.c
@@ -1439,7 +1439,7 @@
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()) {
diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h
--- a/sys/x86/include/xen/xen-os.h
+++ b/sys/x86/include/xen/xen-os.h
@@ -43,9 +43,19 @@
/* If non-zero, the hypervisor has been configured to use a direct vector */
extern int xen_vector_callback_enabled;
+/* tunable for disabling PV disks */
+extern int xen_disable_pv_disks;
+
/* tunable for disabling PV nics */
extern int xen_disable_pv_nics;
+static inline bool
+xen_pv_disks_disabled(void)
+{
+
+ return (xen_hvm_domain() && xen_disable_pv_disks != 0);
+}
+
static inline bool
xen_pv_nics_disabled(void)
{
diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h
--- a/sys/xen/xen-os.h
+++ b/sys/xen/xen-os.h
@@ -74,8 +74,6 @@
extern shared_info_t *HYPERVISOR_shared_info;
-extern int xen_disable_pv_disks;
-
extern bool xen_suspend_cancelled;
enum xen_domain_type {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 29, 7:09 PM (8 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15632419
Default Alt Text
D29403.diff (1 KB)

Event Timeline