Hello community, here is the log from the commit of package kvm for openSUSE:11.3 checked in at Thu May 19 01:04:54 CEST 2011.
-------- --- old-versions/11.3/UPDATES/all/kvm/kvm.changes 2010-10-06 00:01:48.000000000 +0200 +++ 11.3/kvm/kvm.changes 2011-05-18 17:55:02.000000000 +0200 @@ -1,0 +2,6 @@ +Thu May 12 20:02:17 UTC 2011 - [email protected] + +- enforce sector granularity in virtio-blk (bnc#689895) +- don't allow hot unplug for certain devices (bnc#690781) + +------------------------------------------------------------------- calling whatdependson for 11.3-i586 New: ---- kvm-qemu-no-hot-unplug-for-certain-devices.patch kvm-qemu-preXX-virtio-blk-fail-unaligned-requests.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kvm.spec ++++++ --- /var/tmp/diff_new_pack.a1CO2j/_old 2011-05-19 01:04:31.000000000 +0200 +++ /var/tmp/diff_new_pack.a1CO2j/_new 2011-05-19 01:04:31.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package kvm (Version 0.12.5) +# spec file for package kvm # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -77,7 +77,7 @@ Summary: Kernel-based Virtual Machine Url: http://kvm.qumranet.com/ Version: 0.12.5 -Release: 1.<RELEASE1> +Release: 1.<RELEASE4> Source0: qemu-%{name}-%{version}.tar.bz2 Source1: 60-kvm.rules Source2: qemu-ifup @@ -132,6 +132,8 @@ Patch119: kvm-qemu-pre0.13-flush-unsafe-snapshot.patch Patch120: kvm-qemu-preXX-move-unsafe-to-end-of-caching-modes-in-help.patch Patch121: kvm-qemu-preXX-report-default-mac-used.patch +Patch122: kvm-qemu-preXX-virtio-blk-fail-unaligned-requests.patch +Patch123: kvm-qemu-no-hot-unplug-for-certain-devices.patch Patch200: kvm-studio-slirp-nooutgoing.patch Patch201: kvm-studio-vnc.patch @@ -244,6 +246,8 @@ %patch119 -p1 %patch120 -p1 %patch121 -p1 +%patch122 -p1 +%patch123 -p1 # Studio addons %patch200 -p1 ++++++ kvm-qemu-no-hot-unplug-for-certain-devices.patch ++++++ This patch is in the spirit of upstream fixes which exclude certain devices from taking part in hot-unplug handling, specifically those which do not have complete hot-unplug handling, and for which we do not want to even try to allow hot-unplug. See bnc#690781. Signed-off-by: Bruce Rogers <[email protected] Index: qemu-kvm-0.12.5/hw/acpi.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/acpi.c +++ qemu-kvm-0.12.5/hw/acpi.c @@ -720,7 +720,8 @@ static void pciej_write(void *opaque, ui QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) { dev = DO_UPCAST(PCIDevice, qdev, qdev); - if (PCI_SLOT(dev->devfn) == slot) { + if (PCI_SLOT(dev->devfn) == slot && (qdev->info == NULL || + !qdev->info->no_hotplug)) { qdev_free(qdev); } } Index: qemu-kvm-0.12.5/hw/vga-pci.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/vga-pci.c +++ qemu-kvm-0.12.5/hw/vga-pci.c @@ -131,6 +131,7 @@ static PCIDeviceInfo vga_info = { .qdev.name = "VGA", .qdev.size = sizeof(PCIVGAState), .qdev.vmsd = &vmstate_vga_pci, + .qdev.no_hotplug = 1, .init = pci_vga_initfn, .config_write = pci_vga_write_config, .qdev.props = (Property[]) { Index: qemu-kvm-0.12.5/hw/qdev.h =================================================================== --- qemu-kvm-0.12.5.orig/hw/qdev.h +++ qemu-kvm-0.12.5/hw/qdev.h @@ -128,6 +128,8 @@ struct DeviceInfo { size_t size; Property *props; int no_user; + /* Kludge! for use with hot-unplug unsafe pci devices only: */ + int no_hotplug; /* callbacks */ qdev_resetfn reset; Index: qemu-kvm-0.12.5/hw/cirrus_vga.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/cirrus_vga.c +++ qemu-kvm-0.12.5/hw/cirrus_vga.c @@ -3242,6 +3242,7 @@ static PCIDeviceInfo cirrus_vga_info = { .qdev.desc = "Cirrus CLGD 54xx VGA", .qdev.size = sizeof(PCICirrusVGAState), .qdev.vmsd = &vmstate_pci_cirrus_vga, + .qdev.no_hotplug = 1, .init = pci_cirrus_vga_initfn, .romfile = VGABIOS_CIRRUS_FILENAME, .config_write = pci_cirrus_write_config, Index: qemu-kvm-0.12.5/hw/ide/piix.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/ide/piix.c +++ qemu-kvm-0.12.5/hw/ide/piix.c @@ -216,11 +216,13 @@ static PCIDeviceInfo piix_ide_info[] = { .qdev.name = "piix3-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, + .qdev.no_hotplug = 1, .init = pci_piix3_ide_initfn, },{ .qdev.name = "piix4-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, + .qdev.no_hotplug = 1, .init = pci_piix4_ide_initfn, },{ .qdev.name = "ICH6 IDE", Index: qemu-kvm-0.12.5/hw/piix_pci.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/piix_pci.c +++ qemu-kvm-0.12.5/hw/piix_pci.c @@ -347,6 +347,7 @@ static PCIDeviceInfo i440fx_info[] = { .qdev.size = sizeof(PCII440FXState), .qdev.vmsd = &vmstate_i440fx, .qdev.no_user = 1, + .qdev.no_hotplug = 1, .init = i440fx_initfn, .config_write = i440fx_write_config, },{ @@ -355,6 +356,7 @@ static PCIDeviceInfo i440fx_info[] = { .qdev.size = sizeof(PIIX3State), .qdev.vmsd = &vmstate_piix3, .qdev.no_user = 1, + .qdev.no_hotplug = 1, .init = piix3_initfn, },{ /* end of list */ Index: qemu-kvm-0.12.5/hw/vmware_vga.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/vmware_vga.c +++ qemu-kvm-0.12.5/hw/vmware_vga.c @@ -1243,6 +1243,7 @@ static PCIDeviceInfo vmsvga_info = { .qdev.name = "vmware-svga", .qdev.size = sizeof(struct pci_vmsvga_state_s), .qdev.vmsd = &vmstate_vmware_vga, + .qdev.no_hotplug = 1, .init = pci_vmsvga_initfn, }; Index: qemu-kvm-0.12.5/hw/piix4.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/piix4.c +++ qemu-kvm-0.12.5/hw/piix4.c @@ -115,6 +115,7 @@ static PCIDeviceInfo piix4_info[] = { .qdev.desc = "ISA bridge", .qdev.size = sizeof(PCIDevice), .qdev.no_user = 1, + .qdev.no_hotplug = 1, .init = piix4_initfn, },{ /* end of list */ ++++++ kvm-qemu-preXX-virtio-blk-fail-unaligned-requests.patch ++++++ >From 52c050236eaa4f0b5e1d160cd66dc18106445c4d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <[email protected]> Date: Wed, 6 Apr 2011 20:28:34 +0200 Subject: [PATCH] virtio-blk: fail unaligned requests Like all block drivers virtio-blk should not allow small than block size granularity access. But given that the protocol specifies a byte unit length field we currently accept such requests, which cause qemu to abort() in lower layers. Add checks to the main read and write handlers to catch them early. Reported-by: Conor Murphy <[email protected]> Tested-by: Conor Murphy <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> --- hw/virtio-blk.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) Index: qemu-kvm-0.12.5/hw/virtio-blk.c =================================================================== --- qemu-kvm-0.12.5.orig/hw/virtio-blk.c +++ qemu-kvm-0.12.5/hw/virtio-blk.c @@ -301,6 +301,10 @@ static void virtio_blk_handle_flush(Bloc static void virtio_blk_handle_write(BlockRequest *blkreq, int *num_writes, VirtIOBlockReq *req, BlockDriverState **old_bs) { + if (req->qiov.size % 512) { + virtio_blk_rw_complete(req, -EIO); + return; + } if (req->dev->bs != *old_bs || *num_writes == 32) { if (*old_bs != NULL) { do_multiwrite(*old_bs, blkreq, *num_writes); @@ -323,6 +327,10 @@ static void virtio_blk_handle_read(VirtI { BlockDriverAIOCB *acb; + if (req->qiov.size % 512) { + virtio_blk_rw_complete(req, -EIO); + return; + } acb = bdrv_aio_readv(req->dev->bs, req->out->sector, &req->qiov, req->qiov.size / 512, virtio_blk_rw_complete, req); if (!acb) { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
