xen: introduce xen_pv_disks_disabled()

ARM guest is considered as HVM in Freebsd but they only support PV disk
(no emulation available).

Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com>
Reviewed by: royger
Differential Revision: https://reviews.freebsd.org/D29403
This commit is contained in:
Julien Grall 2015-10-16 19:18:21 +01:00 committed by Roger Pau Monné
parent 5f70008327
commit 69c6eee756
3 changed files with 11 additions and 3 deletions

View File

@ -1439,7 +1439,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()) {

View File

@ -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)
{

View File

@ -74,8 +74,6 @@ xen_get_console_evtchn(void)
extern shared_info_t *HYPERVISOR_shared_info;
extern int xen_disable_pv_disks;
extern bool xen_suspend_cancelled;
enum xen_domain_type {