1. 18 9月, 2012 16 次提交
  2. 17 9月, 2012 1 次提交
  3. 15 9月, 2012 2 次提交
  4. 14 9月, 2012 6 次提交
    • 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
    • D
      Introduce a API for creating QEMU capabilities for a binary · 6b07dff0
      Daniel P. Berrange 提交于
      Introduce a qemuCapsNewForBinary() API which creates a new
      QEMU capabilities object, populated with data relating to
      a specific QEMU binary. The qemuCaps object is also given
      a timestamp, which makes it possible to detect when the
      cached capabilities for a binary are out of date
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      6b07dff0
    • D
      Remove upfront check for hmp - just try it cope with failure · 97a1f076
      Daniel P. Berrange 提交于
      Don't bother checking for the existance of the HMP passthrough
      command. Just try to execute it, and propagate the failure.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      97a1f076
    • D
      Don't overwrite errors raised by qemuMonitorHMPCommand · 5505cf96
      Daniel P. Berrange 提交于
      The qemuMonitorHMPCommand() API and things it calls will report
      a wide variety of errors. The QEMU text monitor should not be
      overwriting these errors
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5505cf96
    • 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
    • G
      snapshot: fix rollback failure in transaction mode · ac89a611
      Guannan Ren 提交于
      BZ:https://bugzilla.redhat.com/show_bug.cgi?id=843372
      when qemu supports the 'transaction' monitor command,
      and libvirt's --reuse-ext flag was not specified, libvirt created
      a stub file with zero size in first place. After the failure of
      QEMU transaction command performing qcow2 snapshots on more than
      one drives, the stub file is left behind with non-empty
      by the QEMU transaction command.
      In order to unlink the file, the patch removes the file size checking.
      
      Steps to reproduce the issue:
      Steps:
       1, Create a qemu instance with two drive images of qcow2 type (root user)
          /usr/libexec/qemu-kvm -m 1024 -smp 1 -name "rhel6u1" \
            -drive file=/var/lib/libvirt/images/firstqcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none
            -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
            -drive file=/var/lib/libvirt/images/secondqcow2,if=none,id=drive-virtio-disk1,format=qcow2,cache=none \
            -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1 -qmp stdio
      
       2, Initialize qemu qmp
          {"execute":"qmp_capabilities"}
      
       3, Remove the second drive image file
          rm -f /var/lib/libvirt/images/secondqcow2
      
       4, Run 'transaction' command with snapshot qemu commands in.
          {"execute":"transaction","arguments":
            {"actions":
              [{"type":"blockdev-snapshot-sync","data":
                {"device":"drive-virtio-disk0","snapshot-file":"/var/lib/libvirt/images/firstqcow2-snapshot.img","format":"qcow2"}
               },
               {"type":"blockdev-snapshot-sync","data":
                {"device":"drive-virtio-disk1","snapshot-file":"/var/lib/libvirt/images/secondqcow2-snapshot.img","format":"qcow2"}
               }]
            },
         "id":"libvirt-6"}
      
       5, Got the error as follows:
          {"id": "libvirt-6",
            "error": {"class": "OpenFileFailed", "desc": "Could not open '/var/lib/libvirt/images/secondqcow2-snapshot.img'",
                      "data": {"filename": "/var/lib/libvirt/images/secondqcow2-snapshot.img"}
                     }
          }
      
       6, List first newly-created snapshot file:
          -rw-r--r--. 1 root root     262144 Sep 13 11:43 firstqcow2-snapshot.img
      ac89a611
  5. 13 9月, 2012 10 次提交
    • 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
      Add API for copying instances of the qemuCapsPtr object · 4dced75e
      Daniel P. Berrange 提交于
      To allow each VM instance to record additional capabilities
      without affecting other VMs, there needs to be a way to do
      a deep copy of the qemuCapsPtr object
      4dced75e
    • D
      Add ability to store other metadata in the qemu capabilities object · 116e2fac
      Daniel P. Berrange 提交于
      Add struct fields and APIs to allow the qemu capabilities object
      to store version, arch, machines & cpu names, etc
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      116e2fac
    • D
      Make qemuCapsProbeCommand static · c29ce35a
      Daniel P. Berrange 提交于
      The qemuCapsProbeCommand API is only used by the capabilities
      code, so can be static
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c29ce35a
    • 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
    • D
      Wait to receive QMP greeting before sending any monitor commands · 985a321a
      Daniel P. Berrange 提交于
      Technically speaking we should wait until we receive the QMP
      greeting message before attempting to send any QMP monitor
      commands. Mostly we've got away with this, but there is a race
      in some QEMU which cause it to SEGV if you sent it data too
      soon after startup. Waiting for the QMP greeting avoids the
      race
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      985a321a
    • 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
    • G
      qemu: add usb-redir.filter qemu capability flag · 16e41ab6
      Guannan Ren 提交于
      Add a qemu flag for USB redirection filter support.
      
      The output:
      usb-redir.chardev=chr
      usb-redir.debug=uint8
      usb-redir.filter=string
      usb-redir.port=string
      16e41ab6
    • 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
    • D
      Add API for opening a QEMU monitor from a socket FD · cf5491e5
      Daniel P. Berrange 提交于
      Currently qemuMonitorOpen() requires an address of the QEMU
      monitor. When doing QMP based capabilities detection it is
      easier if a pre-opened FD can be provided, since then the
      monitor can be run on the STDIO console. Add a new API
      qemuMonitorOpenFD() for such usage
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cf5491e5
  6. 12 9月, 2012 1 次提交
  7. 07 9月, 2012 4 次提交
    • D
      Add non-null annotations to qemuMonitorOpen · 1f490138
      Daniel P. Berrange 提交于
      Add some non-null annotations to qemuMonitorOpen and also
      check that the error callback is set, since it is mandatory
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1f490138
    • J
      Add PMSUSPENDED life cycle event · fc4115e8
      Jiri Denemark 提交于
      While PMSUSPENDED state was added a long time ago, we didn't have
      corresponding life cycle event.
      fc4115e8
    • P
      qemu: Add range checking for scheduler tunables when changed by API · 972e914f
      Peter Krempa 提交于
      The quota and period tunables for cpu scheduler accept only a certain
      range of values. When changing the live configuration invalid values get
      rejected. This check is not performed when changing persistent config.
      
      This patch adds a separate range check, that improves error messages
      when changing live config and adds the check for persistent config.
      This check is done only when using the API. It is still possible to
      specify invalid values in the XML.
      972e914f
    • P
      qemu: clean up qemuSetSchedulerParametersFlags() · 3e250b36
      Peter Krempa 提交于
      This patch tries to clean the code up a little bit and shorten very long
      lines.
      
      The apparent semantic change from moving the condition before calling
      the setter function is a non-issue here as the setter function is a
      no-op when called with both arguments zero.
      3e250b36