1. 05 9月, 2018 11 次提交
  2. 04 9月, 2018 17 次提交
  3. 31 8月, 2018 1 次提交
  4. 29 8月, 2018 3 次提交
    • L
      qemu: Validate memory access during validate domain config · fe67e3e2
      Luyao Huang 提交于
      Commit 6534b3c4 tried to raise an error when there is no numa
      nodes by setting access='shared' in the domain config, but added
      a helper called from qemuDomainDeviceDefValidate instead of a
      helper called from qemuDomainDefValidate for XML:
      
        <memoryBacking>
          <hugepages/>
          <access mode='shared'/>
        </memoryBacking>
      
      Since there are no memory devices in the test XML, there would
      be no validation failure, but the test added was still failing.
      Investigating that it turns out that unnecessary XML elements
      were causing the failure (no need for <video>, <graphics>,
      <pm>, usb controller model "piix3-uhci", disk attribute for
      "discard='unmap'", <serial>, <console>, <channel> and a
      memballoon model). Removing all those before moving the method
      caused the test to succeed.
      
      So this patch moves the validation to the right place and
      removes all the unnecessary XML pieces that were causing
      a false validation failure.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fe67e3e2
    • M
      virDomainObjListAddLocked: fix double free · 7e760f61
      Marc Hartmayer 提交于
      If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked
      returns NULL (although the definition actually exists). Therefore, the
      possibility exits that "virHashAddEntry" will raise the error
      "Duplicate key" => virDomainObjListAddObjLocked fails =>
      virDomainObjEndAPI(&vm) is called and this leads to a freeing of @def
      since @def is already assigned to vm->def. But actually this leads to
      a double free since the common usage pattern is that the caller of
      virDomainObjListAdd(Locked) is responsible for freeing @def in case of
      an error.
      
      Let's fix this by setting vm->def to NULL in case of an error.
      
      Backtrace:
      
         ➤  bt
         #0  virFree (ptrptr=0x7575757575757575)
         #1  0x000003ffb5b25b3e in virDomainResourceDefFree
         #2  0x000003ffb5b37c34 in virDomainDefFree
         #3  0x000003ff9123f734 in qemuDomainDefineXMLFlags
         #4  0x000003ff9123f7f4 in qemuDomainDefineXML
         #5  0x000003ffb5cd2c84 in virDomainDefineXML
         #6  0x000000011745aa82 in remoteDispatchDomainDefineXML
         ...
      Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com>
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
      7e760f61
    • A
      qemu: Add more defaults for RISC-V virt guests · 6c5f6cda
      Andrea Bolognani 提交于
      We would have used virtio for networking anyway, but it's
      better to be explicit; for graphics, none of the existing
      models work right now but virtio is the only one which
      has a non-PCI variant, so it's as good a default as any
      Spotted-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      6c5f6cda
  5. 28 8月, 2018 8 次提交