1. 22 9月, 2016 10 次提交
  2. 21 9月, 2016 5 次提交
    • P
      qemu: driver: Don't return automatic NUMA emulator pinning data for persistentDef · 006a532c
      Peter Krempa 提交于
      Calling virDomainGetEmulatorPinInfo on a live VM with automatic NUMA
      pinning and VIR_DOMAIN_AFFECT_CONFIG would return the automatic pinning
      data in some cases which is bogus. Use the autoCpuset property only when
      called on a live definition.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1365779
      006a532c
    • P
      qemu: driver: Don't return automatic NUMA vCPU pinning data for persistentDef · 552892c5
      Peter Krempa 提交于
      Calling virDomainGetVcpuPinInfo on a live VM with automatic NUMA pinning
      and VIR_DOMAIN_AFFECT_CONFIG would return the automatic pinning data
      in some cases which is bogus. Use the autoCpuset property only when
      called on a live definition.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1365779
      552892c5
    • P
      qemu: domain: Add macro to simplify access to vm private data · 63aac8c2
      Peter Krempa 提交于
      Sometimes adding a separate variable to access vm->privateData is not
      necessary. Add a macro that will do the typecasting rather than having
      to add a temp variable to force the compiler to typecast it.
      63aac8c2
    • J
      qemu: Ignore graphics cookie if port == 0 · 2e164b45
      Jiri Denemark 提交于
      Old libvirt represents
      
          <graphics type='spice'>
            <listen type='none'/>
          </graphics>
      
      as
      
          <graphics type='spice' autoport='no'/>
      
      In this mode, QEMU doesn't listen for SPICE connection anywhere and
      clients have to use virDomainOpenGraphics* APIs to attach to the domain.
      That is, the client has to run on the same host where the domains runs
      and it's impossible to tell the client to reconnect to the destination
      QEMU during migration (unless there is some kind of proxy on the host).
      
      While current libvirt correctly ignores such graphics devices when
      creating graphics migration cookie, old libvirt just sends
      
          <graphics type='spice' port='0' listen='0.0.0.0' tlsPort='-1'/>
      
      in the cookie. After seeing this cookie, we happily would call
      client_migrate_info QMP command and wait for SPICE_MIGRATE_COMPLETED
      event, which is quite pointless since the doesn't know where to connecti
      anyway. We should just ignore such cookies.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1376083Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      2e164b45
    • J
      qemuDomainOpenGraphics: Start job early · 53ae58b0
      Jiri Denemark 提交于
      Checking if a domain's definition or if it is active before we got a job
      is pointless since the domain might have changed in the meantime.
      
      Luckily libvirtd didn't crash when the API tried to talk to an inactive
      domain:
      
      debug : qemuDomainObjBeginJobInternal:2914 : Started job: modify
          (async=none vm=0x7f8f340140c0 name=ble)
      debug : qemuDomainObjEnterMonitorInternal:3137 : Entering monitor
          (mon=(nil) vm=0x7f8f340140c0 name=ble)
      warning : virObjectLock:319 : Object (nil) ((unknown)) is not a
          virObjectLockable instance
      debug : qemuMonitorOpenGraphics:3505 : protocol=spice fd=27
          fdname=graphicsfd skipauth=1
      error : qemuMonitorOpenGraphics:3508 : invalid argument: monitor must
          not be NULL
      debug : qemuDomainObjExitMonitorInternal:3160 : Exited monitor
          (mon=(nil) vm=0x7f8f340140c0 name=ble)
      debug : qemuDomainObjEndJob:3068 : Stopping job: modify (async=none
          vm=0x7f8f340140c0 name=ble)
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      53ae58b0
  3. 20 9月, 2016 13 次提交
  4. 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
  5. 16 9月, 2016 1 次提交
    • 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
  6. 14 9月, 2016 7 次提交
  7. 13 9月, 2016 1 次提交