From: Daniel P. Berrange Date: Mon, 30 Nov 2009 18:35:58 +0000 (+0000) Subject: Introduce a standardized data structure for device addresses X-Git-Tag: v0.7.6~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b0cce7d3a458839367f4a12c1300ebe1cdf5972;p=thirdparty%2Flibvirt.git Introduce a standardized data structure for device addresses All guest devices now use a common device address structure summarized by: enum virDomainDeviceAddressType { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI, }; struct _virDomainDevicePCIAddress { unsigned int domain; unsigned int bus; unsigned int slot; unsigned int function; }; struct _virDomainDeviceInfo { int type; union { virDomainDevicePCIAddress pci; } addr; }; This replaces the anonymous structs in Disk/Net/Hostdev data structures. Where available, the address is *always* printed in the XML file, instead of being hidden in the internal state file.
The structure definition is based on Wolfgang Mauerer's disk controller patch series. * docs/schemas/domain.rng: Define the
syntax and associate it with disk/net/hostdev devices * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms: APIs for parsing/formatting address information. Also remove the QEMU specific 'pci_addr' attributes * src/qemu/qemu_driver.c: Replace use of 'pci_addr' attrs with new standardized format. --- diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 566b11753c..7e00e7fe9c 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -385,6 +385,9 @@ + + +