mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
conf/qemu: make IS_USB2_CONTROLLER globally available
IS_USB2_CONTROLLER() is useful in more places aside from just when assigning PCI addresses in QEMU, and is checking for enum values that are all defined in conf/domain_conf.h anyway, so define it there instead.
This commit is contained in:
parent
ba56642885
commit
1140b31f25
@ -679,6 +679,13 @@ typedef enum {
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST
|
||||
} virDomainControllerModelUSB;
|
||||
|
||||
# define IS_USB2_CONTROLLER(ctrl) \
|
||||
(((ctrl)->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) && \
|
||||
((ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI2 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI3))
|
||||
|
||||
typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts;
|
||||
typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr;
|
||||
struct _virDomainVirtioSerialOpts {
|
||||
|
@ -969,13 +969,6 @@ qemuDomainPCIBusFullyReserved(virDomainPCIAddressBusPtr bus)
|
||||
}
|
||||
|
||||
|
||||
#define IS_USB2_CONTROLLER(ctrl) \
|
||||
(((ctrl)->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) && \
|
||||
((ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI2 || \
|
||||
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI3))
|
||||
|
||||
/*
|
||||
* This assigns static PCI slots to all configured devices.
|
||||
* The ordering here is chosen to match the ordering used
|
||||
|
Loading…
Reference in New Issue
Block a user