specifies the port number. Ports are numbered starting from 0. There are
usually 0, 1 or 2 serial ports. There is also an optional
<code>type</code> attribute <span class="since">since 1.0.2</span>
- which has two choices for its value, one is <code>isa-serial</code>,
- the other is <code>usb-serial</code>. If <code>type</code> is missing,
- <code>isa-serial</code> will be used by default. For <code>usb-serial</code>
- an optional sub-element <code><address></code> with
- <code>type='usb'</code> can tie the device to a particular controller,
- <a href="#elementsAddress">documented above</a>.
+ which has three choices for its value, one is <code>isa-serial</code>,
+ then <code>usb-serial</code> and last one is <code>pci-serial</code>.
+ If <code>type</code> is missing, <code>isa-serial</code> will be used by
+ default. For <code>usb-serial</code> an optional sub-element
+ <code><address/></code> with <code>type='usb'</code> can tie the
+ device to a particular controller, <a href="#elementsAddress">documented above</a>.
+ Similarly, <code>pci-serial</code> can be used to attach the device to
+ the pci bus (<span class="since">since 1.2.16</span>). Again, it has
+ optional sub-element <code><address/></code> with
+ <code>type='pci'</code> to select desired location on the PCI bus.
</p>
<h6><a name="elementCharConsole">Console</a></h6>
<choice>
<value>isa-serial</value>
<value>usb-serial</value>
+ <value>pci-serial</value>
</choice>
</attribute>
</define>
VIR_ENUM_IMPL(virDomainChrSerialTarget,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST,
"isa-serial",
- "usb-serial")
+ "usb-serial",
+ "pci-serial")
VIR_ENUM_IMPL(virDomainChrChannelTarget,
VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST,
typedef enum {
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA = 0,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB,
+ VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST
} virDomainChrSerialTargetType;
--- /dev/null
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <serial type='dev'>
+ <source path='/dev/ttyS2'/>
+ <target type='pci-serial' port='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </serial>
+ <console type='dev'>
+ <source path='/dev/ttyS2'/>
+ <target type='serial' port='0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </console>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
DO_TEST("hostdev-pci-address");
DO_TEST("hostdev-vfio");
DO_TEST("pci-rom");
+ DO_TEST("pci-serial-dev-chardev");
DO_TEST("encrypted-disk");
DO_TEST_DIFFERENT("memtune");