1. 06 11月, 2012 1 次提交
  2. 02 11月, 2012 2 次提交
  3. 30 10月, 2012 2 次提交
  4. 22 10月, 2012 1 次提交
    • D
      qemu: Don't blindly assume VNC is supported · 2da776b1
      Doug Goldstein 提交于
      Currently it's assumed that qemu always supports VNC, however it is
      definitely possible to compile qemu without VNC support so we should at
      the very least check for it and handle that correctly.
      2da776b1
  5. 20 10月, 2012 2 次提交
    • E
      storage: use enum for disk driver type · e5e8d5d0
      Eric Blake 提交于
      Actually use the enum in the domain conf structure.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Store enum rather
      than string for disk type.
      * src/conf/domain_conf.c (virDomainDiskDefFree)
      (virDomainDiskDefParseXML, virDomainDiskDefFormat)
      (virDomainDiskDefForeachPath): Adjust users.
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenFormatSxprDisk):
      Likewise.
      * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise.
      * src/vbox/vbox_tmpl.c (vboxAttachDrives): Likewise.
      * src/libxl/libxl_conf.c (libxlMakeDisk): Likewise.
      e5e8d5d0
    • G
      selinux: relabel tapfd in qemuPhysIfaceConnect · 4492ef7f
      Guannan Ren 提交于
      Relabeling tapfd right after the tap device is created.
      qemuPhysIfaceConnect is common function called both for static
      netdevs and for hotplug netdevs.
      4492ef7f
  6. 18 10月, 2012 3 次提交
  7. 17 10月, 2012 1 次提交
    • G
      selinux: fix wrong tapfd relablling · 89b63f0a
      Guannan Ren 提交于
      It should relabel tapfd of virtual network of type VIR_DOMAIN_NET_TYPE_DIRECT
      rather than VIR_DOMAIN_NET_TYPE_NETWORK and VIR_DOMAIN_NET_TYPE_BRIDGE
      (commit ae368ebf introduced this bug)
      
      Caution: The context of the two hunks is identical other than indentation.
      Please be extremely cautious of where the patch gets applied.
      89b63f0a
  8. 15 10月, 2012 1 次提交
    • G
      selinux: add security selinux function to label tapfd · ae368ebf
      Guannan Ren 提交于
      BZ:https://bugzilla.redhat.com/show_bug.cgi?id=851981
      When using macvtap, a character device gets first created by
      kernel with name /dev/tapN, its selinux context is:
      system_u:object_r:device_t:s0
      
      Shortly, when udev gets notification when new file is created
      in /dev, it will then jump in and relabel this file back to the
      expected default context:
      system_u:object_r:tun_tap_device_t:s0
      
      There is a time gap happened.
      Sometimes, it will have migration failed, AVC error message:
      type=AVC msg=audit(1349858424.233:42507): avc:  denied  { read write } for
      pid=19926 comm="qemu-kvm" path="/dev/tap33" dev=devtmpfs ino=131524
      scontext=unconfined_u:system_r:svirt_t:s0:c598,c908
      tcontext=system_u:object_r:device_t:s0 tclass=chr_file
      
      This patch will label the tapfd device before qemu process starts:
      system_u:object_r:tun_tap_device_t:MCS(MCS from seclabel->label)
      ae368ebf
  9. 11 10月, 2012 1 次提交
  10. 09 10月, 2012 1 次提交
    • M
      fix kvm_pv_eoi with kvmclock · 5d692cc7
      Martin Kletzander 提交于
      When both kvmclock and kvm_pv_eoi are configured (either disabled or
      enabled) libvirt will generate invalid CPU specification due to the
      fact that even though kvmclock causes the CPU to be specified, it
      doesn't set have_cpu flag to true (and the new kvm_pv_eoi as well).
      This patch fixes the issue and adds a test exactly for that to show
      that it is fixed correctly (and also to keep it that way in the future
      of course).
      5d692cc7
  11. 27 9月, 2012 2 次提交
  12. 26 9月, 2012 1 次提交
    • M
      qemu: wait for SPICE to migrate · 3521cd1c
      Michal Privoznik 提交于
      Recently, there have been some improvements made to qemu so it
      supports seamless migration or something very close to it.
      However, it requires libvirt interaction. Once qemu is migrated,
      the SPICE server needs to send its internal state to the destination.
      Once it's done, it fires SPICE_MIGRATE_COMPLETED event and this
      fact is advertised in 'query-spice' output as well.
      We must not kill qemu until SPICE server finishes the transfer.
      3521cd1c
  13. 21 9月, 2012 1 次提交
  14. 20 9月, 2012 3 次提交
    • M
      qemu: add support for dump-guest-core option · ff2d5a3d
      Martin Kletzander 提交于
      The "dump-guest-core' option is new option for the machine type
      (-machine pc,dump-guest-core) that controls whether the guest memory
      will be marked as dumpable.
      
      While testing this, I've found out that the value for the '-M' options
      is not parsed correctly when additional parameters are used. However,
      when '-machine' is used for the same options, it gets parsed as
      expected. That's why this patch also modifies the parsing and creating
      of the command line, so both '-M' and '-machine' are recognized. In
      QEMU's help there is only mention of the 'machine parameter now with
      no sign of the older '-M'.
      ff2d5a3d
    • M
      qemu: Add support for reboot-timeout · 94827a78
      Martin Kletzander 提交于
      This patch adds support for "-boot reboot-timeout=rb_time" that is
      added in QEMU.
      94827a78
    • M
      qemu: Cleanup boot parameter building · 8c952908
      Martin Kletzander 提交于
      This patch cleans up building the "-boot" parameter and while on that
      fixes one inconsistency by modifying these things:
      
       - I completed the unfinished virDomainBootMenu enum by specifying
         LAST, declaring it and also declaring the TypeFromString and
         TypeToString parameters.
       - Previously mentioned TypeFromString and TypeToString are used when
         parsing the XML.
       - Last, but not least, visible change is that the "-boot" parameter
         is built and parsed properly:
          - The "order=" prefix is used only when additional parameters are
            used (menu, etc.).
          - It's rewritten in a way that other parameters can be added
            easily in the future (used in following patch).
          - The "order=" parameter is properly parsed regardless to where it
            is placed in the string (e.g. "menu=on,order=nc").
          - The "menu=" parameter (and others in the future) are created
            when they should be (i.e. even when bootindex is supported and
            used, but not when bootloader is selected).
      8c952908
  15. 18 9月, 2012 3 次提交
    • J
      qemu: add -sandbox to command line if requested · 5f7861ca
      Ján Tomko 提交于
      5f7861ca
    • O
      qemu: Use disk wwn in qemu command line · 6e73850b
      Osier Yang 提交于
      All of ide-drive, ide-hd, ide-cd, scsi-disk, scsi-hd, and scsi-cd
      supports wwn property. (NB, scsi-block doesn't support to set wwn).
      
      * src/qemu/qemu_command.c: Error out if underlying QEMU doesn't
      support wwn property for the device; Set wwn for the device otherwise.
      
      * tests/qemuxml2argvdata/qemuxml2argv-disk-ide-wwn.args: New test
      * tests/qemuxml2argvdata/qemuxml2argv-disk-ide-wwn.xml: Likewise
      * tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args: Likewise
      * tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.xml: Likewise
      * tests/qemuxml2argvtest.c: Add the new tests.
      6e73850b
    • H
      use virBitmap to store cells' cpumask info. · f4b2dcf5
      Hu Tao 提交于
      f4b2dcf5
  16. 15 9月, 2012 2 次提交
  17. 14 9月, 2012 2 次提交
    • J
      qemu: fix uninitialized variable in qemuParseCommandLine · b4418464
      Ján Tomko 提交于
      Newly added if branch for kvm_pv_eoi did not set the ret variable.
      b4418464
    • M
      qemu: Add support for EOI with APIC · fbf9aa12
      Martin Kletzander 提交于
      This patch adds full support for EOI setting for domains. Because this
      is CPU feature (flag), the model needs to be added even when it's not
      specified. Fortunately this problem was already solved with kvmclock,
      so this patch simply abuses that.
      
      And due to the size of the patch (17 lines) I dared to include the tests.
      fbf9aa12
  18. 13 9月, 2012 4 次提交
    • D
      Fix data types used for list sizes in QEMU capabilities · 9b5c5400
      Daniel P. Berrange 提交于
      The QEMU capabilities APIs used a misc of 'int' and
      'unsigned int' for variables relating to array sizes.
      Change all these to use 'size_t'
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9b5c5400
    • D
      Turn QEMU capabilities object into a full virObjectPtr · beac09fd
      Daniel P. Berrange 提交于
      The current qemu capabilities are stored in a virBitmapPtr
      object, whose type is exposed to callers. We want to store
      more data besides just the flags, so we need to move to a
      struct type. This object will also need to be reference
      counted, since we'll be maintaining a cache of data per
      binary. This change introduces a 'qemuCapsPtr' virObject
      class. Most of the change is just renaming types and
      variables in all the callers
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      beac09fd
    • G
      qemu: build USB redirection filter qemu command line · 2d46f88d
      Guannan Ren 提交于
      Input XML snip:
      <redirdev bus='usb' type='spicevmc'>
         <address type='usb' bus='0' port='4'/>
       </redirdev>
      <redirfilter>
        <usbdev class='0x08' vendor='0x1234' product='0xbeef' \
                version='2.00' allow='yes'/>
        <usbdev class='-1' vendor='-1' product='-1' version='-1' allow='no'/>
      </redirfilter>
      
      will be converted to:
      -device usb-redir,chardev=charredir0,id=redir0,\
      filter=0x08:0x1234:0xBEEF:0x2000:1|-1:-1:-1:-1:0,bus=usb.0,port=4
      2d46f88d
    • E
      maint: fix missing spaces in message · 2387aa26
      Eric Blake 提交于
      I got an off-list report about a bad diagnostic:
      Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8
      
      True to form, I've added a syntax check rule to prevent it
      from recurring, and found several other offenders.
      
      * cfg.mk (sc_require_whitespace_in_translation): New rule.
      * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add
      space.
      * src/esx/esx_util.c (esxUtil_ParseUri): Likewise.
      * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSetMetadata)
      (qemuDomainGetMetadata): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise.
      * src/rpc/virnettlscontext.c
      (virNetTLSContextCheckCertDNWhitelist): Likewise.
      * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives):
      Avoid false negatives.
      * tools/virsh-domain.c (info_save_image_dumpxml): Reword.
      Based on a report by Luwen Su.
      2387aa26
  19. 04 9月, 2012 1 次提交
    • V
      Rename iolimit to blockio. · 72f1f220
      Viktor Mihajlovski 提交于
      After discussion with DB we decided to rename the new iolimit
      element as it creates the impression it would be there to
      limit (i.e. throttle) I/O instead of specifying immutable
      characteristics of a block device.
      This is also backed by the fact that the term I/O Limits has
      vanished from newer storage admin documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      72f1f220
  20. 03 9月, 2012 1 次提交
    • M
      qemu: Add support for S3/S4 state configuration · b8216ec9
      Martin Kletzander 提交于
      This patch adds support for running qemu guests with the required
      parameters to forcefully enable or disable BIOS advertising of S3 and
      S4 states.  The support for this is added to capabilities and there is
      also a qemu command parameter parsing implemented.
      b8216ec9
  21. 01 9月, 2012 1 次提交
  22. 30 8月, 2012 1 次提交
    • L
      network: get vlan info for Open vSwitch interfaces from proper source · b3bd5d6c
      Laine Stump 提交于
      This bug was revealed by the crash described in
      
        https://bugzilla.redhat.com/show_bug.cgi?id=852383
      
      The vlan info pointer sent to virNetDevOpenvswitchAddPort should never
      be non-NULL unless there is at least one tag. The factthat such a vlan
      info pointer was receveid pointed out that a caller was passing the
      wrong pointer. Instead of sending &net->vlan, the result of
      virDomainNetGetActualVlan(net) should be sent - that function will
      look for vlan info in net->data.network.actual->vlan, and in cany case
      return NULL instead of a pointer if the vlan info it finds has no
      tags.
      
      Aside from causing the crash, sending a hardcoded &net->vlan has the
      effect of ignoring vlan info from a <network> or <portgroup> config.
      b3bd5d6c
  23. 24 8月, 2012 1 次提交
    • E
      snapshot: split snapshot conf code into own file · 6478ec16
      Eric Blake 提交于
      This has several benefits:
      1. Future snapshot-related code has a definite place to go (and I
      _will_ be adding some)
      2. Snapshot errors now use the VIR_FROM_DOMAIN_SNAPSHOT error
      classification, which has been underutilized (previously only in
      libvirt.c)
      
      * src/conf/domain_conf.h, domain_conf.c: Split...
      * src/conf/snapshot_conf.h, snapshot_conf.c: ...into new files.
      * src/Makefile.am (DOMAIN_CONF_SOURCES): Build new files.
      * po/POTFILES.in: Mark new file for translation.
      * src/vbox/vbox_tmpl.c: Update caller.
      * src/esx/esx_driver.c: Likewise.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_domain.h: Likewise.
      6478ec16
  24. 22 8月, 2012 1 次提交
  25. 18 8月, 2012 1 次提交
    • S
      qemu: support netdevs from <forward mode='hostdev'> networks · 1610b71a
      Shradha Shah 提交于
      For network devices allocated from a network with <forward
      mode='hostdev'>, there is a need to add the newly minted hostdev to
      the hostdevs array.
      
      In this case we also need to call qemuPrepareHostDevices just for this
      one device, as the standard call to initialize all the hostdevs that
      were defined directly in the domain's configuration has already been
      made by the time we allocate a device from a libvirt network, and thus
      have something that needs initializing.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      1610b71a