1. 20 9月, 2016 7 次提交
  2. 19 9月, 2016 3 次提交
    • M
      qemu: Introduce qemuGetHupageMemPath · eef8b263
      Michal Privoznik 提交于
      Now that we have two same implementations for getting path for
      huge pages backed guest memory, lets merge them into one function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      eef8b263
    • M
      qemuBuildMemoryBackendStr: Don't crash if no hugetlbfs is mounted · 647db05e
      Michal Privoznik 提交于
      When trying to migrate a huge page enabled guest, I've noticed
      the following crash. Apparently, if no specific hugepages are
      requested:
      
        <memoryBacking>
          <hugepages/>
        </memoryBacking>
      
      and there are no hugepages configured on the destination, we try
      to dereference a NULL pointer.
      
      Program received signal SIGSEGV, Segmentation fault.
      0x00007fcc907fb20e in qemuGetHugepagePath (hugepage=0x0) at qemu/qemu_conf.c:1447
      1447        if (virAsprintf(&ret, "%s/libvirt/qemu", hugepage->mnt_dir) < 0)
      (gdb) bt
      #0  0x00007fcc907fb20e in qemuGetHugepagePath (hugepage=0x0) at qemu/qemu_conf.c:1447
      #1  0x00007fcc907fb2f5 in qemuGetDefaultHugepath (hugetlbfs=0x0, nhugetlbfs=0) at qemu/qemu_conf.c:1466
      #2  0x00007fcc907b4afa in qemuBuildMemoryBackendStr (size=4194304, pagesize=0, guestNode=0, userNodeset=0x0, autoNodeset=0x0, def=0x7fcc70019070, qemuCaps=0x7fcc70004000, cfg=0x7fcc5c011800, backendType=0x7fcc95087228, backendProps=0x7fcc95087218,
          force=false) at qemu/qemu_command.c:3297
      #3  0x00007fcc907b4f91 in qemuBuildMemoryCellBackendStr (def=0x7fcc70019070, qemuCaps=0x7fcc70004000, cfg=0x7fcc5c011800, cell=0, auto_nodeset=0x0, backendStr=0x7fcc70020360) at qemu/qemu_command.c:3413
      #4  0x00007fcc907c0406 in qemuBuildNumaArgStr (cfg=0x7fcc5c011800, def=0x7fcc70019070, cmd=0x7fcc700040c0, qemuCaps=0x7fcc70004000, auto_nodeset=0x0) at qemu/qemu_command.c:7470
      #5  0x00007fcc907c5fdf in qemuBuildCommandLine (driver=0x7fcc5c07b8a0, logManager=0x7fcc70003c00, def=0x7fcc70019070, monitor_chr=0x7fcc70004bb0, monitor_json=true, qemuCaps=0x7fcc70004000, migrateURI=0x7fcc700199c0 "defer", snapshot=0x0,
          vmop=VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_START, standalone=false, enableFips=false, nodeset=0x0, nnicindexes=0x7fcc95087498, nicindexes=0x7fcc950874a0, domainLibDir=0x7fcc700047c0 "/var/lib/libvirt/qemu/domain-1-fedora") at qemu/qemu_command.c:9547
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      647db05e
    • C
      qemu_agent|monitor: use different log on hangup event · 4c886408
      Chen Hanxiao 提交于
      Both qemu monitor and agent print the same
      log on HUANGUP event, which would be confusing
      when reading libvirtd log.
      
      This patch will give a different log message to them.
      Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      4c886408
  3. 16 9月, 2016 3 次提交
    • M
      conf: Allow copying of shmem defs · 921ec15f
      Martin Kletzander 提交于
      This way we'll be able to hotplug with both --live and --config in one
      API call.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      921ec15f
    • L
      qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64) · 706b5b62
      Laszlo Ersek 提交于
      Most of QEMU's PCI display device models, such as:
      
        libvirt video/model/@type  QEMU -device
        -------------------------  ------------
        cirrus                     cirrus-vga
        vga                        VGA
        qxl                        qxl-vga
        virtio                     virtio-vga
      
      come with a linear framebuffer (sometimes called "VGA compatibility
      framebuffer"). This linear framebuffer lives in one of the PCI device's
      MMIO BARs, and allows guest code (primarily: firmware drivers, and
      non-accelerated OS drivers) to display graphics with direct memory access.
      
      Due to architectural reasons on aarch64/KVM hosts, this kind of
      framebuffer doesn't / can't work in
      
        qemu-system-(arm|aarch64) -M virt
      
      machines. Cache coherency issues guarantee a corrupted / unusable display.
      The problem has been researched by several people, including kvm-arm
      maintainers, and it's been decided that the best way (practically the only
      way) to have boot time graphics for such guests is to consolidate on
      QEMU's "virtio-gpu-pci" device.
      
      >From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt
      supports
      
        <devices>
          <video>
            <model type='virtio'/>
          </video>
        </devices>
      
      but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga"
      device model. (See the qemuBuildDeviceVideoStr() function and the
      "qemuDeviceVideo" enum impl.)
      
      According to the above, this is not right for the "virt" machine type; the
      qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga"
      device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure
      virtio device without a compatibility framebuffer, is available, and works
      fine.
      
      (The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware
      for "virt" -- supports "virtio-gpu-pci", as of upstream commit
      3ef3209d3028. See
      <https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.)
      
      Override the default mapping of "virtio", from "virtio-vga" to
      "virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true.
      
      Cc: Andrea Bolognani <abologna@redhat.com>
      Cc: Drew Jones <drjones@redhat.com>
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Cc: Martin Kletzander <mkletzan@redhat.com>
      Suggested-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NMartin Kletzander <mkletzan@redhat.com>
      706b5b62
    • M
      util: Expose virHostCPUStatsAssign on non-Linux · b51e26f7
      Martin Kletzander 提交于
      There is nothing Linux-specific in that function.  Also since commit
      8c3b5bf4 mingw build is broken due to
      the fact that this function is not compiled in the library.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b51e26f7
  4. 15 9月, 2016 9 次提交
  5. 14 9月, 2016 8 次提交
  6. 13 9月, 2016 5 次提交
  7. 12 9月, 2016 5 次提交
    • D
      qemu: avoid parameter named 'listen' · 92513bc2
      Daniel P. Berrange 提交于
      previous commit:
      
        commit 2c322378
        Author: John Ferlan <jferlan@redhat.com>
        Date:   Mon Jun 13 12:30:34 2016 -0400
      
          qemu: Add the ability to hotplug the TLS X.509 environment
      
      added a parameter "bool listen" in some methods. This
      unfortunately clashes with the listen() method, causing
      compile failures on certain platforms (RHEL-6 for example)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      92513bc2
    • J
      storage: Need to properly read the crypt offset value · 2f6b750e
      John Ferlan 提交于
      Commit id 'a48c7141' altered how to determine if a volume was encrypted
      by adding a peek at an offset into the file at a specific buffer location.
      Unfortunately, all that was compared was the first "char" of the buffer
      against the expect "int" value.
      
      Restore the virReadBufInt32BE to get the complete field in order to
      compare against the expected value from the qcow2EncryptionInfo or
      qcow1EncryptionInfo "modeValue" field.
      
      This restores the capability to create a volume with encryption, then
      refresh the pool, and still find the encryption for the volume.
      2f6b750e
    • J
      storage: Need to refresh secret for luks volume after volume refresh · b68487c9
      John Ferlan 提交于
      A LUKS volume uses the volume secret type just like the QCOW2 secret, so
      adjust the loading of the default secrets to handle any volume that the
      virStorageFileGetMetadataFromBuf code has deemed to be an encrypted volume
      to search for the volume's secret. This lookup is done by volume usage
      where the usage is expected to be the path to volume.
      b68487c9
    • N
      log: Fix reporting OOM error incorrectly when defining a logging filter · b6daacf6
      Nikolay Shirokovskiy 提交于
      When a new filter is being defined, the return code is not handled properly,
      thus triggering OOM error reporting routine (bug introduced by 51b2606f).
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b6daacf6
    • J
      qemu: Don't use query-migrate on destination · 56258a38
      Jiri Denemark 提交于
      When migration fails, we need to poke QEMU monitor to check for a reason
      of the failure. We did this using query-migrate QMP command, which is
      not supposed to return any meaningful result on the destination side.
      Thus if the monitor was still functional when we detected the migration
      failure, parsing the answer from query-migrate always failed with the
      following error message:
      
          "info migration reply was missing return status"
      
      This irrelevant message was then used as the reason for the migration
      failure replacing any message we might have had.
      
      Let's use harmless query-status for poking the monitor to make sure we
      only get an error if the monitor connection is broken.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1374613Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      56258a38