qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 996051: xen-pt: Fix PCI devices re-attach fai


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 996051: xen-pt: Fix PCI devices re-attach failed
Date: Tue, 13 Jan 2015 12:30:08 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 99605175c93a24be4aa39543cd02551ea205e614
      
https://github.com/qemu/qemu/commit/99605175c93a24be4aa39543cd02551ea205e614
  Author: Liang Li <address@hidden>
  Date:   2015-01-13 (Tue, 13 Jan 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen-pt: Fix PCI devices re-attach failed

Use the 'xl pci-attach $DomU $BDF' command to attach more than
one PCI devices to the guest, then detach the devices with
'xl pci-detach $DomU $BDF', after that, re-attach these PCI
devices again, an error message will be reported like following:

    libxl: error: libxl_qmp.c:287:qmp_handle_error_response: receive
    an error message from QMP server: Duplicate ID 'pci-pt-03_10.1'
    for device.

If using the 'address_space_memory' as the parameter of
'memory_listener_register', 'xen_pt_region_del' will not be called
if the memory region's name is not 'xen-pci-pt-*' when the devices
is detached. This will cause the device's related QemuOpts object
not be released properly.

Using the device's address space can avoid such issue, because the
calling count of 'xen_pt_region_add' when attaching and the calling
count of 'xen_pt_region_del' when detaching is the same, so all the
memory region ref and unref by the 'xen_pt_region_add' and
'xen_pt_region_del' can be released properly.

Signed-off-by: Liang Li <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reported-by: Longtao Pang <address@hidden>


  Commit: c1d322e6048796296555dd36fdd102d7fa2f50bf
      
https://github.com/qemu/qemu/commit/c1d322e6048796296555dd36fdd102d7fa2f50bf
  Author: Stefano Stabellini <address@hidden>
  Date:   2015-01-13 (Tue, 13 Jan 2015)

  Changed paths:
    M xen-hvm.c

  Log Message:
  -----------
  xen-hvm: increase maxmem before calling xc_domain_populate_physmap

Increase maxmem before calling xc_domain_populate_physmap_exact to
avoid the risk of running out of guest memory. This way we can also
avoid complex memory calculations in libxl at domain construction
time.

This patch fixes an abort() when assigning more than 4 NICs to a VM.

Signed-off-by: Stefano Stabellini <address@hidden>
Signed-off-by: Don Slutz <address@hidden>


  Commit: 3a7f560fa612610822727f7647ed6bc10bccd6ec
      
https://github.com/qemu/qemu/commit/3a7f560fa612610822727f7647ed6bc10bccd6ec
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-13 (Tue, 13 Jan 2015)

  Changed paths:
    M hw/xen/xen_pt.c
    M xen-hvm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/sstabellini/xen-2015-01-13' into staging

* remotes/sstabellini/xen-2015-01-13:
  xen-hvm: increase maxmem before calling xc_domain_populate_physmap
  xen-pt: Fix PCI devices re-attach failed

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a00369fc565c...3a7f560fa612

reply via email to

[Prev in Thread] Current Thread [Next in Thread]