Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142772740
D29405.id86228.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29405.id86228.diff
View Options
Index: sys/dev/xen/netfront/netfront.c
===================================================================
--- sys/dev/xen/netfront/netfront.c
+++ sys/dev/xen/netfront/netfront.c
@@ -378,7 +378,7 @@
netfront_probe(device_t dev)
{
- if (xen_hvm_domain() && xen_disable_pv_nics != 0)
+ if (xen_pv_nics_disabled())
return (ENXIO);
if (!strcmp(xenbus_get_type(dev), "vif")) {
Index: sys/x86/include/xen/xen-os.h
===================================================================
--- sys/x86/include/xen/xen-os.h
+++ sys/x86/include/xen/xen-os.h
@@ -44,6 +44,9 @@
/* tunable for disabling PV disks */
extern int xen_disable_pv_disks;
+/* tunable for disabling PV nics */
+extern int xen_disable_pv_nics;
+
static inline u_int
cpu_to_vcpu_id(u_int cpuid)
{
@@ -65,6 +68,13 @@
return (xen_hvm_domain() && xen_disable_pv_disks != 0);
}
+static inline bool
+xen_pv_nics_disabled(void)
+{
+
+ return (xen_hvm_domain() && xen_disable_pv_nics != 0);
+}
+
#endif /* !__ASSEMBLY__ */
#endif /* _MACHINE_X86_XEN_XEN_OS_H_ */
Index: sys/xen/xen-os.h
===================================================================
--- sys/xen/xen-os.h
+++ sys/xen/xen-os.h
@@ -101,8 +101,6 @@
extern shared_info_t *HYPERVISOR_shared_info;
-extern int xen_disable_pv_nics;
-
extern bool xen_suspend_cancelled;
enum xen_domain_type {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 24, 10:18 AM (13 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27895837
Default Alt Text
D29405.id86228.diff (1 KB)
Attached To
Mode
D29405: xen/netfront: introduce xen_pv_nics_disabled()
Attached
Detach File
Event Timeline
Log In to Comment