Patch Round-up for stable 2.1.1, freeze on 2014-09-03
Subsystems (2)
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
https://github.com/mdroth/qemu/commits/stable-2.1-staging
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansion
Ben Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)
Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2
Fam Zheng (1):
blkdebug: Delete BH in bdrv_aio_cancel
Gonglei (1):
pcihp: fix possible array out of bounds
Hu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE
pc-dimm: validate node property
numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messages
Michael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: set MPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine types
Michael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other types
Peter Lieven (1):
block/iscsi: fix memory corruption on iscsi resize
Peter Maydell (1):
target-arm: Fix return address for A64 BRK instructions
Stefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fix O_DIRECT short reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nested aio_poll() calls
zhanghailiang (1):
virtio-blk: fix reference a pointer which might be freed
backends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
PATCH 3/25 vfio: Fix MSI-X vector expansion
From: Alex Williamson <[email protected]>
When new MSI-X vectors are enabled we need to disable MSI-X and re-enable it with the correct number of vectors. That means we need to reprogram the eventfd triggers for each vector. Prior to f4d45d47 vector->use tracked whether a vector was masked or unmasked and we could always pick the KVM path when available for unmasked vectors. Now vfio doesn't track mask state itself and vector->use and virq remains configured even for masked vectors. Therefore we need to ask the MSI-X code whether a vector is masked in order to select the correct signaling path. As noted in the comment, MSI relies on hardware to handle masking.
--- hw/misc/vfio.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-)
hw/misc/vfio.c +29 -9
@@ -120,11 +120,20 @@ typedef struct VFIOINTx { } VFIOINTx;typedef struct VFIOMSIVector { -EventNotifier interrupt;/* eventfd triggered on interrupt */ -EventNotifier kvm_interrupt;/* eventfd triggered for KVM irqfd bypass */ +/* +* Two interrupt paths are configured per vector. The first, is only used +* for interrupts injected via QEMU. This is typically the non-accel path, +* but may also be used when we want QEMU to handle masking and pending +* bits. The KVM path bypasses QEMU and is therefore higher performance, +* but requires masking at the device. virq is used to track the MSI route +* through KVM, thus kvm_interrupt is only available when virq is set to a +* valid (>= 0) value. +*/ +EventNotifier interrupt; +EventNotifier kvm_interrupt;struct VFIODevice *vdev;/* back pointer to device */ MSIMessage msg;/* cache the MSI message so we know when it changes */ -int virq;/* KVM irqchip route for QEMU bypass */ +int virq;bool use; }VFIOMSIVector ;
@@ -681,13 +690,24 @@ static int vfio_enable_vectors(VFIODevice *vdev, bool msix) fds = (int32_t *)&irq_set->data;for (i =0 ; i < vdev->nr_vectors; i++) { -if (!vdev->msi_vectors[i].use) { - fds[i] =-1 ; - }else if (vdev->msi_vectors[i].virq >=0 ) { - fds[i] =event_notifier_get_fd (&vdev->msi_vectors[i].kvm_interrupt); - }else { - fds[i] =event_notifier_get_fd (&vdev->msi_vectors[i].interrupt); +int fd =-1 ; + +/* +* MSI vs MSI-X - The guest has direct access to MSI mask and pending +* bits, therefore we always use the KVM signaling path when setup. +* MSI-X mask and pending bits are emulated, so we want to use the +* KVM signaling path only when configured and unmasked. +*/ +if (vdev->msi_vectors[i].use) { +if (vdev->msi_vectors[i].virq <0 || + (msix &&msix_is_masked (&vdev->pdev, i))) { + fd =event_notifier_get_fd (&vdev->msi_vectors[i].interrupt); + }else { + fd =event_notifier_get_fd (&vdev->msi_vectors[i].kvm_interrupt); + } } + + fds[i] = fd; } ret =ioctl (vdev->fd,VFIO_DEVICE_SET_IRQS , irq_set);
Signature · 1 line
1.9.1
PATCH 4/25 l2tpv3 (configure): it is linux-specific
In reply to Michael RothFrom: Michael Tokarev <[email protected]>
Some non-linux systems, for example a system with FreeBSD kernel and glibc, may declare struct mmsghdr (in glibc) but may not have linux-specific header file linux/ip.h. The actual implementation in qemu includes this linux-specific header file unconditionally, so compilation fails if it is not present. Include this header in the configure test too.
--- configure | 1 + 1 file changed, 1 insertion(+)
configure +1 -0
@@ -1723,6 +1723,7 @@ fi cat > $TMPC <<EOF #include <sys/socket.h> +#include <linux/ip.h> int main(void) { return sizeof(struct mmsghdr); } EOF if compile_prog "" "" ; then
Signature · 1 line
1.9.1
PATCH 2/25 qdev-monitor: include QOM properties in -device FOO, help output
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
Update -device FOO,help to include QOM properties in addition to qdev properties. Devices are gradually adding more QOM properties that are not reflected as qdev properties.
It is important to report all device properties since management tools like libvirt use this information (and device-list-properties QMP) to detect the presence of QEMU features.
This patch reuses the device-list-properties QMP machinery to avoid code duplication.
--- qdev-monitor.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-)
qdev-monitor.c +17 -23
@@ -182,9 +182,10 @@ static const char *find_typename_by_alias(const char *alias)int qdev_device_help (QemuOpts *opts) { +Error *local_err =NULL ;const char *driver; -Property *prop; -ObjectClass *klass; +DevicePropertyInfoList *prop_list; +DevicePropertyInfoList *prop; driver =qemu_opt_get (opts,"driver" );if (driver &&is_help_option (driver)) {
@@ -196,35 +197,28 @@ int qdev_device_help(QemuOpts *opts)return 0 ; } - klass =object_class_by_name (driver); -if (!klass) { +if (!object_class_by_name (driver)) {const char *typename =find_typename_by_alias (driver);if (typename) { driver = typename; - klass =object_class_by_name (driver); } } -if (!object_class_dynamic_cast (klass,TYPE_DEVICE )) { -return 0 ; + prop_list =qmp_device_list_properties (driver, &local_err); +if (!prop_list) { +error_printf ("%s\n" ,error_get_pretty (local_err)); +error_free (local_err); +return 1 ; } -do { -for (prop =DEVICE_CLASS (klass)->props; prop && prop->name; prop++) { -/* -* TODO Properties without a parser are just for dirty hacks. -* qdev_prop_ptr is the only such PropertyInfo. It's marked -* for removal. This conditional should be removed along with -* it. -*/ -if (!prop->info->set) { -continue ;/* no way to set it, don't show */ - } -error_printf ("%s.%s=%s\n" , driver, prop->name, - prop->info->legacy_name ?: prop->info->name); - } - klass =object_class_get_parent (klass); - }while (klass !=object_class_by_name (TYPE_DEVICE )); + +for (prop = prop_list; prop; prop = prop->next) { +error_printf ("%s.%s=%s\n" , driver, + prop->value->name, + prop->value->type); + } + +qapi_free_DevicePropertyInfoList (prop_list);return 1 ; }
Signature · 1 line
1.9.1
PATCH 7/25 hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE
In reply to Michael RothFrom: Hu Tao <[email protected]>
--- hw/i386/acpi-dsdt.dsl | 4 ++-- hw/i386/acpi-dsdt.hex.generated | 8 ++++---- hw/i386/q35-acpi-dsdt.dsl | 4 ++-- hw/i386/ssdt-mem.dsl | 16 ++++++++-------- hw/i386/ssdt-misc.dsl | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-)
hw/i386/acpi-dsdt.dsl +2 -2
@@ -302,7 +302,7 @@ DefinitionBlock ( /**************************************************************** * General purpose events ****************************************************************/ - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) Scope(\_GPE) { Name(_HID, "ACPI0006")
@@ -321,7 +321,7 @@ DefinitionBlock ( } Method(_E03) { // Memory hotplug event - \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() + \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() } Method(_L04) { }
hw/i386/acpi-dsdt.hex.generated +4 -4
@@ -8,7 +8,7 @@ static unsigned char AcpiDsdtAmlCode[] = { 0x0, 0x0, 0x1, -0x2e, +0x1f, 0x42, 0x58, 0x50,
@@ -31,9 +31,9 @@ static unsigned char AcpiDsdtAmlCode[] = { 0x4e, 0x54, 0x4c, -0x13, -0x9, -0x12, +0x28, +0x5, +0x10, 0x20, 0x10, 0x49,
hw/i386/q35-acpi-dsdt.dsl +2 -2
@@ -410,7 +410,7 @@ DefinitionBlock ( /**************************************************************** * General purpose events ****************************************************************/ - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) Scope(\_GPE) { Name(_HID, "ACPI0006")
@@ -425,7 +425,7 @@ DefinitionBlock ( } Method(_E03) { // Memory hotplug event - \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() + \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() } Method(_L04) { }
hw/i386/ssdt-mem.dsl +8 -8
@@ -39,10 +39,10 @@ ACPI_EXTRACT_ALL_CODE ssdm_mem_aml DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) { - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj) - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj) - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj) - External(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj) Scope(\_SB) { /* v------------------ DO NOT EDIT ------------------v */
@@ -58,19 +58,19 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) Name(_HID, EISAID("PNP0C80")) Method(_CRS, 0) { - Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID)) + Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID)) } Method(_STA, 0) { - Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID)) + Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID)) } Method(_PXM, 0) { - Return(\_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID)) + Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID)) } Method(_OST, 3) { - \_SB.PCI0.MEMORY_HOPTLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2) + \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2) } } }
hw/i386/ssdt-misc.dsl +1 -1
@@ -120,7 +120,7 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1) External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj) Scope(\_SB.PCI0) { - Device(MEMORY_HOPTLUG_DEVICE) { + Device(MEMORY_HOTPLUG_DEVICE) { Name(_HID, "PNP0A06") Name(_UID, "Memory hotplug resources")
include/hw/acpi/pc-hotplug.h +1 -1
@@ -32,7 +32,7 @@#define ACPI_MEMORY_HOTPLUG_IO_LEN 24#define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -#define MEMORY_HOPTLUG_DEVICE MHPD +#define MEMORY_HOTPLUG_DEVICE MHPD#define MEMORY_SLOTS_NUMBER MDNR#define MEMORY_HOTPLUG_IO_REGION HPMR#define MEMORY_SLOT_ADDR_LOW MRBL
Signature · 1 line
1.9.1
PATCH 5/25 ide: only constrain read/write requests to drive size, not other types
In reply to Michael RothFrom: Michael Tokarev <[email protected]>
Commit 58ac321135a introduced a check to ide dma processing which constrains all requests to drive size. However, apparently, some valid requests (like TRIM) does not fit in this constraint, and fails in 2.1. So check the range only for reads and writes.
--- hw/ide/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/ide/core.c +2 -1
@@ -688,7 +688,8 @@ void ide_dma_cb(void *opaque, int ret) sector_num, n, s->dma_cmd);#endif -if (!ide_sect_range_ok (s, sector_num, n)) { +if ((s->dma_cmd ==IDE_DMA_READ || s->dma_cmd ==IDE_DMA_WRITE ) && + !ide_sect_range_ok (s, sector_num, n)) {dma_buf_commit (s);ide_dma_error (s);return ;
Signature · 1 line
1.9.1
PATCH 8/25 pc-dimm: validate node property
In reply to Michael RothFrom: Hu Tao <[email protected]>
If user specifies a node number that exceeds the available numa nodes in emulated system for pc-dimm device, the device will report an invalid _PXM to OSPM. Fix this by checking the node property value.
--- hw/mem/pc-dimm.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/mem/pc-dimm.c +5 -0
@@ -252,6 +252,11 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)error_setg (errp,"'" PC_DIMM_MEMDEV_PROP "' property is not set" );return ; } +if (dimm->node >= nb_numa_nodes) { +error_setg (errp,"'" PC_DIMM_NODE_PROP +"' exceeds numa node number: %" PRId32, nb_numa_nodes); +return ; + } }static MemoryRegion *pc_dimm_get_memory_region (PCDIMMDevice *dimm)
Signature · 1 line
1.9.1
PATCH 10/25 numa: show hex number in error message for consistency and prefix them with 0x
In reply to Michael RothFrom: Hu Tao <[email protected]>
The error messages before and after patch are:
before:
qemu-system-x86_64: total memory for NUMA nodes (134217728) should equal RAM size (20000000)
after:
qemu-system-x86_64: total memory for NUMA nodes (0x8000000) should equal RAM size (0x20000000)
--- numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
numa.c +2 -2
@@ -210,8 +210,8 @@ void set_numa_nodes(void) numa_total += numa_info[i].node_mem; }if (numa_total != ram_size) { -error_report ("total memory for NUMA nodes (%" PRIu64")" -" should equal RAM size (" RAM_ADDR_FMT ")" , +error_report ("total memory for NUMA nodes (0x%" PRIx64")" +" should equal RAM size (0x" RAM_ADDR_FMT ")" , numa_total, ram_size);exit (1 ); }
Signature · 1 line
1.9.1
PATCH 6/25 pci: Use bus master address space for delivering MSI/MSI-X messages
In reply to Michael RothFrom: Jan Kiszka <[email protected]>
The spec says (and real HW confirms this) that, if the bus master bit is 0, the device will not generate any PCI accesses. MSI and MSI-X messages fall among these, so we should use the corresponding address space to deliver them. This will prevent delivery if bus master support is disabled.
--- hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/pci/msi.c +1 -1
@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)"notify vector 0x%x" " address: 0x%" PRIx64" data: 0x%" PRIx32"\n" , vector, msg.address, msg.data); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }/* Normally called by pci_default_write_config(). */
hw/pci/msix.c +1 -1
@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector) msg =msix_get_message (dev, vector); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }void msix_reset (PCIDevice *dev)
Signature · 1 line
1.9.1
PATCH 9/25 pc-dimm: fix up error message
In reply to Michael RothFrom: "Michael S. Tsirkin" <[email protected]>
- int should be printed using %d
- print actual wrong value for property
--- hw/mem/pc-dimm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
hw/mem/pc-dimm.c +3 -2
@@ -253,8 +253,9 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)return ; }if (dimm->node >= nb_numa_nodes) { -error_setg (errp,"'" PC_DIMM_NODE_PROP -"' exceeds numa node number: %" PRId32, nb_numa_nodes); +error_setg (errp,"'DIMM property " PC_DIMM_NODE_PROP " has value %" + PRIu32"' which exceeds the number of numa nodes: %d" , + dimm->node, nb_numa_nodes);return ; } }
Signature · 1 line
1.9.1
PATCH 12/25 virtio-blk: fix reference a pointer which might be freed
In reply to Michael RothFrom: zhanghailiang <[email protected]>
In function virtio_blk_handle_request, it may freed memory pointed by req, So do not access member of req after calling this function.
--- hw/block/virtio-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/block/virtio-blk.c +2 -1
@@ -469,8 +469,9 @@ static void virtio_blk_dma_restart_bh(void *opaque) s->rq =NULL ;while (req) { +VirtIOBlockReq *next = req->next;virtio_blk_handle_request (req, &mrb); - req = req->next; + req = next; }virtio_submit_multiwrite (s->bs, &mrb);
Signature · 1 line
1.9.1
PATCH 13/25 target-arm: Fix return address for A64 BRK instructions
In reply to Michael RothFrom: Peter Maydell <[email protected]>
When we take an exception resulting from a BRK instruction, the architecture requires that the "preferred return address" reported to the exception handler is the address of the BRK itself, not the following instruction (like undefined insns, and in contrast with SVC, HVC and SMC). Follow this, rather than incorrectly reporting the address of the following insn.
(We do get this correct for the A32/T32 BKPT insns.)
--- target-arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-arm/translate-a64.c +1 -1
@@ -1454,7 +1454,7 @@ static void disas_exc(DisasContext *s, uint32_t insn)break ; }/* BRK */ -gen_exception_insn (s,0 ,EXCP_BKPT ,syn_aa64_bkpt (imm16)); +gen_exception_insn (s,4 ,EXCP_BKPT ,syn_aa64_bkpt (imm16));break ;case 2 :if (op2_ll !=0 ) {
Signature · 1 line
1.9.1
PATCH 11/25 acpi: align RSDP
In reply to Michael RothFrom: "Michael S. Tsirkin" <[email protected]>
RSDP should be aligned at a 16-byte boundary. This would by chance at the moment, fix up acpi build to make it robust.
--- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/acpi-build.c +1 -1
@@ -1393,7 +1393,7 @@ build_rsdp(GArray *rsdp_table, GArray *linker, unsigned rsdt) {AcpiRsdpDescriptor *rsdp =acpi_data_push (rsdp_table,sizeof *rsdp); -bios_linker_loader_alloc (linker,ACPI_BUILD_RSDP_FILE ,1 , +bios_linker_loader_alloc (linker,ACPI_BUILD_RSDP_FILE ,16 , true/* fseg memory */ );memcpy (&rsdp->signature,"RSD PTR " ,8 );
Signature · 1 line
1.9.1
PATCH 16/25 block/iscsi: fix memory corruption on iscsi resize
In reply to Michael RothFrom: Peter Lieven <[email protected]>
bs->total_sectors is not yet updated at this point. resulting in memory corruption if the volume has grown and data is written to the newly availble areas.
--- block/iscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/iscsi.c +2 -1
@@ -1509,7 +1509,8 @@ static int iscsi_truncate(BlockDriverState *bs, int64_t offset)if (iscsilun->allocationmap !=NULL ) {g_free (iscsilun->allocationmap); iscsilun->allocationmap = -bitmap_new (DIV_ROUND_UP (bs->total_sectors, +bitmap_new (DIV_ROUND_UP (sector_lun2qemu (iscsilun->num_blocks, + iscsilun), iscsilun->cluster_sectors)); }
Signature · 1 line
1.9.1
PATCH 15/25 arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2
In reply to Michael RothFrom: Christoffer Dall <[email protected]>
The current code supplies the PSCI v0.1 function IDs in the DT even when KVM uses PSCI v0.2.
This will break guest kernels that only support PSCI v0.1 as they will use the IDs provided in the DT. Guest kernels with PSCI v0.2 support are not affected by this patch, because they ignore the function IDs in the device tree and rely on the architecture definition.
Define QEMU versions of the constants and check that they correspond to the Linux defines on Linux build hosts. After this patch, both guest kernels with PSCI v0.1 support and guest kernels with PSCI v0.2 should work.
Tested on TC2 for 32-bit and APM Mustang for 64-bit (aarch64 guest only). Both cases tested with 3.14 and linus/master and verified I could bring up 2 cpus with both guest kernels. Also tested 32-bit with a 3.14 host kernel with only PSCI v0.1 and both guests booted here as well.
--- hw/arm/virt.c | 31 ++++++++++++++++++++++++++----- target-arm/kvm-consts.h | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-)
hw/arm/virt.c +26 -5
@@ -194,20 +194,41 @@ static void fdt_add_psci_node(const VirtBoardInfo *vbi)/* No PSCI for TCG yet */ if (kvm_enabled ()) { +uint32_t cpu_suspend_fn; +uint32_t cpu_off_fn; +uint32_t cpu_on_fn; +uint32_t migrate_fn; +qemu_fdt_add_subnode (fdt,"/psci" );if (armcpu->psci_version ==2 ) {const char comp[] ="arm,psci-0.2\0arm,psci" ;qemu_fdt_setprop (fdt,"/psci" ,"compatible" , comp,sizeof (comp)); + + cpu_off_fn =QEMU_PSCI_0_2_FN_CPU_OFF ; +if (arm_feature (&armcpu->env,ARM_FEATURE_AARCH64 )) { + cpu_suspend_fn =QEMU_PSCI_0_2_FN64_CPU_SUSPEND ; + cpu_on_fn =QEMU_PSCI_0_2_FN64_CPU_ON ; + migrate_fn =QEMU_PSCI_0_2_FN64_MIGRATE ; + }else { + cpu_suspend_fn =QEMU_PSCI_0_2_FN_CPU_SUSPEND ; + cpu_on_fn =QEMU_PSCI_0_2_FN_CPU_ON ; + migrate_fn =QEMU_PSCI_0_2_FN_MIGRATE ; + } }else {qemu_fdt_setprop_string (fdt,"/psci" ,"compatible" ,"arm,psci" ); + + cpu_suspend_fn =QEMU_PSCI_0_1_FN_CPU_SUSPEND ; + cpu_off_fn =QEMU_PSCI_0_1_FN_CPU_OFF ; + cpu_on_fn =QEMU_PSCI_0_1_FN_CPU_ON ; + migrate_fn =QEMU_PSCI_0_1_FN_MIGRATE ; }qemu_fdt_setprop_string (fdt,"/psci" ,"method" ,"hvc" ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_suspend" , -QEMU_PSCI_0_1_FN_CPU_SUSPEND ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_off" ,QEMU_PSCI_0_1_FN_CPU_OFF ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_on" ,QEMU_PSCI_0_1_FN_CPU_ON ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"migrate" ,QEMU_PSCI_0_1_FN_MIGRATE ); + +qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_suspend" , cpu_suspend_fn); +qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_off" , cpu_off_fn); +qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_on" , cpu_on_fn); +qemu_fdt_setprop_cell (fdt,"/psci" ,"migrate" , migrate_fn); } }
target-arm/kvm-consts.h +27 -0
@@ -17,6 +17,7 @@#ifdef CONFIG_KVM #include "qemu/compiler.h" #include <linux/kvm.h> +#include <linux/psci.h> #define MISMATCH_CHECK (X ,Y ) QEMU_BUILD_BUG_ON(X != Y)
@@ -50,6 +51,32 @@ MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF) MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_ON, KVM_PSCI_FN_CPU_ON) MISMATCH_CHECK(QEMU_PSCI_0_1_FN_MIGRATE, KVM_PSCI_FN_MIGRATE) +#define QEMU_PSCI_0_2_FN_BASE 0x84000000 +#define QEMU_PSCI_0_2_FN (n) (QEMU_PSCI_0_2_FN_BASE + (n)) + +#define QEMU_PSCI_0_2_64BIT 0x40000000 +#define QEMU_PSCI_0_2_FN64_BASE \ + (QEMU_PSCI_0_2_FN_BASE + QEMU_PSCI_0_2_64BIT) +#define QEMU_PSCI_0_2_FN64 (n) (QEMU_PSCI_0_2_FN64_BASE + (n)) + +#define QEMU_PSCI_0_2_FN_CPU_SUSPEND QEMU_PSCI_0_2_FN(1) +#define QEMU_PSCI_0_2_FN_CPU_OFF QEMU_PSCI_0_2_FN(2) +#define QEMU_PSCI_0_2_FN_CPU_ON QEMU_PSCI_0_2_FN(3) +#define QEMU_PSCI_0_2_FN_MIGRATE QEMU_PSCI_0_2_FN(5) + +#define QEMU_PSCI_0_2_FN64_CPU_SUSPEND QEMU_PSCI_0_2_FN64(1) +#define QEMU_PSCI_0_2_FN64_CPU_OFF QEMU_PSCI_0_2_FN64(2) +#define QEMU_PSCI_0_2_FN64_CPU_ON QEMU_PSCI_0_2_FN64(3) +#define QEMU_PSCI_0_2_FN64_MIGRATE QEMU_PSCI_0_2_FN64(5) + +MISMATCH_CHECK(QEMU_PSCI_0_2_FN_CPU_SUSPEND, PSCI_0_2_FN_CPU_SUSPEND) +MISMATCH_CHECK(QEMU_PSCI_0_2_FN_CPU_OFF, PSCI_0_2_FN_CPU_OFF) +MISMATCH_CHECK(QEMU_PSCI_0_2_FN_CPU_ON, PSCI_0_2_FN_CPU_ON) +MISMATCH_CHECK(QEMU_PSCI_0_2_FN_MIGRATE, PSCI_0_2_FN_MIGRATE) +MISMATCH_CHECK(QEMU_PSCI_0_2_FN64_CPU_SUSPEND, PSCI_0_2_FN64_CPU_SUSPEND) +MISMATCH_CHECK(QEMU_PSCI_0_2_FN64_CPU_ON, PSCI_0_2_FN64_CPU_ON) +MISMATCH_CHECK (QEMU_PSCI_0_2_FN64_MIGRATE ,PSCI_0_2_FN64_MIGRATE ) +/* Note that KVM uses overlapping values for AArch32 and AArch64 * target CPU numbers. AArch32 targets: */
Signature · 1 line
1.9.1
PATCH 1/25 qmp: hide "hotplugged" device property from device-list-properties
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
The "hotplugged" device property was not reported before commit f4eb32b590bf58c1c67570775eb78beb09964fad ("qmp: show QOM properties in device-list-properties"). Fix this difference.
--- qmp.c | 1 + 1 file changed, 1 insertion(+)
qmp.c +1 -0
@@ -509,6 +509,7 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,if (strcmp (prop->name,"type" ) ==0 ||strcmp (prop->name,"realized" ) ==0 ||strcmp (prop->name,"hotpluggable" ) ==0 || +strcmp (prop->name,"hotplugged" ) ==0 ||strcmp (prop->name,"parent_bus" ) ==0 ) {continue ; }
Signature · 1 line
1.9.1
PATCH 18/25 qemu-iotests: add test case 101 for short file I/O
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
Conflicts:
tests/qemu-iotests/group
*fix up context mismatches due to lack of 099 and 103 tests
--- tests/qemu-iotests/101 | 58 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 ++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 69 insertions(+) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
tests/qemu-iotests/101 new file +58 -0
@@ -0,0 +1,58 @@ +#!/bin/bash +# +# Test short file I/O +# +# Copyright (C) 2014 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/>. +# + +# creator [email protected] + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +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 + + +echo +echo "== creating short image file ==" +dd if=/dev/zero of="$TEST_IMG" bs=1 count=320 + +echo +echo "== reading bytes beyond EOF gives zeroes ==" +$QEMU_IO -c "read -P 0 0 512" "$TEST_IMG" | _filter_qemu_io + + +# success, all done +echo "*** done" +rm -f $seq.full +status=0
tests/qemu-iotests/101.out new file +10 -0
@@ -0,0 +1,10 @@ +QA output created by 101 + +== creating short image file == +320+0 records in +320+0 records out + +== reading bytes beyond EOF gives zeroes == +read 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +*** done
tests/qemu-iotests/group +1 -0
@@ -100,3 +100,4 @@ 091 rw auto quick 092 rw auto quick 095 rw auto quick +101 rw auto quick
Signature · 1 line
1.9.1
PATCH 20/25 vmxnet3: Pad short frames to minimum size (60 bytes)
In reply to Michael RothFrom: Ben Draper <[email protected]>
When running VMware ESXi under qemu-kvm the guest discards frames that are too short. Short ARP Requests will be dropped, this prevents guests on the same bridge as VMware ESXi from communicating. This patch simply adds the padding on the network device itself.
--- hw/net/vmxnet3.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
hw/net/vmxnet3.c +10 -0
@@ -34,6 +34,7 @@#define PCI_DEVICE_ID_VMWARE_VMXNET3_REVISION 0x1#define VMXNET3_MSIX_BAR_SIZE 0x2000 +#define MIN_BUF_SIZE 60#define VMXNET3_BAR0_IDX (0)#define VMXNET3_BAR1_IDX (1)
@@ -1871,12 +1872,21 @@ vmxnet3_receive(NetClientState *nc, const uint8_t *buf, size_t size) {VMXNET3State *s =qemu_get_nic_opaque (nc);size_t bytes_indicated; +uint8_t min_buf[MIN_BUF_SIZE ];if (!vmxnet3_can_receive (nc)) {VMW_PKPRN ("Cannot receive now" );return -1 ; } +/* Pad to minimum Ethernet frame length */ +if (size <sizeof (min_buf)) { +memcpy (min_buf, buf, size); +memset (&min_buf[size],0 ,sizeof (min_buf) - size); + buf = min_buf; + size =sizeof (min_buf); + } +if (s->peer_has_vhdr) {vmxnet_rx_pkt_set_vhdr (s->rx_pkt, (struct virtio_net_hdr *)buf); buf +=sizeof (struct virtio_net_hdr );
Signature · 1 line
1.9.1
PATCH 17/25 raw-posix: fix O_DIRECT short reads
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
The following O_DIRECT read from a <512 byte file fails:
$ truncate -s 320 test.img $ qemu-io -n -c 'read -P 0 0 512' test.img qemu-io: can't open device test.img: Could not read image for determining its format: Invalid argument
Note that qemu-io completes successfully without the -n (O_DIRECT) option.
This patch fixes qemu-iotests ./check -nocache -vmdk 059.
--- block/raw-posix.c | 9 +++++++++ 1 file changed, 9 insertions(+)
block/raw-posix.c +9 -0
@@ -747,6 +747,15 @@ static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf) }if (len ==-1 && errno ==EINTR ) {continue ; + }else if (len ==-1 && errno ==EINVAL && + (aiocb->bs->open_flags &BDRV_O_NOCACHE ) && + !(aiocb->aio_type &QEMU_AIO_WRITE ) && + offset >0 ) { +/* O_DIRECT pread() may fail with EINVAL when offset is unaligned +* after a short read. Assume that O_DIRECT short reads only occur +* at EOF. Therefore this is a short read, not an I/O error. +*/ +break ; }else if (len ==-1 ) { offset = -errno;break ;
Signature · 1 line
1.9.1
PATCH 19/25 blkdebug: Delete BH in bdrv_aio_cancel
In reply to Michael RothFrom: Fam Zheng <[email protected]>
Otherwise error_callback_bh will access the already released acb.
--- block/blkdebug.c | 4 ++++ 1 file changed, 4 insertions(+)
block/blkdebug.c +4 -0
@@ -449,6 +449,10 @@ static void error_callback_bh(void *opaque)static void blkdebug_aio_cancel (BlockDriverAIOCB *blockacb) {BlkdebugAIOCB *acb =container_of (blockacb, BlkdebugAIOCB, common); +if (acb->bh) { +qemu_bh_delete (acb->bh); + acb->bh =NULL ; + }qemu_aio_release (acb); }
Signature · 1 line
1.9.1
PATCH 21/25 hostmem: set MPOL_MF_MOVE
In reply to Michael RothFrom: "Michael S. Tsirkin" <[email protected]>
When memory is allocated on a wrong node, MPOL_MF_STRICT doesn't move it - it just fails the allocation. A simple way to reproduce the failure is with mlock=on realtime feature.
The code comment actually says: "ensure policy won't be ignored" so setting MPOL_MF_MOVE seems like a better way to do this.
--- backends/hostmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
backends/hostmem.c +1 -1
@@ -304,7 +304,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)/* ensure policy won't be ignored in case memory is preallocated * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so * this doesn't catch hugepage case. */ -unsigned flags =MPOL_MF_STRICT ; +unsigned flags =MPOL_MF_STRICT |MPOL_MF_MOVE ;/* check for invalid host-nodes and policies and give more verbose * error messages than mbind(). */
Signature · 1 line
1.9.1
PATCH 23/25 pc: reserve more memory for ACPI for new machine types
In reply to Michael RothFrom: "Michael S. Tsirkin" <[email protected]>
commit 868270f23d8db2cce83e4f082fe75e8625a5fbf9
acpi-build: tweak acpi migration limits
broke kernel loading with -kernel/-initrd: it doubled the size of ACPI tables but did not reserve enough memory.
As a result, issues on boot and halt are observed.
Fix this up by doubling reserved memory for new machine types.
--- hw/i386/pc.c | 12 +++++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + include/hw/i386/pc.h | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-)
hw/i386/pc.c +9 -3
@@ -73,7 +73,12 @@#endif /* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */ -#define ACPI_DATA_SIZE 0x10000 +unsigned acpi_data_size =0x20000 ; +void pc_set_legacy_acpi_data_size (void ) +{ + acpi_data_size =0x10000 ; +} +#define BIOS_CFG_IOPORT 0x510#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
@@ -811,8 +816,9 @@ static void load_linux(FWCfgState *fw_cfg, initrd_max =0x37ffffff ; } -if (initrd_max >= max_ram_size-ACPI_DATA_SIZE ) - initrd_max = max_ram_size-ACPI_DATA_SIZE -1 ; +if (initrd_max >= max_ram_size - acpi_data_size) { + initrd_max = max_ram_size - acpi_data_size -1 ; + }fw_cfg_add_i32 (fw_cfg,FW_CFG_CMDLINE_ADDR , cmdline_addr);fw_cfg_add_i32 (fw_cfg,FW_CFG_CMDLINE_SIZE ,strlen (kernel_cmdline)+1 );
hw/i386/pc_piix.c +1 -0
@@ -318,6 +318,7 @@ static void pc_compat_2_0(MachineState *machine) legacy_acpi_table_size =6652 ; smbios_legacy_mode = true; has_reserved_memory = false; +pc_set_legacy_acpi_data_size (); }static void pc_compat_1_7 (MachineState *machine)
hw/i386/pc_q35.c +1 -0
@@ -282,6 +282,7 @@ static void pc_compat_2_0(MachineState *machine) { smbios_legacy_mode = true; has_reserved_memory = false; +pc_set_legacy_acpi_data_size (); }static void pc_compat_1_7 (MachineState *machine)
include/hw/i386/pc.h +2 -0
@@ -177,6 +177,8 @@ void pc_acpi_init(const char *default_dsdt);PcGuestInfo *pc_guest_info_init (ram_addr_t below_4g_mem_size,ram_addr_t above_4g_mem_size); +void pc_set_legacy_acpi_data_size (void ); +#define PCI_HOST_PROP_PCI_HOLE_START "pci-hole-start"#define PCI_HOST_PROP_PCI_HOLE_END "pci-hole-end"#define PCI_HOST_PROP_PCI_HOLE64_START "pci-hole64-start"
Signature · 1 line
1.9.1
PATCH 24/25 thread-pool: avoid per-thread-pool EventNotifier
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
EventNotifier is implemented using an eventfd or pipe. It therefore consumes file descriptors, which can be limited by rlimits and should therefore be used sparingly.
Switch from EventNotifier to QEMUBH in thread-pool.c. Originally EventNotifier was used because qemu_bh_schedule() was not thread-safe yet.
--- thread-pool.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-)
thread-pool.c +8 -13
@@ -21,7 +21,6 @@#include "block/coroutine.h" #include "trace.h" #include "block/block_int.h" -#include "qemu/event_notifier.h" #include "block/thread-pool.h" #include "qemu/main-loop.h"
@@ -57,8 +56,8 @@ struct ThreadPoolElement { };struct ThreadPool { -EventNotifier notifier;AioContext *ctx; +QEMUBH *completion_bh;QemuMutex lock;QemuCond check_cancel;QemuCond worker_stopped;
@@ -119,7 +118,7 @@ static void *worker_thread(void *opaque)qemu_cond_broadcast (&pool->check_cancel); } -event_notifier_set (&pool->notifier); +qemu_bh_schedule (pool->completion_bh); } pool->cur_threads--;
@@ -168,12 +167,11 @@ static void spawn_thread(ThreadPool *pool) } } -static void event_notifier_ready (EventNotifier *notifier) +static void thread_pool_completion_bh (void *opaque) { -ThreadPool *pool =container_of (notifier, ThreadPool, notifier); +ThreadPool *pool = opaque;ThreadPoolElement *elem, *next; -event_notifier_test_and_clear (notifier); restart: QLIST_FOREACH_SAFE(elem, &pool->head, all, next) {if (elem->state !=THREAD_CANCELED && elem->state !=THREAD_DONE ) {
@@ -215,7 +213,7 @@ static void thread_pool_cancel(BlockDriverAIOCB *acb) qemu_sem_timedwait(&pool->sem, 0) == 0) { QTAILQ_REMOVE(&pool->request_list, elem, reqs); elem->state = THREAD_CANCELED; - event_notifier_set(&pool->notifier); + qemu_bh_schedule(pool->completion_bh); } else { pool->pending_cancellations++;while (elem->state !=THREAD_CANCELED && elem->state !=THREAD_DONE ) {
@@ -224,7 +222,7 @@ static void thread_pool_cancel(BlockDriverAIOCB *acb) pool->pending_cancellations--; }qemu_mutex_unlock (&pool->lock); -event_notifier_ready (&pool->notifier); +thread_pool_completion_bh (pool); }static const AIOCBInfo thread_pool_aiocb_info = {
@@ -293,8 +291,8 @@ static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx) }memset (pool,0 ,sizeof (*pool)); -event_notifier_init (&pool->notifier, false); pool->ctx = ctx; + pool->completion_bh =aio_bh_new (ctx, thread_pool_completion_bh, pool);qemu_mutex_init (&pool->lock);qemu_cond_init (&pool->check_cancel);qemu_cond_init (&pool->worker_stopped);
@@ -304,8 +302,6 @@ static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)QLIST_INIT (&pool->head);QTAILQ_INIT (&pool->request_list); - -aio_set_event_notifier (ctx, &pool->notifier, event_notifier_ready); }ThreadPool *thread_pool_new (AioContext *ctx)
@@ -339,11 +335,10 @@ void thread_pool_free(ThreadPool *pool)qemu_mutex_unlock (&pool->lock); -aio_set_event_notifier (pool->ctx, &pool->notifier,NULL ); +qemu_bh_delete (pool->completion_bh);qemu_sem_destroy (&pool->sem);qemu_cond_destroy (&pool->check_cancel);qemu_cond_destroy (&pool->worker_stopped);qemu_mutex_destroy (&pool->lock); -event_notifier_cleanup (&pool->notifier);g_free (pool); }
Signature · 1 line
1.9.1
PATCH 25/25 thread-pool: avoid deadlock in nested aio_poll() calls
In reply to Michael RothFrom: Stefan Hajnoczi <[email protected]>
The thread pool has a race condition if two elements complete before thread_pool_completion_bh() runs:
If element A's callback waits for element B using aio_poll() it will deadlock since pool->completion_bh is not marked scheduled when the nested aio_poll() runs.
Fix this by marking the BH scheduled while thread_pool_completion_bh() is executing. This way any nested aio_poll() loops will enter thread_pool_completion_bh() and complete the remaining elements.
--- thread-pool.c | 6 ++++++ 1 file changed, 6 insertions(+)
thread-pool.c +6 -0
@@ -185,6 +185,12 @@ restart:QLIST_REMOVE (elem, all);/* Read state before ret. */ smp_rmb (); + +/* Schedule ourselves in case elem->common.cb() calls aio_poll() to +* wait for another request that completed at the same time. +*/ +qemu_bh_schedule (pool->completion_bh); + elem->common.cb (elem->common.opaque, elem->ret);qemu_aio_release (elem); goto restart;
Signature · 1 line
1.9.1
PATCH 14/25 target-arm: Rename QEMU PSCI v0.1 definitions
In reply to Michael RothFrom: Christoffer Dall <[email protected]>
The function IDs for PSCI v0.1 are exported by KVM and defined as KVM_PSCI_FN_<something>. To build using these defines in non-KVM code, QEMU defines these IDs locally and check their correctness against the KVM headers when those are available.
However, the naming scheme used for QEMU (almost) clashes with the PSCI v0.2 definitions from Linux so to avoid unfortunate naming when we introduce local PSCI v0.2 defines, rename the current local defines with QEMU_ prependend and clearly identify the PSCI version as v0.1 in the defines.
--- hw/arm/virt.c | 8 ++++---- target-arm/kvm-consts.h | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-)
hw/arm/virt.c +4 -4
@@ -204,10 +204,10 @@ static void fdt_add_psci_node(const VirtBoardInfo *vbi)qemu_fdt_setprop_string (fdt,"/psci" ,"method" ,"hvc" );qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_suspend" , -PSCI_FN_CPU_SUSPEND ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_off" ,PSCI_FN_CPU_OFF ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_on" ,PSCI_FN_CPU_ON ); -qemu_fdt_setprop_cell (fdt,"/psci" ,"migrate" ,PSCI_FN_MIGRATE ); +QEMU_PSCI_0_1_FN_CPU_SUSPEND ); +qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_off" ,QEMU_PSCI_0_1_FN_CPU_OFF ); +qemu_fdt_setprop_cell (fdt,"/psci" ,"cpu_on" ,QEMU_PSCI_0_1_FN_CPU_ON ); +qemu_fdt_setprop_cell (fdt,"/psci" ,"migrate" ,QEMU_PSCI_0_1_FN_MIGRATE ); } }
target-arm/kvm-consts.h +11 -11
@@ -38,17 +38,17 @@ MISMATCH_CHECK(CP_REG_SIZE_U64, KVM_REG_SIZE_U64) MISMATCH_CHECK(CP_REG_ARM, KVM_REG_ARM) MISMATCH_CHECK(CP_REG_ARCH_MASK, KVM_REG_ARCH_MASK) -#define PSCI_FN_BASE 0x95c1ba5e -#define PSCI_FN (n) (PSCI_FN_BASE + (n)) -#define PSCI_FN_CPU_SUSPEND PSCI_FN(0) -#define PSCI_FN_CPU_OFF PSCI_FN(1) -#define PSCI_FN_CPU_ON PSCI_FN(2) -#define PSCI_FN_MIGRATE PSCI_FN(3) - -MISMATCH_CHECK(PSCI_FN_CPU_SUSPEND, KVM_PSCI_FN_CPU_SUSPEND) -MISMATCH_CHECK(PSCI_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF) -MISMATCH_CHECK(PSCI_FN_CPU_ON, KVM_PSCI_FN_CPU_ON) -MISMATCH_CHECK (PSCI_FN_MIGRATE ,KVM_PSCI_FN_MIGRATE ) +#define QEMU_PSCI_0_1_FN_BASE 0x95c1ba5e +#define QEMU_PSCI_0_1_FN (n) (QEMU_PSCI_0_1_FN_BASE + (n)) +#define QEMU_PSCI_0_1_FN_CPU_SUSPEND QEMU_PSCI_0_1_FN(0) +#define QEMU_PSCI_0_1_FN_CPU_OFF QEMU_PSCI_0_1_FN(1) +#define QEMU_PSCI_0_1_FN_CPU_ON QEMU_PSCI_0_1_FN(2) +#define QEMU_PSCI_0_1_FN_MIGRATE QEMU_PSCI_0_1_FN(3) + +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_SUSPEND, KVM_PSCI_FN_CPU_SUSPEND) +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF) +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_ON, KVM_PSCI_FN_CPU_ON) +MISMATCH_CHECK (QEMU_PSCI_0_1_FN_MIGRATE ,KVM_PSCI_FN_MIGRATE )/* Note that KVM uses overlapping values for AArch32 and AArch64 * target CPU numbers. AArch32 targets:
Signature · 1 line
1.9.1
PATCH 22/25 pcihp: fix possible array out of bounds
In reply to Michael RothFrom: Gonglei <[email protected]>
Prevent out-of-bounds array access onacpi_pcihp_pci_status.
--- hw/acpi/pcihp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/acpi/pcihp.c +1 -1
@@ -231,7 +231,7 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)uint32_t val =0 ;int bsel = s->hotplug_select; -if (bsel <0 || bsel >ACPI_PCIHP_MAX_HOTPLUG_BUS ) { +if (bsel <0 || bsel >=ACPI_PCIHP_MAX_HOTPLUG_BUS ) {return 0 ; }
Signature · 1 line
1.9.1
Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages
In reply to Michael RothQuoted 8 lines · On Wed, 27 Aug 2014 12:36:03 -0500 Michael Roth <[email protected]>…
From: Jan Kiszka <[email protected]>
The spec says (and real HW confirms this) that, if the bus master bit is 0, the device will not generate any PCI accesses. MSI and MSI-X messages fall among these, so we should use the corresponding address space to deliver them. This will prevent delivery if bus master support is disabled.
Quoted 7 lines
Signed-off-by Jan Kiszka <[email protected]>Reviewed-by Michael S. Tsirkin <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>(cherry picked from commit cc943c36faa192cd4b32af8fe5edb31894017d35)Signed-off-by Michael Roth <[email protected]>---
Hi Michael,
This commit breaks virtio for spapr. A fix is available in Alex's ppc-next:
From: Greg Kurz <[email protected]>spapr_pci: map the MSI window in each PHB
https://github.com/agraf/qemu/commit/7af2868fc76857e19c232bbe9e99a95d61138213
Cheers.
--
Greg
Quoted 30 lines
hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/pci/msi.c +1
-1@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)"notify vector 0x%x" " address: 0x%" PRIx64" data: 0x%" PRIx32"\n" , vector, msg.address, msg.data); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }/* Normally called by pci_default_write_config(). */ hw/pci/msix.c +1
-1@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector) msg =msix_get_message (dev, vector); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }void msix_reset (PCIDevice *dev)
Signature · 7 lines
Gregory Kurz [email protected] [email protected] Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.
Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages
Quoting Greg Kurz (2014-08-28 05:18:06)
Quoted 18 lines
Quoted 8 lines · On Wed, 27 Aug 2014 12:36:03 -0500 Michael Roth <[email protected]>…
From: Jan Kiszka <[email protected]>
The spec says (and real HW confirms this) that, if the bus master bit is 0, the device will not generate any PCI accesses. MSI and MSI-X messages fall among these, so we should use the corresponding address space to deliver them. This will prevent delivery if bus master support is disabled.
Quoted 7 lines
Signed-off-by Jan Kiszka <[email protected]>Reviewed-by Michael S. Tsirkin <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>(cherry picked from commit cc943c36faa192cd4b32af8fe5edb31894017d35)Signed-off-by Michael Roth <[email protected]>---
Quoted 8 lines
Hi Michael,
This commit breaks virtio for spapr. A fix is available in Alex's ppc-next:
From: Greg Kurz <[email protected]>
spapr_pci: map the MSI window in each PHBhttps://github.com/agraf/qemu/commit/7af2868fc76857e19c232bbe9e99a95d61138213
Thanks, I've gone ahead and applied it. Tested virtio + pseries before/after and it seems to fix the issue.
Quoted 47 lines
Cheers.
--
GregQuoted 30 lines
hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/pci/msi.c +1
-1@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)"notify vector 0x%x" " address: 0x%" PRIx64" data: 0x%" PRIx32"\n" , vector, msg.address, msg.data); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }/* Normally called by pci_default_write_config(). */ hw/pci/msix.c +1
-1@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector) msg =msix_get_message (dev, vector); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }void msix_reset (PCIDevice *dev)Signature · 7 lines
Gregory Kurz [email protected] [email protected] Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.
Quoted 4 lines · Michael Roth
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
Quoted 9 lines
https://github.com/mdroth/qemu/commits/stable-2.1-staging
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1Please respond here or CC [email protected] on any patches you think should be included in the release.
Hi Michael,
The Patch *[PATCH V4] net: Forbid dealing with packets when VM is not running* has been reviewed by Jason Wang <[email protected]>,
Juan Quintela <[email protected]> and Michael S. Tsirkin <[email protected]>.
It is a bug fix patch, and should be include.
If you can not find this patch in your mailbox, i will send it once again:)
Thanks,
zhanghailiang
Quoted 97 lines
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-)create mode 100755 tests/qemu-iotests/101
create mode 100644 tests/qemu-iotests/101.out
Il 27/08/2014 19:35, Michael Roth ha scritto:
Quoted 4 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
Quoted 8 lines
https://github.com/mdroth/qemu/commits/stable-2.1-staging
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
These new ones just got into master yesterday:
1844e68ecabbdfdf0228774bcd5cf0f63ffc2e57 target-i386: Don't forbid NX bit on PAE PDEs and PTEs d8b5c67b05420d966664664ff287af05b884bdd1 x86: Use common variable range MTRR counts d1ae67f626c5ed5729e1d8212834291b409d26df x86: kvm: Add MTRR support for kvm_get|put_msrs() 9db2efd95e13330075bff027cd682a063d725332 x86: Clear MTRRs on vCPU reset 9db693f76441e2fc7e1b05dc454e7db4d3298dcb block/iscsi: fix memory corruption on iscsi resize 7b71758d79106a63a0b8aba02df752d9995ea50c vl: process -object after other backend options
Paolo
Quoted 8 lines · Michael Roth
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
https://github.com/mdroth/qemu/commits/stable-2.1-staging
The release is planned for 2014-09-08:
Quoted 8 lines
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
A bunch of other patches Cc stable were merged upstream since then - could you please send an update of what's in?
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3 spapr_pci: map the MSI window in each PHB
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang) [PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: Set FORCE_APIC_CLUSTER_MODEL bit for FADT flags (zhanghailiang) [RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's tree
Let me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Quoted 20 lines · Michael Roth
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHB
Quoted 7 lines
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang)
this is also in that pull
Quoted 3 lines
[PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang)
hmm I forgot to include that one. I'll redo the pull request.
Quoted 112 lines
[RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's treeLet me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Quoted 29 lines · Michael S. Tsirkin
Quoted 20 lines · Michael Roth
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHBQuoted 7 lines
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang)
Quoted 7 lines
this is also in that pull
Quoted 3 lines
[PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang)hmm I forgot to include that one. I'll redo the pull request.
or maybe not
I recalled why I didn't include it - I wanted someone else to review it first
if it's ready, I'll send it separately tomorrow
Quoted 112 lines
Quoted 112 lines
[RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's treeLet me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Quoted 36 lines · Michael S. Tsirkin
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines · Michael Roth
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHBQuoted 7 lines
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang)this is also in that pull
Quoted 3 lines
[PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang)
Quoted 122 lines
Quoted 1 line
hmm I forgot to include that one. I'll redo the pull request.
or maybe not
I recalled why I didn't include it - I wanted someone else to review it firstif it's ready, I'll send it separately tomorrow
Quoted 112 lines
Quoted 112 lines
[RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's treeLet me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Hi, I`ve got assertion failure while testing upcoming tree with net patches applied after start - boot - reset cycle of an i686 VM.
qemu-system-x86_64:/tmp/buildd/qemu-2.1.0+f1/hw/net/virtio-net.c:1543:virtio_net_guest_notifier_mask: Assertion `n->vhost_started' failed.
net patches applied:
383004 New [V4] net: Forbid dealing with packets when VM is not zhiang 385148 New net: prevent sending packets while guest is stopped 385177 New [PULL,09/13] vhost_net: cleanup start/stop condition 385180 New [PULL,11/13] virtio-net: don't run bh on vm stopped 385179 New [PULL,12/13] pci: avoid losing config updates to
MSI/MSIX cap regs
385181 New [PULL,13/13] vhost_net: start/stop guest notifiers properly
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properly
Quoting Andrey Korolyov (2014-09-02 12:33:13)
Quoted 161 lines · Michael S. Tsirkin
Quoted 36 lines · Michael S. Tsirkin
Quoted 35 lines · Michael Roth
Quoted 20 lines
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHBQuoted 7 lines
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang)this is also in that pull
Quoted 3 lines
[PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang)Quoted 122 lines
Quoted 1 line
hmm I forgot to include that one. I'll redo the pull request.
or maybe not
I recalled why I didn't include it - I wanted someone else to review it firstif it's ready, I'll send it separately tomorrow
Quoted 112 lines
Quoted 112 lines
[RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's treeLet me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Quoted 2 lines
Hi, I`ve got assertion failure while testing upcoming tree with net patches applied after start - boot - reset cycle of an i686 VM.
Thanks for testing! Is this a consistent failure? I'm unable to reproduce with current 2.1.1 tree with these applied:
0d33fef vhost_net: start/stop guest notifiers properly 27066b6 pci: avoid losing config updates to MSI/MSIX cap regs 64a953a virtio-net: don't run bh on vm stopped 1dcb588 vhost_net: cleanup start/stop condition
I haven't tested with these but I don't see them coming into play in this scenario:
383004 New [V4] net: Forbid dealing with packets when VM is not zhiang
385148 New net: prevent sending packets while guest is stopped
I'm running a 32-bit fedora 15 guest via qemu x86_64, and confirmed vhost is being started/stopped on each boot/reset. My command-line is:
./x86_64-softmmu/qemu-system-x86_64 -drive file=/home/mdroth/vm/fedora15_32.raw,if=virtio -smp 1 -m 512M -name vm3 -device virtio-net-pci,mac=52:54:00:12:34:03,netdev=netdev0,id=net0 -netdev tap,script=/etc/qemu-ifup,vhost=on,id=netdev0 -vnc :3 -device virtio-serial -balloon virtio -mon chardev=hmp0 -chardev socket,path=/tmp/vm3-hmp0.sock,server,nowait,id=hmp0 -mon chardev=qmp0,mode=control -chardev socket,path=/tmp/vm3-qmp0.sock,server,nowait,id=qmp0 -device virtserialport,chardev=vs0,name=vs0 -chardev socket,path=/tmp/vm3-vs0.sock,server,nowait,id=vs0 -device virtserialport,chardev=vs1,name=vs1 -chardev socket,path=/tmp/vm3-vs1.sock,server,nowait,id=vs1 -device virtserialport,chardev=qga,name=org.qemu.guest_agent.0 -chardev socket,path=/tmp/vm3-qga.sock,server,nowait,id=qga -device isa-serial,chardev=serial0 -chardev socket,path=/tmp/vm3-serial0.sock,server,nowait,id=serial0 -L ./pc-bios --enable-kvm
I've tried rebooting from within the guest as well as system_reset via hmp and it doesn't seem to trigger on my end.
Quoted 20 lines
qemu-system-x86_64:
/tmp/buildd/qemu-2.1.0+f1/hw/net/virtio-net.c:1543:virtio_net_guest_notifier_mask: Assertion `n->vhost_started' failed.net patches applied:
383004 New [V4] net: Forbid dealing with packets when VM is not zhiang 385148 New net: prevent sending packets while guest is stopped 385177 New [PULL,09/13] vhost_net: cleanup start/stop condition 385180 New [PULL,11/13] virtio-net: don't run bh on vm stopped 385179 New [PULL,12/13] pci: avoid losing config updates toMSI/MSIX cap regs
385181 New [PULL,13/13]vhost_net: start/stop guest notifiers properlybad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properly
Quoted 177 lines · Andrey Korolyov
Quoted 36 lines · Michael S. Tsirkin
Quoted 35 lines · Michael S. Tsirkin
Quoted 20 lines · Michael Roth
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHBQuoted 7 lines
The following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang)this is also in that pull
Quoted 3 lines
[PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang)Quoted 122 lines
Quoted 1 line
hmm I forgot to include that one. I'll redo the pull request.
or maybe not
I recalled why I didn't include it - I wanted someone else to review it firstif it's ready, I'll send it separately tomorrow
Quoted 112 lines
Quoted 112 lines
[RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's treeLet me know if anything is missing.
Quoted 101 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.outHi, I`ve got assertion failure while testing upcoming tree with net patches applied after start - boot - reset cycle of an i686 VM.
qemu-system-x86_64:
/tmp/buildd/qemu-2.1.0+f1/hw/net/virtio-net.c:1543:virtio_net_guest_notifier_mask: Assertion `n->vhost_started' failed.net patches applied:
383004 New [V4] net: Forbid dealing with packets when VM is not zhiang 385148 New net: prevent sending packets while guest is stopped 385177 New [PULL,09/13] vhost_net: cleanup start/stop condition 385180 New [PULL,11/13] virtio-net: don't run bh on vm stopped 385179 New [PULL,12/13] pci: avoid losing config updates toMSI/MSIX cap regs
385181 New [PULL,13/13]vhost_net: start/stop guest notifiers properly
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properly
upstream has this (pull request sent today):vhost_net: cleanup start/stop condition
Could you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
Signature · 1 line
MST
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properly
Quoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 18 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
Quoted 9 lines
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
ok just to make sure - which tree do I clone exactly?
Quoting Andrey Korolyov (2014-09-02 16:29:29)
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyupstream has this (pull request sent today):
vhost_net: cleanup start/stop condition
Quoted 8 lines
Quoted 4 lines
Could you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are
I also had it applied. Not sure what the main difference is with our setups, but can't seem to reproduce it on my end. Also tried FC18 64-bit.
I have only 2.1.1 + the 4 commits mentioned in my previous email however, so it may be worth retrying your test with only those applied as a sanity check, or even just testing Michael's tree directly to confirm that the right commit.
Quoted 6 lines
a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 31 lines · Michael S. Tsirkin
Quoted 18 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
Quoted 9 lines
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...
Okay, so there's some bug in the error handling then. I'll dig into it - meanwhile can you please strace the binary to figure out which ioctl is failing?
Or just trace it by hand: I am guessing vhost_net_start_one is the one failing here, add printfs there and check (note to self: we need more error messages in that function).
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...
Also - does it work fine if you disable mq?
Quoted 45 lines · Michael S. Tsirkin
Quoted 34 lines · Andrey Korolyov
Quoted 29 lines · Andrey Korolyov
Quoted 28 lines · Michael S. Tsirkin
Quoted 25 lines · Andrey Korolyov
Quoted 8 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 4 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...
Quoted 9 lines
Okay, so there's some bug in the error handling then. I'll dig into it - meanwhile can you please strace the binary to figure out which ioctl is failing?
Or just trace it by hand: I am guessing
vhost_net_start_oneis the one failing here, add printfs there and check (note to self: we need more error messages in that function).
Looks like the issue was caused by this commit:
commit 2e6d46d77ed328d34a94688da8371bcbe243479b
Author: Nikolay Nikolaev <[email protected]> Date: Tue May 27 15:04:42 2014 +0300
vhost: add vhost_get_features and vhost_ack_features
It remove the step of initialization of acked_features to backend_features. This will result a unexpected value acked_features which may fail during setting features.
Will post a patch for this.
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...
OK I see at least one obvious bug there: does the following fix the crash for you?
Separately, we need to debug why mq vhost is broken for you. Is this a regression?
hw/net/vhost_net.c +9 -3
@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,BusState *qbus =BUS (qdev_get_parent_bus (DEVICE (dev)));VirtioBusState *vbus =VIRTIO_BUS (qbus);VirtioBusClass *k =VIRTIO_BUS_GET_CLASS (vbus); -int r, i =0 ; +int r, i;if (!vhost_net_device_endian_ok (dev)) {error_report ("vhost-net does not support cross-endian" );
@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { - goto err; + goto err_start; } }return 0 ; -err: +err_start:while (--i >=0 ) {vhost_net_stop_one (get_vhost_net (ncs[i].peer), dev); } +err: + r = k->set_guest_notifiers (qbus->parent, total_queues *2 , false); +if (r <0 ) { +fprintf (stderr,"vhost guest notifier cleanup failed: %d\n" , r); +fflush (stderr); + }return r; }
Quoted 85 lines · Michael S. Tsirkin
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...OK I see at least one obvious bug there: does the following fix the crash for you?
Separately, we need to debug why mq vhost is broken for you. Is this a regression?hw/net/vhost_net.c +3
-3@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,BusState *qbus =BUS (qdev_get_parent_bus (DEVICE (dev)));VirtioBusState *vbus =VIRTIO_BUS (qbus);VirtioBusClass *k =VIRTIO_BUS_GET_CLASS (vbus); -int r, i =0 ; +int r, i;if (!vhost_net_device_endian_ok (dev)) {error_report ("vhost-net does not support cross-endian" );@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { - goto err; + goto err_start; } }return 0 ; -err: +err_start:while (--i >=0 ) {vhost_net_stop_one (get_vhost_net (ncs[i].peer), dev);
hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 338
Quoted 10 lines
hw/net/vhost_net.c +6
-0} +err: + r = k->set_guest_notifiers (qbus->parent, total_queues *2 , false); +if (r <0 ) { +fprintf (stderr,"vhost guest notifier cleanup failed: %d\n" , r); +fflush (stderr); + }return r; }
another bits of information:
- the userspace fallback is not specific to mq (very unfortunately
for me because I didn`t checked this exact regression week before when I saw it for mq and it is not specific for queued patches for 2.1.1),
- bug itself is not specific to mq, reproduces every time even with
more generic interface config without queues,
- patch from above does not fix the issue.
Strace output for all threads is available at
http://xdel.ru/downloads/qemu.out.gz, attached just before reset.
Quoted 106 lines · Andrey Korolyov
Quoted 85 lines · Michael S. Tsirkin
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...OK I see at least one obvious bug there: does the following fix the crash for you?
Separately, we need to debug why mq vhost is broken for you. Is this a regression?hw/net/vhost_net.c +3
-3@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,BusState *qbus =BUS (qdev_get_parent_bus (DEVICE (dev)));VirtioBusState *vbus =VIRTIO_BUS (qbus);VirtioBusClass *k =VIRTIO_BUS_GET_CLASS (vbus); -int r, i =0 ; +int r, i;if (!vhost_net_device_endian_ok (dev)) {error_report ("vhost-net does not support cross-endian" );@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { - goto err; + goto err_start; } }return 0 ; -err: +err_start:while (--i >=0 ) {vhost_net_stop_one (get_vhost_net (ncs[i].peer), dev);hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 338
Quoted 10 lines
hw/net/vhost_net.c +6
-0} +err: + r = k->set_guest_notifiers (qbus->parent, total_queues *2 , false); +if (r <0 ) { +fprintf (stderr,"vhost guest notifier cleanup failed: %d\n" , r); +fflush (stderr); + }return r; }another bits of information:
- the userspace fallback is not specific to mq (very unfortunately
for me because I didn`t checked this exact regression week before when I saw it for mq and it is not specific for queued patches for 2.1.1),
- bug itself is not specific to mq, reproduces every time even with
more generic interface config without queues,
- patch from above does not fix the issue.
Quoted 2 lines
Strace output for all threads is available at
http://xdel.ru/downloads/qemu.out.gz, attached just before reset.
OK does my patch help?
Jason sent patches to fix the fallback to virtio bug - does that work for you?
Quoted 112 lines · Michael S. Tsirkin
Quoted 106 lines · Andrey Korolyov
Quoted 85 lines · Michael S. Tsirkin
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...OK I see at least one obvious bug there: does the following fix the crash for you?
Separately, we need to debug why mq vhost is broken for you. Is this a regression?hw/net/vhost_net.c +3
-3@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,BusState *qbus =BUS (qdev_get_parent_bus (DEVICE (dev)));VirtioBusState *vbus =VIRTIO_BUS (qbus);VirtioBusClass *k =VIRTIO_BUS_GET_CLASS (vbus); -int r, i =0 ; +int r, i;if (!vhost_net_device_endian_ok (dev)) {error_report ("vhost-net does not support cross-endian" );@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { - goto err; + goto err_start; } }return 0 ; -err: +err_start:while (--i >=0 ) {vhost_net_stop_one (get_vhost_net (ncs[i].peer), dev);hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 338
Quoted 10 lines
hw/net/vhost_net.c +6
-0} +err: + r = k->set_guest_notifiers (qbus->parent, total_queues *2 , false); +if (r <0 ) { +fprintf (stderr,"vhost guest notifier cleanup failed: %d\n" , r); +fflush (stderr); + }return r; }another bits of information:
- the userspace fallback is not specific to mq (very unfortunately
for me because I didn`t checked this exact regression week before when I saw it for mq and it is not specific for queued patches for 2.1.1),
- bug itself is not specific to mq, reproduces every time even with
more generic interface config without queues,
- patch from above does not fix the issue.Quoted 2 lines
Strace output for all threads is available at
http://xdel.ru/downloads/qemu.out.gz, attached just before reset.
Quoted 5 lines
OK does my patch help?
Jason sent patches to fix the fallback to virtio bug - does that work for you?
Whoops, missed patch from Jason, meant yours above. The acceleration is fixed, thanks! Jason`s patch alone fixes both crash appearance and accel initialization while yours fixed initialization (while intended to fix assert appearance), with crash still in place.
Quoted 115 lines · Andrey Korolyov
Quoted 114 lines · Michael S. Tsirkin
Quoted 106 lines · Andrey Korolyov
Quoted 85 lines · Michael S. Tsirkin
Quoted 39 lines · Andrey Korolyov
Quoted 32 lines · Andrey Korolyov
Quoted 31 lines · Michael S. Tsirkin
Quoted 27 lines · Andrey Korolyov
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyQuoted 7 lines
upstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionCould you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are a bit interesting - VM crashes only at PCI device initalization (e.g. grub stage after reset and initrd unpacking are passing well, but then things getting ugly). I am running 3.14 guest i686-pae kernel from debian backports in guest, so it may be version-specific after all. If it`ll be hard to reproduce, I can try 64bit, expecting same behavior. Please find args in attached file.
Quoted 5 lines
Quoted 2 lines
ok just to make sure - which tree do I clone exactly?
https://github.com/mdroth/qemu.git stable-2.1-staging showing same behavior for me with those patches
Quoted 10 lines
Forgot to mention important detail - I am playing with -mq now, so actually virtio-net working in a bit different way than it may expected (it also shown in args list from above, but someone may miss it):
...
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
qemu-system-x86_64: unable to start vhost net: 95: falling back on userspace virtio
...OK I see at least one obvious bug there: does the following fix the crash for you?
Separately, we need to debug why mq vhost is broken for you. Is this a regression?hw/net/vhost_net.c +3
-3@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,BusState *qbus =BUS (qdev_get_parent_bus (DEVICE (dev)));VirtioBusState *vbus =VIRTIO_BUS (qbus);VirtioBusClass *k =VIRTIO_BUS_GET_CLASS (vbus); -int r, i =0 ; +int r, i;if (!vhost_net_device_endian_ok (dev)) {error_report ("vhost-net does not support cross-endian" );@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { - goto err; + goto err_start; } }return 0 ; -err: +err_start:while (--i >=0 ) {vhost_net_stop_one (get_vhost_net (ncs[i].peer), dev);hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 338
Quoted 10 lines
hw/net/vhost_net.c +6
-0} +err: + r = k->set_guest_notifiers (qbus->parent, total_queues *2 , false); +if (r <0 ) { +fprintf (stderr,"vhost guest notifier cleanup failed: %d\n" , r); +fflush (stderr); + }return r; }another bits of information:
- the userspace fallback is not specific to mq (very unfortunately
for me because I didn`t checked this exact regression week before when I saw it for mq and it is not specific for queued patches for 2.1.1),
- bug itself is not specific to mq, reproduces every time even with
more generic interface config without queues,
- patch from above does not fix the issue.Quoted 2 lines
Strace output for all threads is available at
http://xdel.ru/downloads/qemu.out.gz, attached just before reset.OK does my patch help?
Quoted 8 lines
Quoted 3 lines
Jason sent patches to fix the fallback to virtio bug - does that work for you?
Whoops, missed patch from Jason, meant yours above. The acceleration is fixed, thanks! Jason`s patch alone fixes both crash appearance and accel initialization while yours fixed initialization (while intended to fix assert appearance),
OK so my patch fixes initialization likely by luck.
Quoted 1 line
with crash still in place.
Hmm so something is still wrong with the userspace path. Could you please apply this debugging patch on top of all the stack that is now working for you, and see if assert still surfaces?
hw/net/vhost_net.c +4 -1
@@ -314,7 +314,10 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, }for (i =0 ; i < total_queues; i++) { - r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev); +if (i >0 ) + r =-11 ; +else + r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { goto err_start;
Quoted 18 lines
OK so my patch fixes initialization likely by luck.
Quoted 1 line
with crash still in place.
Hmm so something is still wrong with the userspace path. Could you please apply this debugging patch on top of all the stack that is now working for you, and see if assert still surfaces?
hw/net/vhost_net.c +0
-0@@ -314,7 +314,10 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, }
hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 323
Quoted 10 lines
hw/net/vhost_net.c +4
-1for (i =0 ; i < total_queues; i++) { - r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev); +if (i >0 ) + r =-11 ; +else + r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);if (r <0 ) { goto err_start;
Yes, with Jasons patch on the top and this one both acceleration and re-initialization after reboot are broken, assert firing up again. Will check if vhost_net: cleanup recovery works as intended and reply to patch thread.
Quoted 25 lines · Andrey Korolyov
Quoted 25 lines
OK so my patch fixes initialization likely by luck.
Quoted 1 line
with crash still in place.
Hmm so something is still wrong with the userspace path. Could you please apply this debugging patch on top of all the stack that is now working for you, and see if assert still surfaces?
hw/net/vhost_net.c +4
-1@@ -314,7 +314,10 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, }for (i =0 ; i < total_queues; i++) { - r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev); +if (i >0 ) + r =-11 ; +else + r =vhost_net_start_one (get_vhost_net (ncs[i].peer), dev);
Quoted 8 lines
hw/net/vhost_net.c int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, · line 323
Quoted 3 lines
hw/net/vhost_net.c +0
-0if (r <0 ) { goto err_start;Yes, with Jason
s patch on the top and this one both acceleration and re-initialization after reboot are broken, assert firing up again. Will check if vhost_net: cleanup recovery works as intended and reply to patchthread.
Please test v2 though - Jason found a bug in v1.
Thanks!
Quoted 23 lines · Michael Roth
Quoting Andrey Korolyov (2014-09-02 16:29:29)
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyupstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionQuoted 8 lines
Quoted 4 lines
Could you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are
Quoted 7 lines
I also had it applied. Not sure what the main difference is with our setups, but can't seem to reproduce it on my end. Also tried FC18 64-bit.
I have only 2.1.1 + the 4 commits mentioned in my previous email however, so it may be worth retrying your test with only those applied as a sanity check, or even just testing Michael's tree directly to confirm that the right commit.
I replaced Jason's patch with one including a fix, sent pull requests with all new patches that need to be in 2.1.1 Cc to stable.
I know Stefan has important fixes for migration in his tree as well.
I suspect we'll have to push freeze off by a day or maybe two.
Quoting Michael S. Tsirkin (2014-09-03 12:57:24)
Quoted 32 lines · Michael Roth
Quoted 23 lines
Quoting Andrey Korolyov (2014-09-02 16:29:29)
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines
Quoted 6 lines
bad one is the
Author: Jason Wang <[email protected]> Date: Tue Sep 2 18:07:46 2014 +0300
vhost_net: start/stop guest notifiers properlyupstream has this (pull request sent today):
vhost_net: cleanup start/stop conditionQuoted 8 lines
Quoted 4 lines
Could you apply it and see if it helps please?
Michael, if it helps it should be before start/stop guest notifiers ideally to avoid bisect problems.
It is already applied as shown from the list in the previous message (there are some aio fixes too on top of 2.1 I picked before but they should not impact vhost-net interaction in any mean). The symptoms are
Quoted 7 lines
I also had it applied. Not sure what the main difference is with our setups, but can't seem to reproduce it on my end. Also tried FC18 64-bit.
I have only 2.1.1 + the 4 commits mentioned in my previous email however, so it may be worth retrying your test with only those applied as a sanity check, or even just testing Michael's tree directly to confirm that the right commit.
Quoted 6 lines
I replaced Jason's patch with one including a fix, sent pull requests with all new patches that need to be in 2.1.1 Cc to stable.
I know Stefan has important fixes for migration in his tree as well.
AFAIK that would be these?
virtio-net: don't run bh on vm stopped
net: Forbid dealing with packets when VM is not running
net: prevent sending packets while guest is stopped
Quoted 2 lines
I suspect we'll have to push freeze off by a day or maybe two.
Okay, let's play it by ear then. If there's anything pending by EOD Thursday (CDT) though we'll need to push out the 2.1.1 release accordingly.
Quoting Michael Roth (2014-09-02 10:20:50)
Quoted 39 lines
Quoting Michael Roth (2014-08-27 12:35:57)
Quoted 5 lines
Hi everyone,
The following new patches are queued for QEMU stable v2.1.1:
As of now the following additional patches have been applied to the 2.1.1 staging tree (see stable commit for upstream commit ref):
a7f9ea2 qxl-render: add more sanity checks
1511595 target-arm: Correct Cortex-A57 ISAR5 and AA64ISAR0 ID register values 44a1530 target-arm: Fix regression that disabled VFP for ARMv5 CPUs 95dcaa4 x86: Clear MTRRs on vCPU reset
7fd25d3 x86: kvm: Add MTRR support for kvm_get|put_msrs() 0f9c63b x86: Use common variable range MTRR counts
0c69595 target-i386: Don't forbid NX bit on PAE PDEs and PTEs 89713cb vl: process -object after other backend options
93dcbd3spapr_pci: map the MSI window in each PHBThe following patches have been Cc'd to qemu-stable and are still pending upstream commit/merge:
[PATCH] virtio-net: don't run bh on vm stopped (Michael S. Tsirkin)
* pull just sent by Michael Tsirkin
[PATCH] net: prevent sending packets while guest is stopped (Stefan Hajnoczi) [PATCH v2 2/4] pci: Avoid losing config updates to MSI/MSIX cap regs (Knut Omang) [PATCH V4] net: Forbid dealing with packets when VM is not running (zhanghailiang)
* looks like Stefan has this queued for net
[PATCH V2] acpi-build: SetFORCE_APIC_CLUSTER_MODELbit for FADT flags (zhanghailiang) [RESEND v2 0/3] Fix some memory leaks about query memdev (Chen Fan)
* looks like Michael Tokarev has this queued for trivial
[PATCH] target-i386: Support migratable=no properly (Eduardo Habkost)
* pinged
[PATCH 1/3] pc: Fix disabling of vapic for compat PC models (Jan Kiszka)
* pinged
[PATCH] pty: Fix byte loss bug when connecting to pty (Sebastian Tanase)
* pinged, presumably going through Gerd's tree
Quoted 1 line
Let me know if anything is missing.
As of now the following new patches have been pushed to 2.1.1 staging:
c15be66 virtio-net: purge outstanding packets when starting vhost 0e913ff net: complete all queued packets on VM stop 6c4dad0 net: invoke callback when purging queue
20f2829 virtio: don't call device on !vm_running
1f6582a net: Forbid dealing with packets when VM is not running b5d285f acpi-build: Set FORCE_APIC_CLUSTER_MODEL bit for FADT flags 403899e vhost-scsi: init backend features earlier 2807e70 vhost_net: init acked_features to backend_features f0b0a90 vhost_net: start/stop guest notifiers properly 1838f13 pci: avoid losing config updates to MSI/MSIX cap regs 8013d1f virtio-net: don't run bh on vm stopped
Currently holding on the following, which look like they'll
be going in soon. Will update 2.1.1 release date once they
do, but looking like it's gonna get pushed to at least Wednesday:
[CVE-2014-3615 PATCH v2 0/3] vbe: bochs dispi interface fixes
* Gerd planning on sending a PULL friday.
target-i386: Support migratable=no properly
* Andreas' "QOM CPUState" PULL was dropped, should be in next one
Will pull these in if they come in soon enough (I'll hold on them if we think any are blockers but anything pending past friday EOD will push the release out further):
qdev: Use NULL instead of local_err for qbus_child unrealize
qdev: Add cleanup logic in device_set_realized() to avoid resource leak
* both in Andreas' "QOM devices" pull
hw/machine: Free old values of string properties
virtio-pci: fix virtio-net child refcount in transports
* Michael or Andreas?
Anything else?
Quoted 102 lines
Quoted 102 lines
The release is planned for 2014-09-08:
http://wiki.qemu.org/Planning/2.1
Please respond here or CC [email protected] on any patches you think should be included in the release.
Testing/feedback is greatly appreciated.
Thanks!
----------------------------------------------------------------
Alex Williamson (1):
vfio: Fix MSI-X vector expansionBen Draper (1):
vmxnet3: Pad short frames to minimum size (60 bytes)Christoffer Dall (2):
target-arm: Rename QEMU PSCI v0.1 definitions
arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2Fam Zheng (1):
blkdebug: Delete BH inbdrv_aio_cancelGonglei (1):
pcihp: fix possible array out of boundsHu Tao (3):
hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE pc-dimm: validate node property numa: show hex number in error message for consistency and prefix them with 0xJan Kiszka (1):
pci: Use bus master address space for delivering MSI/MSI-X messagesMichael S. Tsirkin (4):
pc-dimm: fix up error message
acpi: align RSDP
hostmem: setMPOL_MF_MOVE
pc: reserve more memory for ACPI for new machine typesMichael Tokarev (2):
l2tpv3 (configure): it is linux-specific
ide: only constrain read/write requests to drive size, not other typesPeter Lieven (1):
block/iscsi: fix memory corruption on iscsi resizePeter Maydell (1):
target-arm: Fix return address for A64 BRK instructionsStefan Hajnoczi (6):
qmp: hide "hotplugged" device property from device-list-properties
qdev-monitor: include QOM properties in -device FOO, help output
raw-posix: fixO_DIRECTshort reads
qemu-iotests: add test case 101 for short file I/O
thread-pool: avoid per-thread-pool EventNotifier
thread-pool: avoid deadlock in nestedaio_poll()callszhanghailiang (1):
virtio-blk: fix reference a pointer which might be freedbackends/hostmem.c | 2 +- block/blkdebug.c | 4 +++ block/iscsi.c | 3 ++- block/raw-posix.c | 9 +++++++ configure | 1 + hw/acpi/pcihp.c | 2 +- hw/arm/virt.c | 31 ++++++++++++++++++---- hw/block/virtio-blk.c | 3 ++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt.dsl | 4 +-- hw/i386/acpi-dsdt.hex.generated | 8 +++--- hw/i386/pc.c | 12 ++++++--- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/i386/q35-acpi-dsdt.dsl | 4 +-- hw/i386/ssdt-mem.dsl | 16 ++++++------ hw/i386/ssdt-misc.dsl | 2 +- hw/ide/core.c | 3 ++- hw/mem/pc-dimm.c | 6 +++++ hw/misc/vfio.c | 38 ++++++++++++++++++++------- hw/net/vmxnet3.c | 10 +++++++ hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- include/hw/acpi/pc-hotplug.h | 2 +- include/hw/i386/pc.h | 2 ++ numa.c | 4 +-- qdev-monitor.c | 40 ++++++++++++---------------- qmp.c | 1 + target-arm/kvm-consts.h | 49 ++++++++++++++++++++++++++-------- target-arm/translate-a64.c | 2 +- tests/qemu-iotests/101 | 58 +++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/101.out | 10 +++++++ tests/qemu-iotests/group | 1 + thread-pool.c | 27 ++++++++++--------- 34 files changed, 269 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/101 create mode 100644 tests/qemu-iotests/101.out
Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages
In reply to Michael RothQuoted 23 lines · On Thu, 28 Aug 2014 09:39:30 -0500 Michael Roth <[email protected]>…
Quoting Greg Kurz (2014-08-28 05:18:06)
Quoted 22 lines
Quoted 8 lines · On Wed, 27 Aug 2014 12:36:03 -0500 Michael Roth <[email protected]>…
From: Jan Kiszka <[email protected]>
The spec says (and real HW confirms this) that, if the bus master bit is 0, the device will not generate any PCI accesses. MSI and MSI-X messages fall among these, so we should use the corresponding address space to deliver them. This will prevent delivery if bus master support is disabled.
Quoted 7 lines
Signed-off-by Jan Kiszka <[email protected]>Reviewed-by Michael S. Tsirkin <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>(cherry picked from commit cc943c36faa192cd4b32af8fe5edb31894017d35)Signed-off-by Michael Roth <[email protected]>---
Hi Michael,
This commit breaks virtio for spapr. A fix is available in Alex's ppc-next:
Quoted 8 lines
Quoted 4 lines
From: Greg Kurz <[email protected]>
spapr_pci: map the MSI window in each PHBhttps://github.com/agraf/qemu/commit/7af2868fc76857e19c232bbe9e99a95d61138213
Thanks, I've gone ahead and applied it. Tested virtio + pseries before/after and it seems to fix the issue.
Michael,
We have a problem again with pseries guests...
Since commit cc943c36faa192cd4b32af8fe5edb31894017d35 was not applied to stable, virtio PCI devices notify through the global address space. Unfortunately, commit 7af2868fc76857e19c232bbe9e99a95d61138213 removes the MSI window from the global address space...
The result is that 2.1.1 is broken for pseries using virtio... Reverting 0824ca6bd126b97fac18d12d514823463f415bec from stable fixes the issue. I guess we should do that and try again when we have it all fixed in master.
Sorry for not having anticipated that for 2.1.1... :-\
Cheers.
--
Greg
Quoted 47 lines
Quoted 47 lines
Cheers.
--
GregQuoted 30 lines
hw/pci/msi.c | 2 +- hw/pci/msix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/pci/msi.c +1
-1@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)"notify vector 0x%x" " address: 0x%" PRIx64" data: 0x%" PRIx32"\n" , vector, msg.address, msg.data); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }/* Normally called by pci_default_write_config(). */ hw/pci/msix.c +1
-1@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector) msg =msix_get_message (dev, vector); -stl_le_phys (&address_space_memory, msg.address, msg.data); +stl_le_phys (&dev->bus_master_as, msg.address, msg.data); }void msix_reset (PCIDevice *dev)Signature · 7 lines
Gregory Kurz [email protected] [email protected] Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.