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 {