linux/include/xen/platform_pci.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _XEN_PLATFORM_PCI_H
#define _XEN_PLATFORM_PCI_H

#define XEN_IOPORT_MAGIC_VAL
#define XEN_IOPORT_LINUX_PRODNUM
#define XEN_IOPORT_LINUX_DRVVER

#define XEN_IOPORT_BASE

#define XEN_IOPORT_PLATFLAGS
#define XEN_IOPORT_MAGIC
#define XEN_IOPORT_UNPLUG
#define XEN_IOPORT_DRVVER

#define XEN_IOPORT_SYSLOG
#define XEN_IOPORT_PROTOVER
#define XEN_IOPORT_PRODNUM

#define XEN_UNPLUG_ALL_IDE_DISKS
#define XEN_UNPLUG_ALL_NICS
#define XEN_UNPLUG_AUX_IDE_DISKS
#define XEN_UNPLUG_ALL

#define XEN_UNPLUG_UNNECESSARY
#define XEN_UNPLUG_NEVER

static inline int xen_must_unplug_nics(void) {}

static inline int xen_must_unplug_disks(void) {}

#if defined(CONFIG_XEN_PVHVM)
extern bool xen_has_pv_devices(void);
extern bool xen_has_pv_disk_devices(void);
extern bool xen_has_pv_nic_devices(void);
extern bool xen_has_pv_and_legacy_disk_devices(void);
#else
static inline bool xen_has_pv_devices(void)
{
	return IS_ENABLED(CONFIG_XEN);
}
static inline bool xen_has_pv_disk_devices(void)
{
	return IS_ENABLED(CONFIG_XEN);
}
static inline bool xen_has_pv_nic_devices(void)
{
	return IS_ENABLED(CONFIG_XEN);
}
static inline bool xen_has_pv_and_legacy_disk_devices(void)
{
	return false;
}
#endif
#endif /* _XEN_PLATFORM_PCI_H */