libvirt/src/qemu
Hu Tao c5b02b6773 qemu: error out if PCI passthrough type is not supported
If PCI passthrough type is not supported, we should error out rather than
continue building the command line.

When starting a domain, the type has been already checked by
qemuPrepareHostdevPCICheckSupport() before building qemu command line,
so the problem doesn't emerge.

But when coverting a domain xml without specifying passthrough type explictly
to qemu arg, we will get a malformed command line.

the xml:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0001' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

the converted command line:

  -device ,host=0001:03:00.0,id=hostdev0,bus=pci.0,addr=0x5

After this patch, virsh gives an error message:

  virsh domxml-to-native qemu-argv /tmp/tmp.xml
  error: internal error: invalid PCI passthrough type 'default'

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
2014-07-29 15:35:08 +02:00
..
libvirtd_qemu.aug migration: add support for migrateURI configuration 2014-05-20 13:13:29 +02:00
MIGRATION.txt
qemu_agent.c avoid 'sync' as variable name 2014-05-19 18:40:02 +02:00
qemu_agent.h qemu: Implement virDomain{Get,Set}Time 2014-05-15 16:44:45 +02:00
qemu_capabilities.c qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:14:52 +01:00
qemu_capabilities.h qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:14:52 +01:00
qemu_cgroup.c conf: RNG: Always fill in default random source path for default backend 2014-07-28 10:07:09 +02:00
qemu_cgroup.h qemu: leave restricting cpuset.mems after initialization 2014-07-16 20:15:46 +02:00
qemu_command.c qemu: error out if PCI passthrough type is not supported 2014-07-29 15:35:08 +02:00
qemu_command.h Add virConnectPtr for qemuBuildSCSIHostdevDrvStr 2014-07-24 06:39:28 -04:00
qemu_conf.c qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
qemu_conf.h qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
qemu_domain.c qemu: Add helper to initialize storage file backend with correct uid/gid 2014-07-08 14:27:19 +02:00
qemu_domain.h qemu: Add helper to initialize storage file backend with correct uid/gid 2014-07-08 14:27:19 +02:00
qemu_driver.c qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
qemu_driver.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
qemu_hostdev.c drivers: use virDirRead API 2014-04-28 17:52:45 -06:00
qemu_hostdev.h Capitalize USB, PCI and SCSI in hostdev methods 2014-03-12 16:20:01 +00:00
qemu_hotplug.c hostdev: Introduce virDomainHostdevSubsysSCSIiSCSI 2014-07-24 07:04:44 -04:00
qemu_hotplug.h Add virConnectPtr for qemuBuildSCSIHostdevDrvStr 2014-07-24 06:39:28 -04:00
qemu_hotplugpriv.h qemu: Let tests override waiting time for device unplug 2013-08-26 16:09:55 +02:00
qemu_migration.c storage: Move readonly and shared flags to disk source from disk def 2014-07-08 14:27:19 +02:00
qemu_migration.h qemu: enum cleanups in "src/qemu/*" 2014-06-24 12:56:54 -06:00
qemu_monitor_json.c qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor_json.h qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor_text.c Use virBufferCheckError everywhere we report OOM error 2014-07-03 10:48:14 +02:00
qemu_monitor_text.h conf: more enum cleanups in "src/conf/domain_conf.h" 2014-06-02 15:32:58 -06:00
qemu_monitor.c qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor.h qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_process.c domain: Introduce ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:02:34 +01:00
qemu_process.h qemu: enum cleanups in "src/qemu/*" 2014-06-24 12:56:54 -06:00
qemu_processpriv.h qemu: Export qemuProcessHandleDeviceDeleted for tests 2013-08-26 16:09:55 +02:00
qemu.conf qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
test_libvirtd_qemu.aug.in migration: add support for migrateURI configuration 2014-05-20 13:13:29 +02:00
THREADS.txt Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00