ppc-for-2.10 queue 20170725
The following changes since commit b5a74cd81d76cb467552f38f2b39520d07c65ea2:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170724' into staging (2017-07-24 18:15:45 +0100)
are available in the git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170725
for you to fetch changes up to 86844c213348a596ea716a44a6f337555e07ad09:
pseries: Update SLOF firmware image (2017-07-25 14:35:42 +1000)
----------------------------------------------------------------
ppc patch queue 2017-07-25
Last pull request for the 2.10 hard freeze, and correspondingly small. There are a handful of bugfixes here plus an update for the "pseries" guest firmware (SLOF).
This is later than ideal for a guest firmware update. However, this does include a number of fixes in that guest firmware, so I think it's worth the risk of squeezing this in just before the hard freeze.
----------------------------------------------------------------
Alexey Kardashevskiy (2):
spapr_pci: Fix obsolete comment about MSIX encoding in addr/data
pseries: Update SLOF firmware image
Bharata B Rao (1):
spapr: Fix QEMU abort during memory unplug
Laurent Vivier (1):
spapr/htab: fix savevm
hw/ppc/spapr.c | 40 +++++++++++++++++++++++----------------- hw/ppc/spapr_pci.c | 4 +--- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 902120 -> 905200 bytes roms/SLOF | 2 +- 5 files changed, 26 insertions(+), 22 deletions(-)
[Qemu-devel] [PULL 2/4] spapr/htab: fix savevm
From: Laurent Vivier <[email protected]>
Commit 3a38429 ("spapr: Add a "no HPT" encoding to HTAB migration stream") allows to migrate an empty HPT, but doesn't mark correctly the end of the migration stream.
The end condition (value returned by htab_save_iterate()) should be 1, whereas in 3a38429 it returns 0.
The problem can be reproduced with QEMU monitor command "savevm":
the command never stops and the disk image grows without limit.
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -1827,7 +1827,7 @@ static int htab_save_iterate(QEMUFile *f, void *opaque)/* Iteration header */ if (!spapr->htab_shift) {qemu_put_be32 (f,-1 ); -return 0 ; +return 1 ; }else {qemu_put_be32 (f,0 ); }
Signature · 1 line
2.13.3
[Qemu-devel] [PULL 1/4] spapr_pci: Fix obsolete comment about MSIX encoding in addr/data
In reply to David GibsonFrom: Alexey Kardashevskiy <[email protected]>
f1c2dc7c866a "spapr-pci: rework MSI/MSIX" (07/2013) changed MSIX encoding but forgot to change the comment so this changes it.
--- hw/ppc/spapr_pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
hw/ppc/spapr_pci.c +1 -3
@@ -723,9 +723,7 @@ static PCIINTxRoute spapr_route_intx_pin_to_irq(void *opaque, int pin)/* * MSI/MSIX memory region implementation. * The handler handles both MSI and MSIX. -* For MSI-X, the vector number is encoded as a part of the address, -* data is set to 0. -* For MSI, the vector number is encoded in least bits in data. +* The vector number is encoded in least bits in data. */ static void spapr_msi_write (void *opaque,hwaddr addr,uint64_t data,unsigned size)
Signature · 1 line
2.13.3
[Qemu-devel] [PULL 3/4] spapr: Fix QEMU abort during memory unplug
In reply to David GibsonFrom: Bharata B Rao <[email protected]>
Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState) introduced a new way to track pending LMBs of DIMM device that is marked for removal. Since this commit we can hit the assert in spapr_pending_dimm_unplugs_add() in the following situation:
- DIMM device removal fails as the guest doesn't allow the removal.
- Subsequent attempt to remove the same DIMM would hit the assert as the corresponding sPAPRDIMMState is still part of the pending_dimm_unplugs list.
Fix this by removing the assert and conditionally adding the sPAPRDIMMState to pending_dimm_unplugs list only when it is not already present.
[dwg: Tweaked to avoid returning NULL when spapr_pending_dimm_unplugs_add()
does find an existing entry]
--- hw/ppc/spapr.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)
hw/ppc/spapr.c +22 -16
@@ -2850,11 +2850,26 @@ static sPAPRDIMMState *spapr_pending_dimm_unplugs_find(sPAPRMachineState *s,return dimm_state; } -static void spapr_pending_dimm_unplugs_add (sPAPRMachineState *spapr, -sPAPRDIMMState *dimm_state) +static sPAPRDIMMState *spapr_pending_dimm_unplugs_add (sPAPRMachineState *spapr, +uint32_t nr_lmbs, +PCDIMMDevice *dimm) { -g_assert (!spapr_pending_dimm_unplugs_find (spapr, dimm_state->dimm)); -QTAILQ_INSERT_HEAD (&spapr->pending_dimm_unplugs, dimm_state, next); +sPAPRDIMMState *ds =NULL ; + +/* +* If this request is for a DIMM whose removal had failed earlier +* (due to guest's refusal to remove the LMBs), we would have this +* dimm already in the pending_dimm_unplugs list. In that +* case don't add again. +*/ + ds =spapr_pending_dimm_unplugs_find (spapr, dimm); +if (!ds) { + ds =g_malloc0 (sizeof (sPAPRDIMMState)); + ds->nr_lmbs = nr_lmbs; + ds->dimm = dimm; +QTAILQ_INSERT_HEAD (&spapr->pending_dimm_unplugs, ds, next); + } +return ds; } static void spapr_pending_dimm_unplugs_remove(sPAPRMachineState *spapr,
@@ -2875,7 +2890,6 @@ static sPAPRDIMMState *spapr_recover_pending_dimm_state(sPAPRMachineState *ms,uint32_t avail_lmbs =0 ;uint64_t addr_start, addr;int i; -sPAPRDIMMState *ds; addr_start =object_property_get_int (OBJECT (dimm),PC_DIMM_ADDR_PROP , &error_abort);
@@ -2891,11 +2905,7 @@ static sPAPRDIMMState *spapr_recover_pending_dimm_state(sPAPRMachineState *ms, addr +=SPAPR_MEMORY_BLOCK_SIZE ; } - ds =g_malloc0 (sizeof (sPAPRDIMMState)); - ds->nr_lmbs = avail_lmbs; - ds->dimm = dimm; -spapr_pending_dimm_unplugs_add (ms, ds); -return ds; +return spapr_pending_dimm_unplugs_add (ms, avail_lmbs, dimm); }/* Callback to be called during DRC release. */
@@ -2911,6 +2921,7 @@ void spapr_lmb_release(DeviceState *dev)* during the unplug process. In this case recover it. */ if (ds ==NULL ) { ds =spapr_recover_pending_dimm_state (spapr,PC_DIMM (dev)); +g_assert (ds);/* The DRC being examined by the caller at least must be counted */ g_assert (ds->nr_lmbs); }
@@ -2942,18 +2953,13 @@ static void spapr_memory_unplug_request(HotplugHandler *hotplug_dev,uint64_t addr_start, addr;int i;sPAPRDRConnector *drc; -sPAPRDIMMState *ds; - addr_start =object_property_get_uint (OBJECT (dimm),PC_DIMM_ADDR_PROP , &local_err);if (local_err) { goto out; } - ds =g_malloc0 (sizeof (sPAPRDIMMState)); - ds->nr_lmbs = nr_lmbs; - ds->dimm = dimm; -spapr_pending_dimm_unplugs_add (spapr, ds); +spapr_pending_dimm_unplugs_add (spapr, nr_lmbs, dimm); addr = addr_start;for (i =0 ; i < nr_lmbs; i++) {
Signature · 1 line
2.13.3
[Qemu-devel] [PULL 4/4] pseries: Update SLOF firmware image
In reply to David GibsonFrom: Alexey Kardashevskiy <[email protected]>
The main changes are:
- fixes in PCI bridges code;
- LUN>255 are allowed not in virtio-scsi.
The full list is:
Quoted 11 lines
pci-scan: Fix pci-bridge-set-mem-base and pci-bridge-set-mem-limit
pci: Avoid 32-bit prefetchable memory area if possible
Remove unused functions ishexdigit and $cat-comma
pci: Translate PCI addresses to host addresses at the end of map-in Define 'open' and 'close' words of the /aliases nodes right from the start
virtio-scsi: Allow LUNs bigger than 255
paflof: Silence gcc's -Warray-bounds warning for stack pointersboard_qemu: move code out of fdt-fix-node-phandleboard_qemu: drop unused values early in fdt-fix-node-phandle
pci: Improve the pci-var-out debug function
libhvcall: drop unusedKVMPPC_H_REPORT_MC_ERRandKVMPPC_H_NMI_MCEdefines
--- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 902120 -> 905200 bytes roms/SLOF | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-)
pc-bios/README +1 -1
@@ -17,7 +17,7 @@ - SLOF (Slimline Open Firmware) is a free IEEE 1275 Open Firmware implementation for certain IBM POWER hardware. The sources are at https://github.com/aik/SLOF, and the image currently in qemu is - built from git tag qemu-slof-20170303. + built from git tag qemu-slof-20170724. - sgabios (the Serial Graphics Adapter option ROM) provides a means for legacy x86 software to communicate with an attached serial console as
pc-bios/slof.bin binary +0 -0
roms/SLOF +1 -1
@@ -1 +1 @@ -Subproject commit 834113a1c67d6fb53dea153c3313d182238f2d36 +Subproject commit 89f519f09bf850918b60526e50409afb663418aa
Signature · 1 line
2.13.3
Peter Maydell
AppliedQuoted 28 lines · David Gibson
The following changes since commit
b5a74cd81d76cb467552f38f2b39520d07c65ea2:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170724' into staging (2017-07-24 18:15:45 +0100)
are available in the git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-2.10-20170725for you to fetch changes up to
86844c213348a596ea716a44a6f337555e07ad09:pseries: Update SLOF firmware image (2017-07-25 14:35:42 +1000)
----------------------------------------------------------------
ppc patch queue 2017-07-25Last pull request for the 2.10 hard freeze, and correspondingly small. There are a handful of bugfixes here plus an update for the "pseries" guest firmware (SLOF).
This is later than ideal for a guest firmware update. However, this does include a number of fixes in that guest firmware, so I think it's worth the risk of squeezing this in just before the hard freeze.
----------------------------------------------------------------
Alexey Kardashevskiy (2):
spapr_pci: Fix obsolete comment about MSIX encoding in addr/data
pseries: Update SLOF firmware image
Quoted 5 lines
Bharata B Rao (1):
spapr: Fix QEMU abort during memory unplugLaurent Vivier (1):
spapr/htab: fix savevm
Applied, thanks.
-- PMM