All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
@ 2019-07-23 17:00 Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h Michael Roth
                   ` (39 more replies)
  0 siblings, 40 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

Hi everyone,                                                                                              

The following new patches are queued for QEMU stable v3.1.1:

  https://github.com/mdroth/qemu/commits/stable-3.1-staging

The release is planned for 2019-08-01:

  https://wiki.qemu.org/Planning/3.1

Please respond here or CC qemu-stable@nongnu.org on any patches you
think should be included in the release.

Note that this update falls outside the normal stable release support
window (~1 development cycle), but is being released now since it was
delayed from its intended release date.

Thanks!




^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 18:57   ` BALATON Zoltan
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 02/36] iotests: make 235 work on s390 (and others) Michael Roth
                   ` (38 subsequent siblings)
  39 siblings, 1 reply; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-stable

From: BALATON Zoltan <balaton@eik.bme.hu>

Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and
bitbang_i2c.h an error even if they are identical. Move it to a common
place to allow building with this clang version.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 2b4c1125ac3db2734222ff43c25388a16aca4a99)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/i2c/bitbang_i2c.h        | 2 --
 include/hw/i2c/i2c.h        | 2 ++
 include/hw/i2c/ppc4xx_i2c.h | 3 ---
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/i2c/bitbang_i2c.h b/hw/i2c/bitbang_i2c.h
index 3a7126d5de..9443021710 100644
--- a/hw/i2c/bitbang_i2c.h
+++ b/hw/i2c/bitbang_i2c.h
@@ -3,8 +3,6 @@
 
 #include "hw/i2c/i2c.h"
 
-typedef struct bitbang_i2c_interface bitbang_i2c_interface;
-
 #define BITBANG_I2C_SDA 0
 #define BITBANG_I2C_SCL 1
 
diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index 5dc166158b..cf4c45a98f 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -82,6 +82,8 @@ int i2c_recv(I2CBus *bus);
 
 DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr);
 
+typedef struct bitbang_i2c_interface bitbang_i2c_interface;
+
 /* lm832x.c */
 void lm832x_key_event(DeviceState *dev, int key, int state);
 
diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h
index 0891a9c948..b3450bacf7 100644
--- a/include/hw/i2c/ppc4xx_i2c.h
+++ b/include/hw/i2c/ppc4xx_i2c.h
@@ -31,9 +31,6 @@
 #include "hw/sysbus.h"
 #include "hw/i2c/i2c.h"
 
-/* from hw/i2c/bitbang_i2c.h */
-typedef struct bitbang_i2c_interface bitbang_i2c_interface;
-
 #define TYPE_PPC4xx_I2C "ppc4xx-i2c"
 #define PPC4xx_I2C(obj) OBJECT_CHECK(PPC4xxI2CState, (obj), TYPE_PPC4xx_I2C)
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 02/36] iotests: make 235 work on s390 (and others)
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 03/36] Changes requirement for "vsubsbs" instruction Michael Roth
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Christian Borntraeger, qemu-stable

From: Christian Borntraeger <borntraeger@de.ibm.com>

"-machine pc" will not work all architectures. Lets fall back to the
default machine by not specifying it.

In addition we also need to specify -no-shutdown on s390 as qemu will
exit otherwise.

Cc: qemu-stable@nongnu.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 2c26e648e4350079b0c86a6627b2d3566c3709c0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/qemu-iotests/235 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
index da044ed34e..d6edd97ab4 100755
--- a/tests/qemu-iotests/235
+++ b/tests/qemu-iotests/235
@@ -49,7 +49,9 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk,
                 str(size))
 
 vm = QEMUMachine(iotests.qemu_prog)
-vm.add_args('-machine', 'pc,accel=kvm')
+vm.add_args('-machine', 'accel=kvm')
+if iotests.qemu_default_machine == 's390-ccw-virtio':
+        vm.add_args('-no-shutdown')
 vm.add_args('-drive', 'id=src,file=' + disk)
 vm.launch()
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 03/36] Changes requirement for "vsubsbs" instruction
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 02/36] iotests: make 235 work on s390 (and others) Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 04/36] pcie: set link state inactive/active after hot unplug/plug Michael Roth
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Gibson, qemu-stable, Leonardo Bras, Paul A. Clarke

From: "Paul A. Clarke" <pc@us.ibm.com>

Changes requirement for "vsubsbs" instruction, which has been supported
since ISA 2.03. (Please see section 5.9.1.2 of ISA 2.03)

Reported-by: Paul A. Clarke <pc@us.ibm.com>
Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
Signed-off-by: Leonardo Bras <leonardo@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit fcfbc18d00b10335310c9665edd6e04f2d152be8)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target/ppc/translate/vmx-ops.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/translate/vmx-ops.inc.c b/target/ppc/translate/vmx-ops.inc.c
index 139f80cb24..84e05fb827 100644
--- a/target/ppc/translate/vmx-ops.inc.c
+++ b/target/ppc/translate/vmx-ops.inc.c
@@ -143,7 +143,7 @@ GEN_VXFORM(vaddsws, 0, 14),
 GEN_VXFORM_DUAL(vsububs, bcdadd, 0, 24, PPC_ALTIVEC, PPC_NONE),
 GEN_VXFORM_DUAL(vsubuhs, bcdsub, 0, 25, PPC_ALTIVEC, PPC_NONE),
 GEN_VXFORM(vsubuws, 0, 26),
-GEN_VXFORM_DUAL(vsubsbs, bcdtrunc, 0, 28, PPC_NONE, PPC2_ISA300),
+GEN_VXFORM_DUAL(vsubsbs, bcdtrunc, 0, 28, PPC_ALTIVEC, PPC2_ISA300),
 GEN_VXFORM(vsubshs, 0, 29),
 GEN_VXFORM_DUAL(vsubsws, xpnd04_2, 0, 30, PPC_ALTIVEC, PPC_NONE),
 GEN_VXFORM_207(vadduqm, 0, 4),
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 04/36] pcie: set link state inactive/active after hot unplug/plug
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (2 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 03/36] Changes requirement for "vsubsbs" instruction Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 05/36] pc:piix4: Update smbus I/O space after a migration Michael Roth
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Wang Haibin, Zheng Xiang, Zheng Xiang, qemu-stable, Michael S . Tsirkin

From: Zheng Xiang <zhengxiang9@huawei.com>

When VM boots from the latest version of linux kernel, after
hot-unpluging virtio-blk disks which are hotplugged into
pcie-root-port, the VM's dmesg log shows:

[  151.046242] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0001 from Slot Status
[  151.046365] pciehp 0000:00:05.0:pcie004: Slot(0-3): Attention button pressed
[  151.046369] pciehp 0000:00:05.0:pcie004: Slot(0-3): Powering off due to button press
[  151.046420] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  151.046425] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
[  151.046464] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  151.046468] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd c0
[  156.163421] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 2f1
[  156.163427] pciehp 0000:00:05.0:pcie004: pciehp_unconfigure_device: domain:bus:dev = 0000:06:00
[  156.198736] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  156.198772] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
[  157.224124] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0018 from Slot Status
[  157.224194] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
[  157.224220] pciehp 0000:00:05.0:pcie004: pciehp_check_link_active: lnk_status = 2011
[  157.224223] pciehp 0000:00:05.0:pcie004: Slot(0-3): Link Up
[  157.224233] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 7f1
[  157.224281] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  157.224285] pciehp 0000:00:05.0:pcie004: pciehp_power_on_slot: SLOTCTRL a8 write cmd 0
[  157.224300] pciehp 0000:00:05.0:pcie004: __pciehp_link_set: lnk_ctrl = 0
[  157.224336] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  157.224339] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
[  159.739294] pci 0000:06:00.0 id reading try 50 times with interval 20 ms to get ffffffff
[  159.739315] pciehp 0000:00:05.0:pcie004: pciehp_check_link_status: lnk_status = 2011
[  159.739318] pciehp 0000:00:05.0:pcie004: Failed to check link status
[  159.739371] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  159.739394] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
[  160.771426] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  160.771452] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
[  160.771495] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  160.771499] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd 40
[  160.771535] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[  160.771539] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300

After analyzing the log information, it seems that qemu doesn't
change the Link Status from active to inactive after hot-unplug.
This results in the abnormal log after the linux kernel commit
d331710ea78fea merged.

Furthermore, If I hotplug the same virtio-blk disk after hot-unplug,
the virtio-blk would turn on and then back off.

So this patch set the Link Status inactive after hot-unplug and
active after hot-plug.

Signed-off-by: Zheng Xiang <zhengxiang9@huawei.com>
Signed-off-by: Zheng Xiang <xiang.zheng@linaro.org>
Cc: Wang Haibin <wanghaibin.wang@huawei.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2f2b18f60bf17453b4c01197a9316615a3c1f1de)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/pci/pcie.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 6c91bd44a0..66b73b87c8 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -345,6 +345,10 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
     if (!dev->hotplugged) {
         pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
                                    PCI_EXP_SLTSTA_PDS);
+        if (pci_dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+            pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
+                                       PCI_EXP_LNKSTA_DLLLA);
+        }
         return;
     }
 
@@ -355,6 +359,10 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
     if (pci_get_function_0(pci_dev)) {
         pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
                                    PCI_EXP_SLTSTA_PDS);
+        if (pci_dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+            pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
+                                       PCI_EXP_LNKSTA_DLLLA);
+        }
         pcie_cap_slot_event(PCI_DEVICE(hotplug_dev),
                             PCI_EXP_HP_EV_PDC | PCI_EXP_HP_EV_ABP);
     }
@@ -531,6 +539,10 @@ void pcie_cap_slot_write_config(PCIDevice *dev,
 
         pci_word_test_and_clear_mask(exp_cap + PCI_EXP_SLTSTA,
                                      PCI_EXP_SLTSTA_PDS);
+        if (dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+            pci_word_test_and_clear_mask(exp_cap + PCI_EXP_LNKSTA,
+                                         PCI_EXP_LNKSTA_DLLLA);
+        }
         pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
                                        PCI_EXP_SLTSTA_PDC);
     }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 05/36] pc:piix4: Update smbus I/O space after a migration
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (3 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 04/36] pcie: set link state inactive/active after hot unplug/plug Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 06/36] hw/s390x: Fix bad mask in time2tod() Michael Roth
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Corey Minyard, Michael S . Tsirkin, qemu-stable, Igor Mammedov

From: Corey Minyard <cminyard@mvista.com>

Otherwise it won't be set up correctly and won't work after
miigration.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2b4e573c7c7b9a698ba6931ba456bbd8d3d8c84c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/acpi/piix4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index e330f24c71..2f4dd03b83 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -173,6 +173,7 @@ static int vmstate_acpi_post_load(void *opaque, int version_id)
     PIIX4PMState *s = opaque;
 
     pm_io_space_update(s);
+    smbus_io_space_update(s);
     return 0;
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 06/36] hw/s390x: Fix bad mask in time2tod()
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (4 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 05/36] pc:piix4: Update smbus I/O space after a migration Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 07/36] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0 Michael Roth
                   ` (33 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Cornelia Huck, qemu-stable

From: Thomas Huth <thuth@redhat.com>

Since "s390x/tcg: avoid overflows in time2tod/tod2time", the
time2tod() function tries to deal with the 9 uppermost bits in the
time value, but uses the wrong mask for this: 0xff80000000000000 should
be used instead of 0xff10000000000000 here.

Fixes: 14055ce53c2d901d826ffad7fb7d6bb8ab46bdfd
Cc: qemu-stable@nongnu.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1544792887-14575-1-git-send-email-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[CH: tweaked commit message]
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit aba7a5a2de3dba5917024df25441f715b9249e31)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 include/hw/s390x/tod.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h
index 413c0d7c02..442f45b2f5 100644
--- a/include/hw/s390x/tod.h
+++ b/include/hw/s390x/tod.h
@@ -50,7 +50,7 @@ typedef struct S390TODClass {
 /* Converts ns to s390's clock format */
 static inline uint64_t time2tod(uint64_t ns)
 {
-    return (ns << 9) / 125 + (((ns & 0xff10000000000000ull) / 125) << 9);
+    return (ns << 9) / 125 + (((ns & 0xff80000000000000ull) / 125) << 9);
 }
 
 /* Converts s390's clock format to ns */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 07/36] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (5 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 06/36] hw/s390x: Fix bad mask in time2tod() Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 08/36] s390x: Return specification exception for unimplemented diag 308 subcodes Michael Roth
                   ` (32 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-stable, Laurent Vivier

From: Peter Maydell <peter.maydell@linaro.org>

Linux returns success if pwrite64() or pread64() are called with a
zero length NULL buffer, but QEMU was returning -TARGET_EFAULT.

This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9
for the write syscall, and long before that in 38d840e6790c29f59
for the read syscall.

Fixes: https://bugs.launchpad.net/qemu/+bug/1810433

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190108184900.9654-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
(cherry picked from commit 2bd3f8998e1e7dcd9afc29fab252fb9936f9e956)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 linux-user/syscall.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 280137da8c..b13a170e52 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9677,8 +9677,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
             arg4 = arg5;
             arg5 = arg6;
         }
-        if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0)))
-            return -TARGET_EFAULT;
+        if (arg2 == 0 && arg3 == 0) {
+            /* Special-case NULL buffer and zero length, which should succeed */
+            p = 0;
+        } else {
+            p = lock_user(VERIFY_WRITE, arg2, arg3, 0);
+            if (!p) {
+                return -TARGET_EFAULT;
+            }
+        }
         ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5)));
         unlock_user(p, arg2, ret);
         return ret;
@@ -9687,8 +9694,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
             arg4 = arg5;
             arg5 = arg6;
         }
-        if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1)))
-            return -TARGET_EFAULT;
+        if (arg2 == 0 && arg3 == 0) {
+            /* Special-case NULL buffer and zero length, which should succeed */
+            p = 0;
+        } else {
+            p = lock_user(VERIFY_READ, arg2, arg3, 1);
+            if (!p) {
+                return -TARGET_EFAULT;
+            }
+        }
         ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5)));
         unlock_user(p, arg2, 0);
         return ret;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 08/36] s390x: Return specification exception for unimplemented diag 308 subcodes
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (6 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 07/36] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0 Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use Michael Roth
                   ` (31 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cornelia Huck, qemu-stable, Janosch Frank

From: Janosch Frank <frankja@linux.ibm.com>

The architecture specifies specification exceptions for all
unavailable subcodes.

The presence of subcodes is indicated by checking some query subcode.
For example 6 will indicate that 3-6 are available. So future systems
might call new subcodes to check for new features. This should not
trigger a hw error, instead we return the architectured specification
exception.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Cc: qemu-stable@nongnu.org
Message-Id: <20190111113657.66195-3-frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target/s390x/diag.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index acb0f3d4af..aafa740f61 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -130,7 +130,7 @@ out:
         }
         return;
     default:
-        hw_error("Unhandled diag308 subcode %" PRIx64, subcode);
+        s390_program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO, ra);
         break;
     }
 }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (7 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 08/36] s390x: Return specification exception for unimplemented diag 308 subcodes Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid Michael Roth
                   ` (30 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-stable

From: Peter Maydell <peter.maydell@linaro.org>

The tcg_register_iommu_notifier() code has a GArray of
TCGIOMMUNotifier structs which it has registered by passing
memory_region_register_iommu_notifier() a pointer to the embedded
IOMMUNotifier field. Unfortunately, if we need to enlarge the
array via g_array_set_size() this can cause a realloc(), which
invalidates the pointer that memory_region_register_iommu_notifier()
put into the MemoryRegion's iommu_notify list. This can result
in segfaults.

Switch the GArray to holding pointers to the TCGIOMMUNotifier
structs, so that we can individually allocate and free them.

Cc: qemu-stable@nongnu.org
Fixes: 1f871c5e6b0f30644a60a ("exec.c: Handle IOMMUs in address_space_translate_for_iotlb()")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190128174241.5860-1-peter.maydell@linaro.org
(cherry picked from commit 5601be3b01d73e21c09331599e2ce62df016ff94)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 exec.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/exec.c b/exec.c
index bb6170dbff..df5571eb3d 100644
--- a/exec.c
+++ b/exec.c
@@ -664,7 +664,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu,
     int i;
 
     for (i = 0; i < cpu->iommu_notifiers->len; i++) {
-        notifier = &g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier, i);
+        notifier = g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i);
         if (notifier->mr == mr && notifier->iommu_idx == iommu_idx) {
             break;
         }
@@ -672,7 +672,8 @@ static void tcg_register_iommu_notifier(CPUState *cpu,
     if (i == cpu->iommu_notifiers->len) {
         /* Not found, add a new entry at the end of the array */
         cpu->iommu_notifiers = g_array_set_size(cpu->iommu_notifiers, i + 1);
-        notifier = &g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier, i);
+        notifier = g_new0(TCGIOMMUNotifier, 1);
+        g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i) = notifier;
 
         notifier->mr = mr;
         notifier->iommu_idx = iommu_idx;
@@ -704,8 +705,9 @@ static void tcg_iommu_free_notifier_list(CPUState *cpu)
     TCGIOMMUNotifier *notifier;
 
     for (i = 0; i < cpu->iommu_notifiers->len; i++) {
-        notifier = &g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier, i);
+        notifier = g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i);
         memory_region_unregister_iommu_notifier(notifier->mr, &notifier->n);
+        g_free(notifier);
     }
     g_array_free(cpu->iommu_notifiers, true);
 }
@@ -975,7 +977,7 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
         vmstate_register(NULL, cpu->cpu_index, cc->vmsd, cpu);
     }
 
-    cpu->iommu_notifiers = g_array_new(false, true, sizeof(TCGIOMMUNotifier));
+    cpu->iommu_notifiers = g_array_new(false, true, sizeof(TCGIOMMUNotifier *));
 #endif
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (8 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend " Michael Roth
                   ` (29 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Berger, qemu-stable, Stefan Berger

From: Stefan Berger <stefanb@linux.vnet.ibm.com>

Make sure that the new locality passed to tpm_tis_prep_abort()
is valid.

Add a comment to aborting_locty that it may be any locality, including
TPM_TIS_NO_LOCALITY.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit e92b63ea610201bd743343fc6b11e6c39c8d3515)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/tpm/tpm_tis.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index d9322692ee..9a795ce96c 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -263,7 +263,9 @@ static void tpm_tis_prep_abort(TPMState *s, uint8_t locty, uint8_t newlocty)
 {
     uint8_t busy_locty;
 
-    s->aborting_locty = locty;
+    assert(TPM_TIS_IS_VALID_LOCTY(newlocty));
+
+    s->aborting_locty = locty; /* may also be TPM_TIS_NO_LOCALITY */
     s->next_locty = newlocty;  /* locality after successful abort */
 
     /*
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend is valid
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (9 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation Michael Roth
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Berger, qemu-stable, Stefan Berger

From: Stefan Berger <stefanb@linux.vnet.ibm.com>

Make sure that the locality passed from the backend to
tpm_tis_request_completed() is valid.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit a639f96111eadb3b8e3021fd3f27e2948ad1c640)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/tpm/tpm_tis.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 9a795ce96c..1554026788 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -295,6 +295,8 @@ static void tpm_tis_request_completed(TPMIf *ti, int ret)
     uint8_t locty = s->cmd.locty;
     uint8_t l;
 
+    assert(TPM_TIS_IS_VALID_LOCTY(locty));
+
     if (s->cmd.selftest_done) {
         for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) {
             s->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (10 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend " Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix Michael Roth
                   ` (27 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable

From: Kevin Wolf <kwolf@redhat.com>

bdrv_co_invalidate_cache() clears the BDRV_O_INACTIVE flag before
actually activating a node so that the correct permissions etc. are
taken. In case of errors, the flag must be restored so that the next
call to bdrv_co_invalidate_cache() retries activation.

Restoring the flag was missing in the error path for a failed
parent->role->activate() call. The consequence is that this attempt to
activate all images correctly fails because we still set errp, however
on the next attempt BDRV_O_INACTIVE is already clear, so we return
success without actually retrying the failed action.

An example where this is observable in practice is migration to a QEMU
instance that has a raw format block node attached to a guest device
with share-rw=off (the default) while another process holds
BLK_PERM_WRITE for the same image. In this case, all activation steps
before parent->role->activate() succeed because raw can tolerate other
writers to the image. Only the parent callback (in particular
blk_root_activate()) tries to implement the share-rw=on property and
requests exclusive write permissions. This fails when the migration
completes and correctly displays an error. However, a manual 'cont' will
incorrectly resume the VM without calling blk_root_activate() again.

This case is described in more detail in the following bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1531888

Fix this by correctly restoring the BDRV_O_INACTIVE flag in the error
path.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 78fc3b3a26c145eebcdee992988644974b243a74)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block.c b/block.c
index 811239ca23..1ec4512d1e 100644
--- a/block.c
+++ b/block.c
@@ -4553,6 +4553,7 @@ static void coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs,
         if (parent->role->activate) {
             parent->role->activate(parent, &local_err);
             if (local_err) {
+                bs->open_flags |= BDRV_O_INACTIVE;
                 error_propagate(errp, local_err);
                 return;
             }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (11 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 14/36] slirp: check sscanf result when emulating ident Michael Roth
                   ` (26 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>

Configuring QEMU with:
   configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
Results in:
   qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
   } RdmaDeviceResources;
     ^
   qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here
   typedef struct RdmaDeviceResources RdmaDeviceResources;

Fix by removing one of the 'typedef' definitions.

Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20190214154053.15050-1-marcel.apfelbaum@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 59f911938fbaa6a5eff1146c8a4d74e1c55ecc2b)
*drop context dep. on c2dd117b385
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/rdma/rdma_rm_defs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
index 7228151239..17ee8f2871 100644
--- a/hw/rdma/rdma_rm_defs.h
+++ b/hw/rdma/rdma_rm_defs.h
@@ -85,7 +85,7 @@ typedef struct RdmaRmPort {
     enum ibv_port_state state;
 } RdmaRmPort;
 
-typedef struct RdmaDeviceResources {
+struct RdmaDeviceResources {
     RdmaRmPort ports[MAX_PORTS];
     RdmaRmResTbl pd_tbl;
     RdmaRmResTbl mr_tbl;
@@ -94,6 +94,6 @@ typedef struct RdmaDeviceResources {
     RdmaRmResTbl cq_tbl;
     RdmaRmResTbl cqe_ctx_tbl;
     GHashTable *qp_hash; /* Keeps mapping between real and emulated */
-} RdmaDeviceResources;
+};
 
 #endif
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 14/36] slirp: check sscanf result when emulating ident
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (12 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality Michael Roth
                   ` (25 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Samuel Thibault, secalert, qemu-stable, William Bowling

From: William Bowling <will@wbowling.info>

When emulating ident in tcp_emu, if the strchr checks passed but the
sscanf check failed, two uninitialized variables would be copied and
sent in the reply, so move this code inside the if(sscanf()) clause.

Signed-off-by: William Bowling <will@wbowling.info>
Cc: qemu-stable@nongnu.org
Cc: secalert@redhat.com
Message-Id: <1551476756-25749-1-git-send-email-will@wbowling.info>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit d3222975c7d6cda9e25809dea05241188457b113)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 slirp/tcp_subr.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index fa61349cbb..c27e0d158d 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -657,12 +657,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
 							break;
 						}
 					}
+					so_rcv->sb_cc = snprintf(so_rcv->sb_data,
+								 so_rcv->sb_datalen,
+								 "%d,%d\r\n", n1, n2);
+					so_rcv->sb_rptr = so_rcv->sb_data;
+					so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc;
 				}
-                                so_rcv->sb_cc = snprintf(so_rcv->sb_data,
-                                                         so_rcv->sb_datalen,
-                                                         "%d,%d\r\n", n1, n2);
-				so_rcv->sb_rptr = so_rcv->sb_data;
-				so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc;
 			}
 			m_free(m);
 			return 0;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (13 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 14/36] slirp: check sscanf result when emulating ident Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon Michael Roth
                   ` (24 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Stefan Berger

From: Liam Merwick <liam.merwick@oracle.com>

In tpm_tis_mmio_write() if the requesting locality is seizing
access, any seizure by a lower locality is cancelled.  However the
loop doing the seizure had an off-by-one error and the locality
immediately preceding the requesting locality was not being cleared.
This is fixed by adjusting the test in the for loop to check the
localities up to the requesting locality.

Signed-off-by: Liam Merwick <Liam.Merwick@oracle.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit 37b55d67c0f001b20b7831db3f9f24f1d453e1de)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 1554026788..fb08b483bc 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -620,7 +620,7 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
                 }
 
                 /* cancel any seize by a lower locality */
-                for (l = 0; l < locty - 1; l++) {
+                for (l = 0; l < locty; l++) {
                     s->loc[l].access &= ~TPM_TIS_ACCESS_SEIZE;
                 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (14 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Michael Roth
                   ` (23 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cornelia Huck, qemu-stable

From: Cornelia Huck <cohuck@redhat.com>

vfio-ap devices do not pin any pages in the host. Therefore, they
are compatible with memory ballooning.

Flag them as compatible, so both vfio-ap and a balloon can be
used simultaneously.

Cc: qemu-stable@nongnu.org
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 1883e8fc8005e9ef452890a075bae98e8c432968)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/vfio/ap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..0a25f5e096 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -104,6 +104,14 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
     vapdev->vdev.name = g_strdup_printf("%s", mdevid);
     vapdev->vdev.dev = dev;
 
+    /*
+     * vfio-ap devices operate in a way compatible with
+     * memory ballooning, as no pages are pinned in the host.
+     * This needs to be set before vfio_get_device() for vfio common to
+     * handle the balloon inhibitor.
+     */
+    vapdev->vdev.balloon_allowed = true;
+
     ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
     if (ret) {
         goto out_get_dev_err;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (15 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models Michael Roth
                   ` (22 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, qemu-stable, Robert Hoo

From: Robert Hoo <robert.hu@linux.intel.com>

PCONFIG is not available to guests; it must be specifically enabled
using the PCONFIG_ENABLE execution control.  Disable it, because
no one can ever use it.

Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Message-Id: <1545227081-213696-2-git-send-email-robert.hu@linux.intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 76e5a4d58357b9d077afccf7f7c82e17f733b722)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target/i386/cpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index f81d35e1f9..83152204b5 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2613,8 +2613,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
             CPUID_7_0_ECX_AVX512_VPOPCNTDQ | CPUID_7_0_ECX_LA57,
         .features[FEAT_7_0_EDX] =
-            CPUID_7_0_EDX_PCONFIG | CPUID_7_0_EDX_SPEC_CTRL |
-            CPUID_7_0_EDX_SPEC_CTRL_SSBD,
+            CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_SPEC_CTRL_SSBD,
         /* Missing: XSAVES (not supported by some Linux versions,
                 * including v4.1 to v4.12).
                 * KVM doesn't yet expose any XSAVES state save component,
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (16 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating Michael Roth
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, qemu-stable

From: Paolo Bonzini <pbonzini@redhat.com>

Processor tracing is not yet implemented for KVM and it will be an
opt in feature requiring a special module parameter.
Disable it, because it is wrong to enable it by default and
it is impossible that no one has ever used it.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 4c257911dcc7c4189768e9651755c849ce9db4e8)
*drop context dependency on ecb85fe48
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target/i386/cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 83152204b5..40814719bb 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2493,8 +2493,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
             CPUID_7_0_ECX_AVX512VNNI,
@@ -2546,7 +2545,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
@@ -2604,8 +2603,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (17 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL Michael Roth
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Christophe Fergeau, Markus Armbruster

From: Christophe Fergeau <cfergeau@redhat.com>

Commit 8bca4613 added support for %% in json strings when interpolating,
but in doing so broke handling of % when not interpolating.

When parse_string() is fed a string token containing '%', it skips the
'%' regardless of ctxt->ap, i.e. even it's not interpolating.  If the
'%' is the string's last character, it fails an assertion.  Else, it
"merely" swallows the '%'.

Fix parse_string() to handle '%' specially only when interpolating.

To gauge the bug's impact, let's review non-interpolating users of this
parser, i.e. code passing NULL context to json_message_parser_init():

* tests/check-qjson.c, tests/test-qobject-input-visitor.c,
  tests/test-visitor-serialization.c

  Plenty of tests, but we still failed to cover the buggy case.

* monitor.c: QMP input

* qga/main.c: QGA input

* qobject_from_json():

  - qobject-input-visitor.c: JSON command line option arguments of
    -display and -blockdev

    Reproducer: -blockdev '{"%"}'

  - block.c: JSON pseudo-filenames starting with "json:"

    Reproducer: https://bugzilla.redhat.com/show_bug.cgi?id=1668244#c3

  - block/rbd.c: JSON key pairs

    Pseudo-filenames starting with "rbd:".

Command line, QMP and QGA input are trusted.

Filenames are trusted when they come from command line, QMP or HMP.
They are untrusted when they come from from image file headers.
Example: QCOW2 backing file name.  Note that this is *not* the security
boundary between host and guest.  It's the boundary between host and an
image file from an untrusted source.

Neither failing an assertion nor skipping a character in a filename of
your choice looks exploitable.  Note that we don't support compiling
with NDEBUG.

Fixes: 8bca4613e6cddd948895b8db3def05950463495b
Cc: qemu-stable@nongnu.org
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Message-Id: <20190102140535.11512-1-cfergeau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
[Commit message extended to discuss impact]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
(cherry picked from commit bbc0586ced6e9ffdfd29d89fcc917b3d90ac3938)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qobject/json-parser.c | 10 ++++++----
 tests/check-qjson.c   |  5 +++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 5a840dfd86..53e91cb16b 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -208,11 +208,13 @@ static QString *parse_string(JSONParserContext *ctxt, JSONToken *token)
             }
             break;
         case '%':
-            if (ctxt->ap && ptr[1] != '%') {
-                parse_error(ctxt, token, "can't interpolate into string");
-                goto out;
+            if (ctxt->ap) {
+                if (ptr[1] != '%') {
+                    parse_error(ctxt, token, "can't interpolate into string");
+                    goto out;
+                }
+                ptr++;
             }
-            ptr++;
             /* fall through */
         default:
             cp = mod_utf8_codepoint(ptr, 6, &end);
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index d876a7a96e..fa2afccb0a 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -175,6 +175,11 @@ static void utf8_string(void)
             "\xCE\xBA\xE1\xBD\xB9\xCF\x83\xCE\xBC\xCE\xB5",
             "\xCE\xBA\xE1\xBD\xB9\xCF\x83\xCE\xBC\xCE\xB5",
             "\\u03BA\\u1F79\\u03C3\\u03BC\\u03B5",
+        },
+            /* '%' character when not interpolating */
+        {
+            "100%",
+            "100%",
         },
         /* 2  Boundary condition test cases */
         /* 2.1  First possible sequence of a certain length */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (18 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 21/36] configure: improve usbfs check Michael Roth
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P . Berrangé, qemu-stable

Commit 3ebee3b191e defined assert() as g_assert(), but when we build
the VSS DLL component of QGA (to handle fsfreeze) we do not include
glib, which results in breakage when building with VSS support enabled.

Fix this by including glib (along with the -lintl and -lws2_32
dependencies it brings).

Since the VSS DLL is built statically, this introduces an additional
dependency on static glib and supporting libs for the mingw environment
(possibly why we didn't include glib originally), but VSS support
already has very specific prerequisites so it shouldn't affect too many
build environments.

Since the VSS DLL code does use qemu/osdep.h, this should also help
avoid future breakages and possibly allow for some clean ups in current
VSS code.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 82a58d270c6fbbe2f2381224946340fd3814a273)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/vss-win32/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/vss-win32/Makefile.objs b/qga/vss-win32/Makefile.objs
index 23d08da225..dad9d1b0ba 100644
--- a/qga/vss-win32/Makefile.objs
+++ b/qga/vss-win32/Makefile.objs
@@ -5,7 +5,7 @@ qga-vss-dll-obj-y += requester.o provider.o install.o
 obj-qga-vss-dll-obj-y = $(addprefix $(obj)/, $(qga-vss-dll-obj-y))
 $(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -fstack-protector-all -fstack-protector-strong, $(QEMU_CFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor
 
-$(obj)/qga-vss.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 -lshlwapi -luuid -static
+$(obj)/qga-vss.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lglib-2.0 -lole32 -loleaut32 -lshlwapi -luuid -lintl -lws2_32 -static
 $(obj)/qga-vss.dll: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def
 	$(call quiet-command,$(CXX) -o $@ $(qga-vss-dll-obj-y) $(SRC_PATH)/qga/vss-win32/qga-vss.def $(CXXFLAGS) $(LDFLAGS),"LINK","$(TARGET_DIR)$@")
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 21/36] configure: improve usbfs check
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (19 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 22/36] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider Michael Roth
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Thomas Petazzoni, Laurent Vivier

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

The current check to test if usbfs support should be compiled or not
solely relies on the presence of <linux/usbdevice_fs.h>, without
actually checking that all definition used by Qemu are provided by
this header file.

With sufficiently old kernel headers, <linux/usbdevice_fs.h> may be
present, but some of the definitions needed by Qemu may not be
available.

This commit improves the check by building a small program that
actually tests whether the necessary definitions are available.

In addition, it fixes a bug where have_usbfs was set to "yes"
regardless of the result of the test.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190213211827.20300-1-thomas.petazzoni@bootlin.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
(cherry picked from commit 96566d09aa105ee04cbc1c9539cf8a9a40e8e422)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 0a3c6a72c3..85263e6b76 100755
--- a/configure
+++ b/configure
@@ -4203,10 +4203,25 @@ fi
 # check for usbfs
 have_usbfs=no
 if test "$linux_user" = "yes"; then
-  if check_include linux/usbdevice_fs.h; then
+  cat > $TMPC << EOF
+#include <linux/usbdevice_fs.h>
+
+#ifndef USBDEVFS_GET_CAPABILITIES
+#error "USBDEVFS_GET_CAPABILITIES undefined"
+#endif
+
+#ifndef USBDEVFS_DISCONNECT_CLAIM
+#error "USBDEVFS_DISCONNECT_CLAIM undefined"
+#endif
+
+int main(void)
+{
+    return 0;
+}
+EOF
+  if compile_prog "" ""; then
     have_usbfs=yes
   fi
-  have_usbfs=yes
 fi
 
 # check for fallocate
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 22/36] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (20 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 21/36] configure: improve usbfs check Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 23/36] mac_newworld: " Michael Roth
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland, qemu-stable, David Gibson

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

When using -drive to configure the hd drive for the Old World machine, the node
name "disk" should be used instead of the "hd" alias.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20190307212058.4890-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit 484d366e02732c8de6f92e53e2ee9bb93dd4ca23)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/ppc/mac_oldworld.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 9891c325a9..a8c8ec77bc 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -404,11 +404,11 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
             return g_strdup("cdrom");
         }
 
-        return g_strdup("hd");
+        return g_strdup("disk");
     }
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
-        return g_strdup("hd");
+        return g_strdup("disk");
     }
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-cd")) {
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 23/36] mac_newworld: use node name instead of alias name for hd device in FWPathProvider
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (21 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 22/36] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 24/36] qga: update docs with systemd suspend support info Michael Roth
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland, qemu-stable, David Gibson

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

When using -drive to configure the hd drive for the New World machine, the node
name "disk" should be used instead of the "hd" alias.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20190307212058.4890-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit 31bc6fa7fa8124ff8fb08373f9402985c806919f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/ppc/mac_newworld.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 14273a123e..cc7626ce6a 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -553,11 +553,11 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
             return g_strdup("cdrom");
         }
 
-        return g_strdup("hd");
+        return g_strdup("disk");
     }
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
-        return g_strdup("hd");
+        return g_strdup("disk");
     }
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-cd")) {
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 24/36] qga: update docs with systemd suspend support info
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (22 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 23/36] mac_newworld: " Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC Michael Roth
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel Henrique Barboza, qemu-stable

From: Daniel Henrique Barboza <danielhb413@gmail.com>

Commit 067927d62e ("qga: systemd hibernate/suspend/hybrid-sleep
support") failed to update qapi-schema.json after adding systemd
hibernate/suspend/hybrid-sleep capabilities to guest-suspend-* QGA
commands.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit bb6c8d407e49d7b805ac52fe46abf4d8d5262046)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/qapi-schema.json | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index c6725b3ec8..61f66fc461 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -532,12 +532,12 @@
 #
 # Suspend guest to disk.
 #
-# This command tries to execute the scripts provided by the pm-utils package.
-# If it's not available, the suspend operation will be performed by manually
-# writing to a sysfs file.
+# This command attempts to suspend the guest using three strategies, in this
+# order:
 #
-# For the best results it's strongly recommended to have the pm-utils
-# package installed in the guest.
+# - systemd hibernate
+# - pm-utils (via pm-hibernate)
+# - manual write into sysfs
 #
 # This command does NOT return a response on success. There is a high chance
 # the command succeeded if the VM exits with a zero exit status or, when
@@ -560,12 +560,12 @@
 #
 # Suspend guest to ram.
 #
-# This command tries to execute the scripts provided by the pm-utils package.
-# If it's not available, the suspend operation will be performed by manually
-# writing to a sysfs file.
+# This command attempts to suspend the guest using three strategies, in this
+# order:
 #
-# For the best results it's strongly recommended to have the pm-utils
-# package installed in the guest.
+# - systemd suspend
+# - pm-utils (via pm-suspend)
+# - manual write into sysfs
 #
 # IMPORTANT: guest-suspend-ram requires QEMU to support the 'system_wakeup'
 # command.  Thus, it's *required* to query QEMU for the presence of the
@@ -592,7 +592,10 @@
 #
 # Save guest state to disk and suspend to ram.
 #
-# This command requires the pm-utils package to be installed in the guest.
+# This command attempts to suspend the guest by executing, in this order:
+#
+# - systemd hybrid-sleep
+# - pm-utils (via pm-suspend-hybrid)
 #
 # IMPORTANT: guest-suspend-hybrid requires QEMU to support the 'system_wakeup'
 # command.  Thus, it's *required* to query QEMU for the presence of the
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC.
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (23 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 24/36] qga: update docs with systemd suspend support info Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 26/36] qemu-img: fix error reporting for -object Michael Roth
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Bandan Das, Prasad J Pandit, qemu-stable, Gerd Hoffmann

From: Gerd Hoffmann <kraxel@redhat.com>

Open files and directories with O_NOFOLLOW to avoid symlinks attacks.
While being at it also add O_CLOEXEC.

usb-mtp only handles regular files and directories and ignores
everything else, so users should not see a difference.

Because qemu ignores symlinks, carrying out a successful symlink attack
requires swapping an existing file or directory below rootdir for a
symlink and winning the race against the inotify notification to qemu.

Fixes: CVE-2018-16872
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: Bandan Das <bsd@redhat.com>
Reported-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Message-id: 20181213122511.13853-1-kraxel@redhat.com
(cherry picked from commit bab9df35ce73d1c8e19a37e2737717ea1c984dc1)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/usb/dev-mtp.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 100b7171f4..36c43b8c20 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -653,13 +653,18 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObject *o)
 {
     struct dirent *entry;
     DIR *dir;
+    int fd;
 
     if (o->have_children) {
         return;
     }
     o->have_children = true;
 
-    dir = opendir(o->path);
+    fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
+    if (fd < 0) {
+        return;
+    }
+    dir = fdopendir(fd);
     if (!dir) {
         return;
     }
@@ -1007,7 +1012,7 @@ static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c,
 
     trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path);
 
-    d->fd = open(o->path, O_RDONLY);
+    d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
     if (d->fd == -1) {
         usb_mtp_data_free(d);
         return NULL;
@@ -1031,7 +1036,7 @@ static MTPData *usb_mtp_get_partial_object(MTPState *s, MTPControl *c,
                                         c->argv[1], c->argv[2]);
 
     d = usb_mtp_data_alloc(c);
-    d->fd = open(o->path, O_RDONLY);
+    d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
     if (d->fd == -1) {
         usb_mtp_data_free(d);
         return NULL;
@@ -1658,7 +1663,7 @@ static void usb_mtp_write_data(MTPState *s)
                                  0, 0, 0, 0);
             goto done;
         }
-        d->fd = open(path, O_CREAT | O_WRONLY, mask);
+        d->fd = open(path, O_CREAT | O_WRONLY | O_CLOEXEC | O_NOFOLLOW, mask);
         if (d->fd == -1) {
             usb_mtp_queue_result(s, RES_STORE_FULL, d->trans,
                                  0, 0, 0, 0);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 26/36] qemu-img: fix error reporting for -object
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (24 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation Michael Roth
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Daniel P. Berrangé, qemu-stable

From: Daniel P. Berrangé <berrange@redhat.com>

Error reporting for user_creatable_add_opts_foreach was changed so that
it no longer called 'error_report_err' in:

  commit 7e1e0c11127bde81cff260fc6859690435c509d6
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   Wed Oct 17 10:26:43 2018 +0200

    qom: Clean up error reporting in user_creatable_add_opts_foreach()

Some callers were updated to pass in "&error_fatal" but all the ones in
qemu-img were left passing NULL. As a result all errors went to
/dev/null instead of being reported to the user.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 334c43e2c342e878311c66b4e62343f0a7c2c6be)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qemu-img.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index ad04f59565..8b4a371ed5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -503,7 +503,7 @@ static int img_create(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         goto fail;
     }
 
@@ -753,7 +753,7 @@ static int img_check(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -966,7 +966,7 @@ static int img_commit(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -1349,7 +1349,7 @@ static int img_compare(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         ret = 2;
         goto out4;
     }
@@ -2159,7 +2159,7 @@ static int img_convert(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         goto fail_getopt;
     }
 
@@ -2713,7 +2713,7 @@ static int img_info(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -2932,7 +2932,7 @@ static int img_map(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -3081,7 +3081,7 @@ static int img_snapshot(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -3241,7 +3241,7 @@ static int img_rebase(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -3621,7 +3621,7 @@ static int img_resize(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         return 1;
     }
 
@@ -3865,7 +3865,7 @@ static int img_amend(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         ret = -1;
         goto out_no_progress;
     }
@@ -4509,7 +4509,7 @@ static int img_dd(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         ret = -1;
         goto out;
     }
@@ -4786,7 +4786,7 @@ static int img_measure(int argc, char **argv)
 
     if (qemu_opts_foreach(&qemu_object_opts,
                           user_creatable_add_opts_foreach,
-                          NULL, NULL)) {
+                          NULL, &error_fatal)) {
         goto out;
     }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (25 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 26/36] qemu-img: fix error reporting for -object Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 28/36] cutils: Fix size_to_str() on 32-bit platforms Michael Roth
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable

From: Kevin Wolf <kwolf@redhat.com>

Limiting the allocation to INT_MAX bytes isn't particularly clever
because it means that the final cluster will be a partial cluster which
will be completed through a COW operation. This results in unnecessary
data read and write requests which lead to an unwanted non-sparse
filesystem block for metadata preallocation.

Align the maximum allocation size down to the cluster size to avoid this
situation.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit f29fbf7c6b1c9a84f6931c1c222716fbe073e6e4)
*modified to avoid functional dependency on 93e32b3e
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 991d6ac91b..6ddaf9a1f8 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2590,6 +2590,7 @@ static int qcow2_set_up_encryption(BlockDriverState *bs,
 static int coroutine_fn preallocate_co(BlockDriverState *bs, uint64_t offset,
                                        uint64_t new_length)
 {
+    BDRVQcow2State *s = bs->opaque;
     uint64_t bytes;
     uint64_t host_offset = 0;
     unsigned int cur_bytes;
@@ -2600,7 +2601,7 @@ static int coroutine_fn preallocate_co(BlockDriverState *bs, uint64_t offset,
     bytes = new_length - offset;
 
     while (bytes) {
-        cur_bytes = MIN(bytes, INT_MAX);
+        cur_bytes = MIN(bytes, QEMU_ALIGN_DOWN(INT_MAX, s->cluster_size));
         ret = qcow2_alloc_cluster_offset(bs, offset, &cur_bytes,
                                          &host_offset, &meta);
         if (ret < 0) {
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 28/36] cutils: Fix size_to_str() on 32-bit platforms
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (26 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL Michael Roth
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable

From: Eric Blake <eblake@redhat.com>

When extracting a human-readable size formatter, we changed 'uint64_t
div' pre-patch to 'unsigned long div' post-patch. Which breaks on
32-bit platforms, resulting in 'inf' instead of intended values larger
than 999GB.

Fixes: 22951aaa
CC: qemu-stable@nongnu.org
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 754da86714d550c3f995f11a2587395081362e0a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 util/cutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cutils.c b/util/cutils.c
index 698bd315bd..e8c726a141 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -754,7 +754,7 @@ const char *qemu_ether_ntoa(const MACAddr *mac)
 char *size_to_str(uint64_t val)
 {
     static const char *suffixes[] = { "", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei" };
-    unsigned long div;
+    uint64_t div;
     int i;
 
     /*
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (27 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 28/36] cutils: Fix size_to_str() on 32-bit platforms Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 30/36] do not call vhost_net_cleanup() on running net from char user event Michael Roth
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable

From: Kevin Wolf <kwolf@redhat.com>

Even for block nodes with bs->drv == NULL, we can't just ignore a
bdrv_set_aio_context() call. Leaving the node in its old context can
mean that it's still in an iothread context in bdrv_close_all() during
shutdown, resulting in an attempted unlock of the AioContext lock which
we don't hold.

This is an example stack trace of a related crash:

 #0  0x00007ffff59da57f in raise () at /lib64/libc.so.6
 #1  0x00007ffff59c4895 in abort () at /lib64/libc.so.6
 #2  0x0000555555b97b1e in error_exit (err=<optimized out>, msg=msg@entry=0x555555d386d0 <__func__.19059> "qemu_mutex_unlock_impl") at util/qemu-thread-posix.c:36
 #3  0x0000555555b97f7f in qemu_mutex_unlock_impl (mutex=mutex@entry=0x5555568002f0, file=file@entry=0x555555d378df "util/async.c", line=line@entry=507) at util/qemu-thread-posix.c:97
 #4  0x0000555555b92f55 in aio_context_release (ctx=ctx@entry=0x555556800290) at util/async.c:507
 #5  0x0000555555b05cf8 in bdrv_prwv_co (child=child@entry=0x7fffc80012f0, offset=offset@entry=131072, qiov=qiov@entry=0x7fffffffd4f0, is_write=is_write@entry=true, flags=flags@entry=0)
         at block/io.c:833
 #6  0x0000555555b060a9 in bdrv_pwritev (qiov=0x7fffffffd4f0, offset=131072, child=0x7fffc80012f0) at block/io.c:990
 #7  0x0000555555b060a9 in bdrv_pwrite (child=0x7fffc80012f0, offset=131072, buf=<optimized out>, bytes=<optimized out>) at block/io.c:990
 #8  0x0000555555ae172b in qcow2_cache_entry_flush (bs=bs@entry=0x555556810680, c=c@entry=0x5555568cc740, i=i@entry=0) at block/qcow2-cache.c:51
 #9  0x0000555555ae18dd in qcow2_cache_write (bs=bs@entry=0x555556810680, c=0x5555568cc740) at block/qcow2-cache.c:248
 #10 0x0000555555ae15de in qcow2_cache_flush (bs=0x555556810680, c=<optimized out>) at block/qcow2-cache.c:259
 #11 0x0000555555ae16b1 in qcow2_cache_flush_dependency (c=0x5555568a1700, c=0x5555568a1700, bs=0x555556810680) at block/qcow2-cache.c:194
 #12 0x0000555555ae16b1 in qcow2_cache_entry_flush (bs=bs@entry=0x555556810680, c=c@entry=0x5555568a1700, i=i@entry=0) at block/qcow2-cache.c:194
 #13 0x0000555555ae18dd in qcow2_cache_write (bs=bs@entry=0x555556810680, c=0x5555568a1700) at block/qcow2-cache.c:248
 #14 0x0000555555ae15de in qcow2_cache_flush (bs=bs@entry=0x555556810680, c=<optimized out>) at block/qcow2-cache.c:259
 #15 0x0000555555ad242c in qcow2_inactivate (bs=bs@entry=0x555556810680) at block/qcow2.c:2124
 #16 0x0000555555ad2590 in qcow2_close (bs=0x555556810680) at block/qcow2.c:2153
 #17 0x0000555555ab0c62 in bdrv_close (bs=0x555556810680) at block.c:3358
 #18 0x0000555555ab0c62 in bdrv_delete (bs=0x555556810680) at block.c:3542
 #19 0x0000555555ab0c62 in bdrv_unref (bs=0x555556810680) at block.c:4598
 #20 0x0000555555af4d72 in blk_remove_bs (blk=blk@entry=0x5555568103d0) at block/block-backend.c:785
 #21 0x0000555555af4dbb in blk_remove_all_bs () at block/block-backend.c:483
 #22 0x0000555555aae02f in bdrv_close_all () at block.c:3412
 #23 0x00005555557f9796 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4776

The reproducer I used is a qcow2 image on gluster volume, where the
virtual disk size (4 GB) is larger than the gluster volume size (64M),
so we can easily trigger an ENOSPC. This backend is assigned to a
virtio-blk device using an iothread, and then from the guest a
'dd if=/dev/zero of=/dev/vda bs=1G count=1' causes the VM to stop
because of an I/O error. qemu_gluster_co_flush_to_disk() sets
bs->drv = NULL on error, so when virtio-blk stops the dataplane, the
block nodes stay in the iothread AioContext. A 'quit' monitor command
issued from this paused state crashes the process.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1631227
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
(cherry picked from commit 1bffe1ae7a7b707c3a14ea2ccd00d3609d3ce4d8)
*drop context dependency on e64f25f30b8
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/block.c b/block.c
index 1ec4512d1e..3405a652a3 100644
--- a/block.c
+++ b/block.c
@@ -5056,10 +5056,6 @@ void bdrv_detach_aio_context(BlockDriverState *bs)
     BdrvAioNotifier *baf, *baf_tmp;
     BdrvChild *child;
 
-    if (!bs->drv) {
-        return;
-    }
-
     assert(!bs->walking_aio_notifiers);
     bs->walking_aio_notifiers = true;
     QLIST_FOREACH_SAFE(baf, &bs->aio_notifiers, list, baf_tmp) {
@@ -5074,7 +5070,7 @@ void bdrv_detach_aio_context(BlockDriverState *bs)
      */
     bs->walking_aio_notifiers = false;
 
-    if (bs->drv->bdrv_detach_aio_context) {
+    if (bs->drv && bs->drv->bdrv_detach_aio_context) {
         bs->drv->bdrv_detach_aio_context(bs);
     }
     QLIST_FOREACH(child, &bs->children, next) {
@@ -5090,16 +5086,12 @@ void bdrv_attach_aio_context(BlockDriverState *bs,
     BdrvAioNotifier *ban, *ban_tmp;
     BdrvChild *child;
 
-    if (!bs->drv) {
-        return;
-    }
-
     bs->aio_context = new_context;
 
     QLIST_FOREACH(child, &bs->children, next) {
         bdrv_attach_aio_context(child->bs, new_context);
     }
-    if (bs->drv->bdrv_attach_aio_context) {
+    if (bs->drv && bs->drv->bdrv_attach_aio_context) {
         bs->drv->bdrv_attach_aio_context(bs, new_context);
     }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 30/36] do not call vhost_net_cleanup() on running net from char user event
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (28 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 31/36] s390x/cpumodel: ignore csske for expansion Michael Roth
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dan Streetman, qemu-stable, Michael S . Tsirkin

From: Dan Streetman <ddstreet@canonical.com>

Buglink: https://launchpad.net/bugs/1823458

Currently, a user CHR_EVENT_CLOSED event will cause net_vhost_user_event()
to call vhost_user_cleanup(), which calls vhost_net_cleanup() for all
its queues.  However, vhost_net_cleanup() must never be called like
this for fully-initialized nets; when other code later calls
vhost_net_stop() - such as from virtio_net_vhost_status() - it will try
to access the already-cleaned-up fields and fail with assertion errors
or segfaults.

The vhost_net_cleanup() will eventually be called from
qemu_cleanup_net_client().

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Message-Id: <20190416184624.15397-3-dan.streetman@canonical.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 6ab79a20af3a7b3bf610ba9aebb446a9f0b05930)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 net/vhost-user.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/vhost-user.c b/net/vhost-user.c
index a39f9c9974..afb5697acf 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -223,7 +223,6 @@ static void chr_closed_bh(void *opaque)
     s = DO_UPCAST(NetVhostUserState, nc, ncs[0]);
 
     qmp_set_link(name, false, &err);
-    vhost_user_stop(queues, ncs);
 
     qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, net_vhost_user_event,
                              NULL, opaque, NULL, true);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 31/36] s390x/cpumodel: ignore csske for expansion
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (29 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 30/36] do not call vhost_net_cleanup() on running net from char user event Michael Roth
@ 2019-07-23 17:00 ` Michael Roth
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 32/36] megasas: fix mapped frame size Michael Roth
                   ` (8 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Christian Borntraeger, Cornelia Huck, qemu-stable

From: Christian Borntraeger <borntraeger@de.ibm.com>

csske will be removed in a future machine. Ignore it for expanding the
cpu model. Otherwise qemu falls back to z9.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190429090250.7648-3-borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit eaf6f642abf1d4d24791b70728d4068428fc4658)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 target/s390x/cpu_models.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 7c253ff308..d4464a2ea6 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -1297,6 +1297,8 @@ static void init_ignored_base_feat(void)
          S390_FEAT_KM_TDEA_192,
          S390_FEAT_KIMD_SHA_1,
          S390_FEAT_KLMD_SHA_1,
+         /* CSSKE is deprecated on newer generations */
+         S390_FEAT_CONDITIONAL_SSKE,
     };
     int i;
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 32/36] megasas: fix mapped frame size
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (30 preceding siblings ...)
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 31/36] s390x/cpumodel: ignore csske for expansion Michael Roth
@ 2019-07-23 17:01 ` Michael Roth
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 33/36] iotests: Filter second BLOCK_JOB_ERROR from 229 Michael Roth
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Peter Lieven, qemu-stable

From: Peter Lieven <pl@kamp.de>

the current value of 1024 bytes (16 * MFI_FRAME_SIZE) we map is not enough to hold
the maximum number of scatter gather elements we advertise. We actually need a
maximum of 2048 bytes. This is 128 max sg elements * 16 bytes (sizeof (union mfi_sgl)).

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
Message-Id: <20190404121015.28634-1-pl@kamp.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 2e56fbc87f6ec3cd56c37b01d313abd502b80d61)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/scsi/megasas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index a56317e026..5ad762de23 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -477,7 +477,7 @@ static MegasasCmd *megasas_enqueue_frame(MegasasState *s,
 {
     PCIDevice *pcid = PCI_DEVICE(s);
     MegasasCmd *cmd = NULL;
-    int frame_size = MFI_FRAME_SIZE * 16;
+    int frame_size = MEGASAS_MAX_SGE * sizeof(union mfi_sgl);
     hwaddr frame_size_p = frame_size;
     unsigned long index;
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 33/36] iotests: Filter second BLOCK_JOB_ERROR from 229
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (31 preceding siblings ...)
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 32/36] megasas: fix mapped frame size Michael Roth
@ 2019-07-23 17:01 ` Michael Roth
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 34/36] block/file-posix: Unaligned O_DIRECT block-status Michael Roth
                   ` (6 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable, Max Reitz

From: Max Reitz <mreitz@redhat.com>

Without this filter, this test sometimes fails.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit fff2388d5d9caecca6200455d0ab6d5e13f4e9bd)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/qemu-iotests/229     | 6 +++++-
 tests/qemu-iotests/229.out | 1 -
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotests/229
index 86602437ff..8ce0cd2939 100755
--- a/tests/qemu-iotests/229
+++ b/tests/qemu-iotests/229
@@ -82,11 +82,15 @@ echo
 echo '=== Force cancel job paused in error state  ==='
 echo
 
+# Filter out BLOCK_JOB_ERROR events because they may or may not occur.
+# Cancelling the job means resuming it for a bit before it is actually
+# aborted, and in that time it may or may not re-encounter the error.
 success_or_failure="y" _send_qemu_cmd $QEMU_HANDLE \
     "{'execute': 'block-job-cancel',
                  'arguments': { 'device': 'testdisk',
                                 'force': true}}" \
-     "BLOCK_JOB_CANCELLED" "Assertion"
+     "BLOCK_JOB_CANCELLED" "Assertion" \
+    | grep -v '"BLOCK_JOB_ERROR"'
 
 # success, all done
 echo "*** done"
diff --git a/tests/qemu-iotests/229.out b/tests/qemu-iotests/229.out
index 4c4112805f..a3eb33788a 100644
--- a/tests/qemu-iotests/229.out
+++ b/tests/qemu-iotests/229.out
@@ -17,7 +17,6 @@ wrote 2097152/2097152 bytes at offset 0
 
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_ERROR", "data": {"device": "testdisk", "operation": "write", "action": "stop"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "testdisk"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "testdisk", "len": 2097152, "offset": 1048576, "speed": 0, "type": "mirror"}}
 *** done
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 34/36] block/file-posix: Unaligned O_DIRECT block-status
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (32 preceding siblings ...)
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 33/36] iotests: Filter second BLOCK_JOB_ERROR from 229 Michael Roth
@ 2019-07-23 17:01 ` Michael Roth
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 35/36] iotests: Test unaligned raw images with O_DIRECT Michael Roth
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable, Max Reitz

From: Max Reitz <mreitz@redhat.com>

Currently, qemu crashes whenever someone queries the block status of an
unaligned image tail of an O_DIRECT image:
$ echo > foo
$ qemu-img map --image-opts driver=file,filename=foo,cache.direct=on
Offset          Length          Mapped to       File
qemu-img: block/io.c:2093: bdrv_co_block_status: Assertion `*pnum &&
QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset'
failed.

This is because bdrv_co_block_status() checks that the result returned
by the driver's implementation is aligned to the request_alignment, but
file-posix can fail to do so, which is actually mentioned in a comment
there: "[...] possibly including a partial sector at EOF".

Fix this by rounding up those partial sectors.

There are two possible alternative fixes:
(1) We could refuse to open unaligned image files with O_DIRECT
    altogether.  That sounds reasonable until you realize that qcow2
    does necessarily not fill up its metadata clusters, and that nobody
    runs qemu-img create with O_DIRECT.  Therefore, unpreallocated qcow2
    files usually have an unaligned image tail.

(2) bdrv_co_block_status() could ignore unaligned tails.  It actually
    throws away everything past the EOF already, so that sounds
    reasonable.
    Unfortunately, the block layer knows file lengths only with a
    granularity of BDRV_SECTOR_SIZE, so bdrv_co_block_status() usually
    would have to guess whether its file length information is inexact
    or whether the driver is broken.

Fixing what raw_co_block_status() returns is the safest thing to do.

There seems to be no other block driver that sets request_alignment and
does not make sure that it always returns aligned values.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 9c3db310ff0b7473272ae8dce5e04e2f8a825390)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/file-posix.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/block/file-posix.c b/block/file-posix.c
index 07bbdab953..df467f510b 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2461,6 +2461,8 @@ static int coroutine_fn raw_co_block_status(BlockDriverState *bs,
     off_t data = 0, hole = 0;
     int ret;
 
+    assert(QEMU_IS_ALIGNED(offset | bytes, bs->bl.request_alignment));
+
     ret = fd_open(bs);
     if (ret < 0) {
         return ret;
@@ -2486,6 +2488,20 @@ static int coroutine_fn raw_co_block_status(BlockDriverState *bs,
         /* On a data extent, compute bytes to the end of the extent,
          * possibly including a partial sector at EOF. */
         *pnum = MIN(bytes, hole - offset);
+
+        /*
+         * We are not allowed to return partial sectors, though, so
+         * round up if necessary.
+         */
+        if (!QEMU_IS_ALIGNED(*pnum, bs->bl.request_alignment)) {
+            int64_t file_length = raw_getlength(bs);
+            if (file_length > 0) {
+                /* Ignore errors, this is just a safeguard */
+                assert(hole == file_length);
+            }
+            *pnum = ROUND_UP(*pnum, bs->bl.request_alignment);
+        }
+
         ret = BDRV_BLOCK_DATA;
     } else {
         /* On a hole, compute bytes to the beginning of the next extent.  */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 35/36] iotests: Test unaligned raw images with O_DIRECT
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (33 preceding siblings ...)
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 34/36] block/file-posix: Unaligned O_DIRECT block-status Michael Roth
@ 2019-07-23 17:01 ` Michael Roth
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 36/36] vhost: fix vhost_log size overflow during migration Michael Roth
                   ` (4 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-stable, Max Reitz

From: Max Reitz <mreitz@redhat.com>

We already have 221 for accesses through the page cache, but it is
better to create a new file for O_DIRECT instead of integrating those
test cases into 221.  This way, we can make use of
_supported_cache_modes (and _default_cache_mode) so the test is
automatically skipped on filesystems that do not support O_DIRECT.

As part of the split, add _supported_cache_modes to 221.  With that, it
no longer fails when run with -c none or -c directsync.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 2fab30c80b33cdc6157c7efe6207e54b6835cf92)
*remove context dependencies on iotests not in 3.1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 tests/qemu-iotests/221     |  4 ++
 tests/qemu-iotests/253     | 84 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/253.out | 14 +++++++
 tests/qemu-iotests/group   |  1 +
 4 files changed, 103 insertions(+)
 create mode 100755 tests/qemu-iotests/253
 create mode 100644 tests/qemu-iotests/253.out

diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221
index 06f48f1f23..66d7546e35 100755
--- a/tests/qemu-iotests/221
+++ b/tests/qemu-iotests/221
@@ -1,6 +1,7 @@
 #!/bin/bash
 #
 # Test qemu-img vs. unaligned images
+# (See also 253, which is the O_DIRECT version)
 #
 # Copyright (C) 2018 Red Hat, Inc.
 #
@@ -37,6 +38,9 @@ _supported_fmt raw
 _supported_proto file
 _supported_os Linux
 
+_default_cache_mode writeback
+_supported_cache_modes writeback writethrough unsafe
+
 echo
 echo "=== Check mapping of unaligned raw image ==="
 echo
diff --git a/tests/qemu-iotests/253 b/tests/qemu-iotests/253
new file mode 100755
index 0000000000..d88d5afa45
--- /dev/null
+++ b/tests/qemu-iotests/253
@@ -0,0 +1,84 @@
+#!/usr/bin/env bash
+#
+# Test qemu-img vs. unaligned images; O_DIRECT version
+# (Originates from 221)
+#
+# Copyright (C) 2019 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+seq="$(basename $0)"
+echo "QA output created by $seq"
+
+status=1 # failure is the default!
+
+_cleanup()
+{
+    _cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt raw
+_supported_proto file
+_supported_os Linux
+
+_default_cache_mode none
+_supported_cache_modes none directsync
+
+echo
+echo "=== Check mapping of unaligned raw image ==="
+echo
+
+# We do not know how large a physical sector is, but it is certainly
+# going to be a factor of 1 MB
+size=$((1 * 1024 * 1024 - 1))
+
+# qemu-img create rounds size up to BDRV_SECTOR_SIZE
+_make_test_img $size
+$QEMU_IMG map --output=json --image-opts \
+    "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \
+    | _filter_qemu_img_map
+
+# so we resize it and check again
+truncate --size=$size "$TEST_IMG"
+$QEMU_IMG map --output=json --image-opts \
+    "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \
+    | _filter_qemu_img_map
+
+# qemu-io with O_DIRECT always writes whole physical sectors.  Again,
+# we do not know how large a physical sector is, so we just start
+# writing from a 64 kB boundary, which should always be aligned.
+offset=$((1 * 1024 * 1024 - 64 * 1024))
+$QEMU_IO -c "w $offset $((size - offset))" "$TEST_IMG" | _filter_qemu_io
+$QEMU_IMG map --output=json --image-opts \
+    "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \
+    | _filter_qemu_img_map
+
+# Resize it and check again -- contrary to 221, we may not get partial
+# sectors here, so there should be only two areas (one zero, one
+# data).
+truncate --size=$size "$TEST_IMG"
+$QEMU_IMG map --output=json --image-opts \
+    "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \
+    | _filter_qemu_img_map
+
+# success, all done
+echo '*** done'
+rm -f $seq.full
+status=0
diff --git a/tests/qemu-iotests/253.out b/tests/qemu-iotests/253.out
new file mode 100644
index 0000000000..607c0baa0b
--- /dev/null
+++ b/tests/qemu-iotests/253.out
@@ -0,0 +1,14 @@
+QA output created by 253
+
+=== Check mapping of unaligned raw image ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048575
+[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
+wrote 65535/65535 bytes at offset 983040
+63.999 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+{ "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
+[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
+{ "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
+*** done
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 61a6d98ebd..c90889fac2 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -233,3 +233,4 @@
 233 auto quick
 234 auto quick migration
 235 auto quick
+253 rw auto quick
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Qemu-devel] [PATCH 36/36] vhost: fix vhost_log size overflow during migration
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (34 preceding siblings ...)
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 35/36] iotests: Test unaligned raw images with O_DIRECT Michael Roth
@ 2019-07-23 17:01 ` Michael Roth
  2019-07-23 17:12 ` [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Aleksandar Markovic
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 17:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Li Hangjing, qemu-stable, Michael S . Tsirkin

From: Li Hangjing <lihangjing@baidu.com>

When a guest which doesn't support multiqueue is migrated with a multi queues
vhost-user-blk deivce, a crash will occur like:

0 qemu_memfd_alloc (name=<value optimized out>, size=562949953421312, seals=<value optimized out>, fd=0x7f87171fe8b4, errp=0x7f87171fe8a8) at util/memfd.c:153
1 0x00007f883559d7cf in vhost_log_alloc (size=70368744177664, share=true) at hw/virtio/vhost.c:186
2 0x00007f88355a0758 in vhost_log_get (listener=0x7f8838bd7940, enable=1) at qemu-2-12/hw/virtio/vhost.c:211
3 vhost_dev_log_resize (listener=0x7f8838bd7940, enable=1) at hw/virtio/vhost.c:263
4 vhost_migration_log (listener=0x7f8838bd7940, enable=1) at hw/virtio/vhost.c:787
5 0x00007f88355463d6 in memory_global_dirty_log_start () at memory.c:2503
6 0x00007f8835550577 in ram_init_bitmaps (f=0x7f88384ce600, opaque=0x7f8836024098) at migration/ram.c:2173
7 ram_init_all (f=0x7f88384ce600, opaque=0x7f8836024098) at migration/ram.c:2192
8 ram_save_setup (f=0x7f88384ce600, opaque=0x7f8836024098) at migration/ram.c:2219
9 0x00007f88357a419d in qemu_savevm_state_setup (f=0x7f88384ce600) at migration/savevm.c:1002
10 0x00007f883579fc3e in migration_thread (opaque=0x7f8837530400) at migration/migration.c:2382
11 0x00007f8832447893 in start_thread () from /lib64/libpthread.so.0
12 0x00007f8832178bfd in clone () from /lib64/libc.so.6

This is because vhost_get_log_size() returns a overflowed vhost-log size.
In this function, it uses the uninitialized variable vqs->used_phys and
vqs->used_size to get the vhost-log size.

Signed-off-by: Li Hangjing <lihangjing@baidu.com>
Reviewed-by: Xie Yongji <xieyongji@baidu.com>
Reviewed-by: Chai Wen <chaiwen@baidu.com>
Message-Id: <20190603061524.24076-1-lihangjing@baidu.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 240e647a14df9677b3a501f7b8b870e40aac3fd5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/virtio/vhost.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 569c4053ea..be38b39242 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -131,6 +131,11 @@ static int vhost_sync_dirty_bitmap(struct vhost_dev *dev,
     }
     for (i = 0; i < dev->nvqs; ++i) {
         struct vhost_virtqueue *vq = dev->vqs + i;
+
+        if (!vq->used_phys && !vq->used_size) {
+            continue;
+        }
+
         vhost_dev_sync_region(dev, section, start_addr, end_addr, vq->used_phys,
                               range_get_last(vq->used_phys, vq->used_size));
     }
@@ -168,6 +173,11 @@ static uint64_t vhost_get_log_size(struct vhost_dev *dev)
     }
     for (i = 0; i < dev->nvqs; ++i) {
         struct vhost_virtqueue *vq = dev->vqs + i;
+
+        if (!vq->used_phys && !vq->used_size) {
+            continue;
+        }
+
         uint64_t last = vq->used_phys + vq->used_size - 1;
         log_size = MAX(log_size, last / VHOST_LOG_CHUNK + 1);
     }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (35 preceding siblings ...)
  2019-07-23 17:01 ` [Qemu-devel] [PATCH 36/36] vhost: fix vhost_log size overflow during migration Michael Roth
@ 2019-07-23 17:12 ` Aleksandar Markovic
  2019-07-23 18:52   ` Michael Roth
  2019-07-23 18:50 ` [Qemu-devel] [Qemu-stable] " Michael Roth
                   ` (2 subsequent siblings)
  39 siblings, 1 reply; 46+ messages in thread
From: Aleksandar Markovic @ 2019-07-23 17:12 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers, qemu-stable

On Tue, Jul 23, 2019 at 7:04 PM Michael Roth <mdroth@linux.vnet.ibm.com>
wrote:

> Hi everyone,
>
>
> The following new patches are queued for QEMU stable v3.1.1:
>
>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
>
>
Hello, Michael.

There is usually a breakdown by modified files within a cover letter.

Why is it not present here?

Sincerely,
Aleksandar



> The release is planned for 2019-08-01:
>
>   https://wiki.qemu.org/Planning/3.1
>
> Please respond here or CC qemu-stable@nongnu.org on any patches you
> think should be included in the release.
>
> Note that this update falls outside the normal stable release support
> window (~1 development cycle), but is being released now since it was
> delayed from its intended release date.
>
> Thanks!
>
>
>
>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (36 preceding siblings ...)
  2019-07-23 17:12 ` [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Aleksandar Markovic
@ 2019-07-23 18:50 ` Michael Roth
  2019-07-24 13:21   ` Philippe Mathieu-Daudé
  2019-08-02 17:54   ` Philippe Mathieu-Daudé
  2019-07-24 17:07 ` Cole Robinson
  2019-07-29 20:13 ` Bruce Rogers
  39 siblings, 2 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 18:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

Quoting Michael Roth (2019-07-23 12:00:28)
> Hi everyone,                                                                                              
> 
> The following new patches are queued for QEMU stable v3.1.1:
> 
>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
> 
> The release is planned for 2019-08-01:
> 
>   https://wiki.qemu.org/Planning/3.1
> 
> Please respond here or CC qemu-stable@nongnu.org on any patches you
> think should be included in the release.
> 
> Note that this update falls outside the normal stable release support
> window (~1 development cycle), but is being released now since it was
> delayed from its intended release date.
> 
> Thanks!
> 

Forgot to include the usual patch list:

----------------------------------------------------------------
BALATON Zoltan (1):
      i2c: Move typedef of bitbang_i2c_interface to i2c.h

Christian Borntraeger (2):
      iotests: make 235 work on s390 (and others)
      s390x/cpumodel: ignore csske for expansion

Christophe Fergeau (1):
      json: Fix % handling when not interpolating

Corey Minyard (1):
      pc:piix4: Update smbus I/O space after a migration

Cornelia Huck (1):
      vfio-ap: flag as compatible with balloon

Dan Streetman (1):
      do not call vhost_net_cleanup() on running net from char user event

Daniel Henrique Barboza (1):
      qga: update docs with systemd suspend support info

Daniel P. Berrangé (1):
      qemu-img: fix error reporting for -object

Eric Blake (1):
      cutils: Fix size_to_str() on 32-bit platforms

Gerd Hoffmann (1):
      usb-mtp: use O_NOFOLLOW and O_CLOEXEC.

Janosch Frank (1):
      s390x: Return specification exception for unimplemented diag 308 subcodes

Kevin Wolf (3):
      block: Fix invalidate_cache error path for parent activation
      qcow2: Avoid COW during metadata preallocation
      block: Fix AioContext switch for bs->drv == NULL

Li Hangjing (1):
      vhost: fix vhost_log size overflow during migration

Liam Merwick (1):
      tpm_tis: fix loop that cancels any seizure by a lower locality

Marcel Apfelbaum (1):
      hw/rdma: another clang compilation fix

Mark Cave-Ayland (2):
      mac_oldworld: use node name instead of alias name for hd device in FWPathProvider
      mac_newworld: use node name instead of alias name for hd device in FWPathProvider

Max Reitz (3):
      iotests: Filter second BLOCK_JOB_ERROR from 229
      block/file-posix: Unaligned O_DIRECT block-status
      iotests: Test unaligned raw images with O_DIRECT

Michael Roth (1):
      qga-win: include glib when building VSS DLL

Paolo Bonzini (1):
      i386: remove the 'INTEL_PT' CPUID bit from named CPU models

Paul A. Clarke (1):
      Changes requirement for "vsubsbs" instruction

Peter Lieven (1):
      megasas: fix mapped frame size

Peter Maydell (2):
      linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
      exec.c: Don't reallocate IOMMUNotifiers that are in use

Robert Hoo (1):
      i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model

Stefan Berger (2):
      tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid
      tpm: Make sure the locality received from backend is valid

Thomas Huth (1):
      hw/s390x: Fix bad mask in time2tod()

Thomas Petazzoni (1):
      configure: improve usbfs check

William Bowling (1):
      slirp: check sscanf result when emulating ident

Zheng Xiang (1):
      pcie: set link state inactive/active after hot unplug/plug

 block.c                            | 13 +++----------
 block/file-posix.c                 | 16 ++++++++++++++++
 block/qcow2.c                      |  3 ++-
 configure                          | 19 +++++++++++++++++--
 exec.c                             | 10 ++++++----
 hw/acpi/piix4.c                    |  1 +
 hw/i2c/bitbang_i2c.h               |  2 --
 hw/pci/pcie.c                      | 12 ++++++++++++
 hw/ppc/mac_newworld.c              |  4 ++--
 hw/ppc/mac_oldworld.c              |  4 ++--
 hw/rdma/rdma_rm_defs.h             |  4 ++--
 hw/scsi/megasas.c                  |  2 +-
 hw/tpm/tpm_tis.c                   |  8 ++++++--
 hw/usb/dev-mtp.c                   | 13 +++++++++----
 hw/vfio/ap.c                       |  8 ++++++++
 hw/virtio/vhost.c                  | 10 ++++++++++
 include/hw/i2c/i2c.h               |  2 ++
 include/hw/i2c/ppc4xx_i2c.h        |  3 ---
 include/hw/s390x/tod.h             |  2 +-
 linux-user/syscall.c               | 22 ++++++++++++++++++----
 net/vhost-user.c                   |  1 -
 qemu-img.c                         | 26 +++++++++++++-------------
 qga/qapi-schema.json               | 25 ++++++++++++++-----------
 qga/vss-win32/Makefile.objs        |  2 +-
 qobject/json-parser.c              | 10 ++++++----
 slirp/tcp_subr.c                   | 10 +++++-----
 target/i386/cpu.c                  | 11 ++++-------
 target/ppc/translate/vmx-ops.inc.c |  2 +-
 target/s390x/cpu_models.c          |  2 ++
 target/s390x/diag.c                |  2 +-
 tests/check-qjson.c                |  5 +++++
 tests/qemu-iotests/221             |  4 ++++
 tests/qemu-iotests/229             |  6 +++++-
 tests/qemu-iotests/229.out         |  1 -
 tests/qemu-iotests/235             |  4 +++-
 tests/qemu-iotests/253             | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/253.out         | 14 ++++++++++++++
 tests/qemu-iotests/group           |  1 +
 util/cutils.c                      |  2 +-
 39 files changed, 282 insertions(+), 88 deletions(-)
 create mode 100755 tests/qemu-iotests/253
 create mode 100644 tests/qemu-iotests/253.out



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 17:12 ` [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Aleksandar Markovic
@ 2019-07-23 18:52   ` Michael Roth
  0 siblings, 0 replies; 46+ messages in thread
From: Michael Roth @ 2019-07-23 18:52 UTC (permalink / raw)
  To: Aleksandar Markovic; +Cc: QEMU Developers, qemu-stable

Quoting Aleksandar Markovic (2019-07-23 12:12:27)
> On Tue, Jul 23, 2019 at 7:04 PM Michael Roth <mdroth@linux.vnet.ibm.com>
> wrote:
> 
> > Hi everyone,
> >
> >
> > The following new patches are queued for QEMU stable v3.1.1:
> >
> >   https://github.com/mdroth/qemu/commits/stable-3.1-staging
> >
> >
> Hello, Michael.
> 
> There is usually a breakdown by modified files within a cover letter.
> 
> Why is it not present here?

Sorry meant to include it before hitting send. I've just sent it as a reply.

> 
> Sincerely,
> Aleksandar
> 
> 
> 
> > The release is planned for 2019-08-01:
> >
> >   https://wiki.qemu.org/Planning/3.1
> >
> > Please respond here or CC qemu-stable@nongnu.org on any patches you
> > think should be included in the release.
> >
> > Note that this update falls outside the normal stable release support
> > window (~1 development cycle), but is being released now since it was
> > delayed from its intended release date.
> >
> > Thanks!
> >
> >
> >
> >
> 



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h
  2019-07-23 17:00 ` [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h Michael Roth
@ 2019-07-23 18:57   ` BALATON Zoltan
  2019-07-23 19:01     ` Thomas Huth
  0 siblings, 1 reply; 46+ messages in thread
From: BALATON Zoltan @ 2019-07-23 18:57 UTC (permalink / raw)
  To: Michael Roth; +Cc: Thomas Huth, qemu-devel, qemu-stable

On Tue, 23 Jul 2019, Michael Roth wrote:
> From: BALATON Zoltan <balaton@eik.bme.hu>
>
> Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and
> bitbang_i2c.h an error even if they are identical. Move it to a common
> place to allow building with this clang version.
>
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> (cherry picked from commit 2b4c1125ac3db2734222ff43c25388a16aca4a99)

This was superseded by d718b7475 later so you may want to look at that 
instead but for stable branch I'm not sure what are your preferences.

Regards,
BALATON Zoltan

> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> hw/i2c/bitbang_i2c.h        | 2 --
> include/hw/i2c/i2c.h        | 2 ++
> include/hw/i2c/ppc4xx_i2c.h | 3 ---
> 3 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/i2c/bitbang_i2c.h b/hw/i2c/bitbang_i2c.h
> index 3a7126d5de..9443021710 100644
> --- a/hw/i2c/bitbang_i2c.h
> +++ b/hw/i2c/bitbang_i2c.h
> @@ -3,8 +3,6 @@
>
> #include "hw/i2c/i2c.h"
>
> -typedef struct bitbang_i2c_interface bitbang_i2c_interface;
> -
> #define BITBANG_I2C_SDA 0
> #define BITBANG_I2C_SCL 1
>
> diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
> index 5dc166158b..cf4c45a98f 100644
> --- a/include/hw/i2c/i2c.h
> +++ b/include/hw/i2c/i2c.h
> @@ -82,6 +82,8 @@ int i2c_recv(I2CBus *bus);
>
> DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr);
>
> +typedef struct bitbang_i2c_interface bitbang_i2c_interface;
> +
> /* lm832x.c */
> void lm832x_key_event(DeviceState *dev, int key, int state);
>
> diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h
> index 0891a9c948..b3450bacf7 100644
> --- a/include/hw/i2c/ppc4xx_i2c.h
> +++ b/include/hw/i2c/ppc4xx_i2c.h
> @@ -31,9 +31,6 @@
> #include "hw/sysbus.h"
> #include "hw/i2c/i2c.h"
>
> -/* from hw/i2c/bitbang_i2c.h */
> -typedef struct bitbang_i2c_interface bitbang_i2c_interface;
> -
> #define TYPE_PPC4xx_I2C "ppc4xx-i2c"
> #define PPC4xx_I2C(obj) OBJECT_CHECK(PPC4xxI2CState, (obj), TYPE_PPC4xx_I2C)
>
>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h
  2019-07-23 18:57   ` BALATON Zoltan
@ 2019-07-23 19:01     ` Thomas Huth
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Huth @ 2019-07-23 19:01 UTC (permalink / raw)
  To: BALATON Zoltan, Michael Roth; +Cc: qemu-devel, qemu-stable

On 23/07/2019 20.57, BALATON Zoltan wrote:
> On Tue, 23 Jul 2019, Michael Roth wrote:
>> From: BALATON Zoltan <balaton@eik.bme.hu>
>>
>> Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and
>> bitbang_i2c.h an error even if they are identical. Move it to a common
>> place to allow building with this clang version.
>>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>> Acked-by: David Gibson <david@gibson.dropbear.id.au>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> (cherry picked from commit 2b4c1125ac3db2734222ff43c25388a16aca4a99)
> 
> This was superseded by d718b7475 later so you may want to look at that
> instead but for stable branch I'm not sure what are your preferences.

You could also cherry-pick this commit here instead:

    e6e90feedb706b1b92827a5977b37e1e8defb8ef
    "configure: Add -Wno-typedef-redefinition to CFLAGS (for Clang)"

... this should fix this problem for good.

 Thomas


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 18:50 ` [Qemu-devel] [Qemu-stable] " Michael Roth
@ 2019-07-24 13:21   ` Philippe Mathieu-Daudé
  2019-08-02 17:54   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 46+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-24 13:21 UTC (permalink / raw)
  To: Michael Roth, qemu-devel; +Cc: qemu-stable

Hi Michael,

On 7/23/19 8:50 PM, Michael Roth wrote:
> Quoting Michael Roth (2019-07-23 12:00:28)
>> Hi everyone,                                                                                              
>>
>> The following new patches are queued for QEMU stable v3.1.1:
>>
>>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
>>
>> The release is planned for 2019-08-01:
>>
>>   https://wiki.qemu.org/Planning/3.1
>>
>> Please respond here or CC qemu-stable@nongnu.org on any patches you
>> think should be included in the release.
>>
>> Note that this update falls outside the normal stable release support
>> window (~1 development cycle), but is being released now since it was
>> delayed from its intended release date.
>>
> ----------------------------------------------------------------
> BALATON Zoltan (1):
>       i2c: Move typedef of bitbang_i2c_interface to i2c.h
> 
> Christian Borntraeger (2):
>       iotests: make 235 work on s390 (and others)
>       s390x/cpumodel: ignore csske for expansion
> 
> Christophe Fergeau (1):
>       json: Fix % handling when not interpolating
> 
> Corey Minyard (1):
>       pc:piix4: Update smbus I/O space after a migration
> 
> Cornelia Huck (1):
>       vfio-ap: flag as compatible with balloon
> 
> Dan Streetman (1):
>       do not call vhost_net_cleanup() on running net from char user event
> 
> Daniel Henrique Barboza (1):
>       qga: update docs with systemd suspend support info
> 
> Daniel P. Berrangé (1):
>       qemu-img: fix error reporting for -object
> 
> Eric Blake (1):
>       cutils: Fix size_to_str() on 32-bit platforms
> 
> Gerd Hoffmann (1):
>       usb-mtp: use O_NOFOLLOW and O_CLOEXEC.
> 
> Janosch Frank (1):
>       s390x: Return specification exception for unimplemented diag 308 subcodes
> 
> Kevin Wolf (3):
>       block: Fix invalidate_cache error path for parent activation
>       qcow2: Avoid COW during metadata preallocation
>       block: Fix AioContext switch for bs->drv == NULL
> 
> Li Hangjing (1):
>       vhost: fix vhost_log size overflow during migration
> 
> Liam Merwick (1):
>       tpm_tis: fix loop that cancels any seizure by a lower locality
> 
> Marcel Apfelbaum (1):
>       hw/rdma: another clang compilation fix
> 
> Mark Cave-Ayland (2):
>       mac_oldworld: use node name instead of alias name for hd device in FWPathProvider
>       mac_newworld: use node name instead of alias name for hd device in FWPathProvider
> 
> Max Reitz (3):
>       iotests: Filter second BLOCK_JOB_ERROR from 229
>       block/file-posix: Unaligned O_DIRECT block-status
>       iotests: Test unaligned raw images with O_DIRECT
> 
> Michael Roth (1):
>       qga-win: include glib when building VSS DLL
> 
> Paolo Bonzini (1):
>       i386: remove the 'INTEL_PT' CPUID bit from named CPU models
> 
> Paul A. Clarke (1):
>       Changes requirement for "vsubsbs" instruction
> 
> Peter Lieven (1):
>       megasas: fix mapped frame size
> 
> Peter Maydell (2):
>       linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
>       exec.c: Don't reallocate IOMMUNotifiers that are in use
> 
> Robert Hoo (1):
>       i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model
> 
> Stefan Berger (2):
>       tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid
>       tpm: Make sure the locality received from backend is valid
> 
> Thomas Huth (1):
>       hw/s390x: Fix bad mask in time2tod()
> 
> Thomas Petazzoni (1):
>       configure: improve usbfs check
> 
> William Bowling (1):
>       slirp: check sscanf result when emulating ident
> 
> Zheng Xiang (1):
>       pcie: set link state inactive/active after hot unplug/plug

I have noted these too:

44c64e9095 target/m68k: Fix a tcg_temp leak
526668c734 hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[]
c0bccee9b4 hw/ssi/mss-spi: Avoid crash when reading empty RX FIFO
a09ef50404 hw/display/xlnx_dp: Avoid crash when reading empty RX FIFO
3a283507c0 hw/block/pflash_cfi01: Add missing DeviceReset() handler


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (37 preceding siblings ...)
  2019-07-23 18:50 ` [Qemu-devel] [Qemu-stable] " Michael Roth
@ 2019-07-24 17:07 ` Cole Robinson
  2019-07-29 20:13 ` Bruce Rogers
  39 siblings, 0 replies; 46+ messages in thread
From: Cole Robinson @ 2019-07-24 17:07 UTC (permalink / raw)
  To: Michael Roth, qemu-devel; +Cc: qemu-stable

On 7/23/19 1:00 PM, Michael Roth wrote:
> Hi everyone,                                                                                              
> 
> The following new patches are queued for QEMU stable v3.1.1:
> 
>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
> 
> The release is planned for 2019-08-01:
> 
>   https://wiki.qemu.org/Planning/3.1
> 
> Please respond here or CC qemu-stable@nongnu.org on any patches you
> think should be included in the release.
> 
> Note that this update falls outside the normal stable release support
> window (~1 development cycle), but is being released now since it was
> delayed from its intended release date.
> 

Here's some extra patches we are carrying in Fedora 30

Thanks,
Cole

commit e014dbe74e0484188164c61ff6843f8a04a8cb9d
Author: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Date:   Tue Mar 5 16:46:33 2019 +0100

    gluster: Handle changed glfs_ftruncate signature

commit 0e3b891fefacc0e49f3c8ffa3a753b69eb7214d2
Author: Niels de Vos <ndevos@redhat.com>
Date:   Tue Mar 5 16:46:34 2019 +0100

    gluster: the glfs_io_cbk callback function pointer adds pre/post
stat args

commit cce648613bc802be1b894227f7fd94d88476ea07
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Wed Dec 12 23:28:17 2018 +0530

    pvrdma: release device resources in case of an error

commit 2aa86456fb938a11f2b7bd57c8643c213218681c
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Thu Dec 13 01:00:35 2018 +0530

    pvrdma: add uar_read routine

commit e909ff93698851777faac3c45d03c1b73f311ea6
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Fri Jan 11 17:27:31 2019 +0100

    scsi-generic: avoid possible out-of-bounds access to r->buf

commit a7104eda7dab99d0cdbd3595c211864cba415905
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Sun Jan 13 23:29:48 2019 +0530

    slirp: check data length while emulating ident function

commit b05b267840515730dbf6753495d5b7bd8b04ad1c
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Tue Jan 8 11:23:01 2019 +0100

    i2c-ddc: fix oob read

commit 9a1565a03b79d80b236bc7cc2dbce52a2ef3a1b8
Author: Daniel P. Berrangé <berrange@redhat.com>
Date:   Wed Mar 13 09:49:03 2019 +0000

    seccomp: don't kill process for resource control syscalls

commit d52680fc932efb8a2f334cc6993e705ed1e31e99
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Thu Apr 25 12:05:34 2019 +0530

    qxl: check release info object

commit ad280559c68360c9f1cd7be063857853759e6a73
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Fri Jan 4 15:19:10 2019 +0530

    sun4u: add power_mem_read routine

commit da885fe1ee8b4589047484bd7fa05a4905b52b17
Author: Peter Maydell <peter.maydell@linaro.org>
Date:   Fri Dec 14 13:30:52 2018 +0000

    device_tree.c: Don't use load_image()

commit 065e6298a75164b4347682b63381dbe752c2b156
Author: Markus Armbruster <armbru@redhat.com>
Date:   Tue Apr 9 19:40:18 2019 +0200

    device_tree: Fix integer overflowing in load_device_tree()


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
                   ` (38 preceding siblings ...)
  2019-07-24 17:07 ` Cole Robinson
@ 2019-07-29 20:13 ` Bruce Rogers
  39 siblings, 0 replies; 46+ messages in thread
From: Bruce Rogers @ 2019-07-29 20:13 UTC (permalink / raw)
  To: mdroth, qemu-devel; +Cc: qemu-stable

On Tue, 2019-07-23 at 12:00 -0500, Michael Roth wrote:
> Hi
> everyone,                                                            
>                                   
> 
> The following new patches are queued for QEMU stable v3.1.1:
> 
>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
> 
> The release is planned for 2019-08-01:
> 
>   https://wiki.qemu.org/Planning/3.1
> 
> Please respond here or CC qemu-stable@nongnu.org on any patches you
> think should be included in the release.
> 
> Note that this update falls outside the normal stable release support
> window (~1 development cycle), but is being released now since it was
> delayed from its intended release date.
> 
> Thanks!
> 
> 

Beyond what has already been suggested, here are some patches we've
added to our v3.1.0 based QEMU releases:

commit 2c858ce5da8ae6689c75182b73bc455a291cad41
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Thu Dec 13 01:00:36 2018 +0530

    pvrdma: check number of pages when creating rings


commit f1e2e38ee0136b7710a2caa347049818afd57a1b
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Thu Dec 13 01:00:39 2018 +0530

    pvrdma: check return value from pvrdma_idx_ring_has_ routines


commit 509f57c98e7536905bb4902363d0cba66ce7e089
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Thu Dec 13 01:00:37 2018 +0530

    pvrdma: release ring object in case of an error


commit 4720cbeea1f42fd905fc69338fd42b191e58b412
Author: Kevin Wolf <kwolf@redhat.com>
Date:   Mon Jan 7 13:02:48 2019 +0100

    block: Fix hangs in synchronous APIs with iothreads


commit 6f5d8671225dc77190647f18a27a0d156d4ca97a
Author: Prasad J Pandit <pjp@fedoraproject.org>
Date:   Tue Jul 23 16:17:52 2019 +0530

    qemu-bridge-helper: restrict interface name to IFNAMSIZ


Thanks,

Bruce

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29
  2019-07-23 18:50 ` [Qemu-devel] [Qemu-stable] " Michael Roth
  2019-07-24 13:21   ` Philippe Mathieu-Daudé
@ 2019-08-02 17:54   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 46+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-02 17:54 UTC (permalink / raw)
  To: Michael Roth, qemu-devel; +Cc: qemu-stable, Gerd Hoffmann

On 7/23/19 8:50 PM, Michael Roth wrote:
> Quoting Michael Roth (2019-07-23 12:00:28)
>> Hi everyone,                                                                                              
>>
>> The following new patches are queued for QEMU stable v3.1.1:
>>
>>   https://github.com/mdroth/qemu/commits/stable-3.1-staging
>>
>> The release is planned for 2019-08-01:
>>
>>   https://wiki.qemu.org/Planning/3.1
>>
>> Please respond here or CC qemu-stable@nongnu.org on any patches you
>> think should be included in the release.
>>
>> Note that this update falls outside the normal stable release support
>> window (~1 development cycle), but is being released now since it was
>> delayed from its intended release date.
>>
>> Thanks!
>>
> 
> Forgot to include the usual patch list:
> 
> ----------------------------------------------------------------
> BALATON Zoltan (1):
>       i2c: Move typedef of bitbang_i2c_interface to i2c.h
> 
> Christian Borntraeger (2):
>       iotests: make 235 work on s390 (and others)
>       s390x/cpumodel: ignore csske for expansion
> 
> Christophe Fergeau (1):
>       json: Fix % handling when not interpolating
> 
> Corey Minyard (1):
>       pc:piix4: Update smbus I/O space after a migration
> 
> Cornelia Huck (1):
>       vfio-ap: flag as compatible with balloon
> 
> Dan Streetman (1):
>       do not call vhost_net_cleanup() on running net from char user event
> 
> Daniel Henrique Barboza (1):
>       qga: update docs with systemd suspend support info
> 
> Daniel P. Berrangé (1):
>       qemu-img: fix error reporting for -object
> 
> Eric Blake (1):
>       cutils: Fix size_to_str() on 32-bit platforms
> 
> Gerd Hoffmann (1):
>       usb-mtp: use O_NOFOLLOW and O_CLOEXEC.
> 
> Janosch Frank (1):
>       s390x: Return specification exception for unimplemented diag 308 subcodes
> 
> Kevin Wolf (3):
>       block: Fix invalidate_cache error path for parent activation
>       qcow2: Avoid COW during metadata preallocation
>       block: Fix AioContext switch for bs->drv == NULL
> 
> Li Hangjing (1):
>       vhost: fix vhost_log size overflow during migration
> 
> Liam Merwick (1):
>       tpm_tis: fix loop that cancels any seizure by a lower locality
> 
> Marcel Apfelbaum (1):
>       hw/rdma: another clang compilation fix
> 
> Mark Cave-Ayland (2):
>       mac_oldworld: use node name instead of alias name for hd device in FWPathProvider
>       mac_newworld: use node name instead of alias name for hd device in FWPathProvider
> 
> Max Reitz (3):
>       iotests: Filter second BLOCK_JOB_ERROR from 229
>       block/file-posix: Unaligned O_DIRECT block-status
>       iotests: Test unaligned raw images with O_DIRECT
> 
> Michael Roth (1):
>       qga-win: include glib when building VSS DLL
> 
> Paolo Bonzini (1):
>       i386: remove the 'INTEL_PT' CPUID bit from named CPU models
> 
> Paul A. Clarke (1):
>       Changes requirement for "vsubsbs" instruction
> 
> Peter Lieven (1):
>       megasas: fix mapped frame size
> 
> Peter Maydell (2):
>       linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
>       exec.c: Don't reallocate IOMMUNotifiers that are in use
> 
> Robert Hoo (1):
>       i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model
> 
> Stefan Berger (2):
>       tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid
>       tpm: Make sure the locality received from backend is valid
> 
> Thomas Huth (1):
>       hw/s390x: Fix bad mask in time2tod()
> 
> Thomas Petazzoni (1):
>       configure: improve usbfs check
> 
> William Bowling (1):
>       slirp: check sscanf result when emulating ident
> 
> Zheng Xiang (1):
>       pcie: set link state inactive/active after hot unplug/plug

I am having a spice build failure fixed by this commit:

commit be812c0ab7d5ab741d0d87387a75a0e8bb6461e7
Author: Lukáš Hrázký <lhrazky@redhat.com>
Date:   Fri Feb 15 16:09:19 2019 +0100

 spice: set device address and device display ID in QXL interface

 Calls the new SPICE QXL interface function spice_qxl_set_device_info to
 set the hardware address of the graphics device represented by the QXL
 interface (e.g. a PCI path) and the device display IDs (the IDs of the
 device's monitors that belong to this QXL interface).

 Also stops using the deprecated spice_qxl_set_max_monitors, the new
 interface function replaces it.



^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2019-08-02 17:57 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 17:00 [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h Michael Roth
2019-07-23 18:57   ` BALATON Zoltan
2019-07-23 19:01     ` Thomas Huth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 02/36] iotests: make 235 work on s390 (and others) Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 03/36] Changes requirement for "vsubsbs" instruction Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 04/36] pcie: set link state inactive/active after hot unplug/plug Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 05/36] pc:piix4: Update smbus I/O space after a migration Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 06/36] hw/s390x: Fix bad mask in time2tod() Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 07/36] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0 Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 08/36] s390x: Return specification exception for unimplemented diag 308 subcodes Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend " Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 14/36] slirp: check sscanf result when emulating ident Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 21/36] configure: improve usbfs check Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 22/36] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 23/36] mac_newworld: " Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 24/36] qga: update docs with systemd suspend support info Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 26/36] qemu-img: fix error reporting for -object Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 28/36] cutils: Fix size_to_str() on 32-bit platforms Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 30/36] do not call vhost_net_cleanup() on running net from char user event Michael Roth
2019-07-23 17:00 ` [Qemu-devel] [PATCH 31/36] s390x/cpumodel: ignore csske for expansion Michael Roth
2019-07-23 17:01 ` [Qemu-devel] [PATCH 32/36] megasas: fix mapped frame size Michael Roth
2019-07-23 17:01 ` [Qemu-devel] [PATCH 33/36] iotests: Filter second BLOCK_JOB_ERROR from 229 Michael Roth
2019-07-23 17:01 ` [Qemu-devel] [PATCH 34/36] block/file-posix: Unaligned O_DIRECT block-status Michael Roth
2019-07-23 17:01 ` [Qemu-devel] [PATCH 35/36] iotests: Test unaligned raw images with O_DIRECT Michael Roth
2019-07-23 17:01 ` [Qemu-devel] [PATCH 36/36] vhost: fix vhost_log size overflow during migration Michael Roth
2019-07-23 17:12 ` [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29 Aleksandar Markovic
2019-07-23 18:52   ` Michael Roth
2019-07-23 18:50 ` [Qemu-devel] [Qemu-stable] " Michael Roth
2019-07-24 13:21   ` Philippe Mathieu-Daudé
2019-08-02 17:54   ` Philippe Mathieu-Daudé
2019-07-24 17:07 ` Cole Robinson
2019-07-29 20:13 ` Bruce Rogers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.