Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 05:08:17PM +0200, Kevin Wolf wrote: > Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: > > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > > > There is however a seed of a good idea in the thread: > > > > >

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > There is however a seed of a good idea in the thread: > > > I don't think QEMU needs to use this information automatically, > > necessarily. I think the first step is to simply make QEMU save > > this information in the disk im

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-23 Thread Michael S. Tsirkin
On Wed, May 23, 2018 at 11:16:04AM +0200, Kevin Wolf wrote: > Am 23.05.2018 um 04:12 hat Fam Zheng geschrieben: > > On Tue, 05/22 17:02, Kevin Wolf wrote: > > > Am 22.05.2018 um 16:19 hat Michael S. Tsirkin geschrieben: > > > > On Tue, May 22, 2018 at 09:35:5

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-22 Thread Michael S. Tsirkin
On Tue, May 22, 2018 at 09:35:55AM +0200, Gerd Hoffmann wrote: > Hi, > > > You must /sometimes/ supply the correct machine type. > > > > It is quite dependent on the guest OS you have installed, and even > > just how the guest OS is configured. In general Linux is very > > flexible and can ada

[Qemu-block] storing machine data in qcow images?

2018-05-18 Thread Michael S. Tsirkin
Hi! Right now, QEMU supports multiple machine types within a given architecture. This was the case for many architectures (like ARM) for a while, somewhat more recently this is the case for x86 with I440FX and Q35 options. Unfortunately this means that it's no longer possible to more or less relia

[Qemu-block] [PATCH 16/67] migration: use local path for local headers

2018-05-03 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as C file (as opposed to one in include/), we should use its relative path, without a directory. Directory based path works more or less by accident. Signed-off-by: Michael S. Tsirkin --- migration/block-dirty-bitmap.c | 2 +- migration

[Qemu-block] [PATCH 08/67] ide: use local path for local headers

2018-05-03 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as C file (as opposed to one in include/), we should use its relative path, without a directory. Directory based path works more or less by accident. Signed-off-by: Michael S. Tsirkin --- hw/ide/ahci-allwinner.c | 2 +- hw/ide/ahci.c

[Qemu-block] [PATCH 01/67] block: use local path for local headers

2018-05-03 Thread Michael S. Tsirkin
When pulling in headers that are in the same directory as C file (as opposed to one in include/), we should use its relative path, without a directory. Directory based path works more or less by accident. Signed-off-by: Michael S. Tsirkin --- block/crypto.c | 2 +- block/nbd.c

[Qemu-block] [PULL 1/5] vhost-user-blk: set config ops before vhost-user init

2018-04-09 Thread Michael S. Tsirkin
axime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Changpeng Liu --- hw/block/vhost-user-blk.c | 4 ++-- hw/virtio/vhost.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c

Re: [Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-23 Thread Michael S. Tsirkin
On Fri, Mar 23, 2018 at 10:22:27AM +, Daniel P. Berrangé wrote: > On Thu, Mar 22, 2018 at 09:27:55PM +0200, Michael S. Tsirkin wrote: > > Make sure all generated files go into qemu-build subdirectory. > > We can then include them like this: > > #include "qemu-bu

Re: [Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-22 Thread Michael S. Tsirkin
On Thu, Mar 22, 2018 at 02:42:55PM -0500, Eric Blake wrote: > On 03/22/2018 02:27 PM, Michael S. Tsirkin wrote: > > Make sure all generated files go into qemu-build subdirectory. > > We can then include them like this: > > #include "qemu-build/trace.h" &g

Re: [Qemu-block] [PATCH v2] qemu: replace "" with <> in headers

2018-03-22 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 05:22:03PM +0100, Kevin Wolf wrote: > > It's all still very much a non-standard convention and so less robust > > than prefixing file name with a project-specifix prefix. > > I've always had the impression that it's by far the most common > convention, to the point that I'd

[Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-22 Thread Michael S. Tsirkin
chances of conflicts with possible stale files in source directory (which could be left over from e.g. old patches, etc) This patch needs to be merged with patch 2 of series updating all files: sending it separately to avoid spamming the list. Signed-off-by: Michael S. Tsirkin --- configure

Re: [Qemu-block] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 04:34:39PM +0100, Kevin Wolf wrote: > Am 21.03.2018 um 15:46 hat Michael S. Tsirkin geschrieben: > > Our current scheme is to use > > #include "" > > for internal headers, and > > #include <> > > for external ones. >

Re: [Qemu-block] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 03:19:22PM +, Daniel P. Berrangé wrote: > On Wed, Mar 21, 2018 at 04:46:32PM +0200, Michael S. Tsirkin wrote: > > Our current scheme is to use > > #include "" > > for internal headers, and > > #include <> > > for extern

Re: [Qemu-block] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 04:04:29PM +0100, Paolo Bonzini wrote: > On 21/03/2018 15:46, Michael S. Tsirkin wrote: > > +if (m@^\s*#include\s+"qemu/@o) { > > +s@^(\s*#include\s+)"qemu/([^"]+)"(.*)$@$1$3@o) { > > +} else { > > +s@^(\s*#include\

[Qemu-block] [PATCH v2] qemu: replace "" with <> in headers

2018-03-21 Thread Michael S. Tsirkin
n and does not change all of the codebase. If there's agreement, this will be run on all code to converting code to this scheme. Signed-off-by: Michael S. Tsirkin --- scripts/changeheaders.pl | 20 1 file changed, 20 insertions(+) create mode 100755 scripts/changeh

Re: [Qemu-block] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 01:29:53PM +, Daniel P. Berrangé wrote: > On Wed, Mar 21, 2018 at 03:08:36PM +0200, Michael S. Tsirkin wrote: > > On Wed, Mar 21, 2018 at 08:16:00AM +0100, Thomas Huth wrote: > > > On 20.03.2018 13:05, Michael S. Tsirkin wrote: > > > > On T

Re: [Qemu-block] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 02:15:20PM +0100, Stefan Weil wrote: > Am 21.03.2018 um 14:08 schrieb Michael S. Tsirkin: > > It still leaves us with a host of problems e.g. the problem of stale > > headers in the source directory. > > There have already been suggestions in the p

Re: [Qemu-block] [Qemu-ppc] [PATCH] qemu: include generated files with <> and not ""

2018-03-21 Thread Michael S. Tsirkin
On Wed, Mar 21, 2018 at 08:16:00AM +0100, Thomas Huth wrote: > On 20.03.2018 13:05, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > >> Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > >>> QEMU coding style at the

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 05:34:01PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 07:10:42PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 05:33:42PM +0100, Stefan Weil wrote: > > > Using <> for system include files and "" for local i

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 05:33:42PM +0100, Stefan Weil wrote: > Using <> for system include files and "" for local include files is a > convention, and as far as I know most projects adhere to that > convention. So does QEMU currently. Such conventions are not only > important for humans, but also f

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:54:37PM +0100, Max Reitz wrote: > But I guess the main advantage with using this rule I see is that it's > better for people reading the code. It's just nice to know whether a > file belongs to qemu or not by just looking at the #include statement. > (Note that this impl

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 11:12:00AM -0500, Eric Blake wrote: > > Why can't we fix Makefile to include BOTH the build and the source > directories (to pick up generated files first, and then version-controlled > files), and possibly include logic to simplify to a single -I instead of two > when doin

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:41:17PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:32:16PM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > > So for these, we should use "". None of these are generated files > > > > though. > > > > > > That leads to crazy inconsistent message for d

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:58:32PM +, Daniel P. Berrangé wrote: > > That's the C language for you though. For better or worse, these are > > the rules that K&R came up with. > > No one seriously tries to keep compliance with original K&R C these days, > things have moved on massively since th

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:10:41PM +, Stefan Hajnoczi wrote: > On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this ru

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:46:46PM +0100, Thomas Huth wrote: > On 20.03.2018 14:32, Gerd Hoffmann wrote: > > Hi, > > > >>> So for these, we should use "". None of these are generated files though. > >> > >> That leads to crazy inconsistent message for developers where 50% of QEMU > >> header fi

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file i

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:39:00PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:28:42PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wro

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > > QEMU coding style at the moment asks for all non-system > > > include fil

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does

Re: [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 10:27:19AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 10:01:24AM +, Peter Maydell wrote: > > On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > > > We can follow what autoconf does, and add a check to configure to see if > > > there are generated fil

Re: [Qemu-block] [PATCH v2 0/3] Add new CD-ROM related qtests

2018-03-16 Thread Michael S. Tsirkin
g > from CD-ROM drives still works fine for x86 and s390x, and the third > patch adds a test that certain machines can at least still be started > with the "-cdrom" parameter (i.e. that test would have catched the > mistake that I did with my SCSI cleanup patch). Reviewed-by:

Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] tests/boot-sector: Add magic bytes to s390x boot code header

2018-03-15 Thread Michael S. Tsirkin
On Thu, Mar 15, 2018 at 12:47:08PM +0100, Philippe Mathieu-Daudé wrote: > On 03/15/2018 08:49 AM, Thomas Huth wrote: > > We're going to use the s390x boot code for testing CD-ROM booting. > > But the ISO loader of the s390-ccw bios is a little bit more picky > > than the network loader and expects

Re: [Qemu-block] [PATCH v3 0/4] vl: introduce vm_shutdown()

2018-03-08 Thread Michael S. Tsirkin
On Wed, Mar 07, 2018 at 02:42:01PM +, Stefan Hajnoczi wrote: > v3: > * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam] > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] Acked-by: Mic

[Qemu-block] [PULL 14/26] pci: removed the is_express field since a uniform interface was inserted

2018-02-08 Thread Michael S. Tsirkin
tance_init() Reviewed-by: Marcel Apfelbaum Reviewed-by: Eduardo Habkost Signed-off-by: Yoni Bettan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/pcie_pci_bridge.txt | 2 +- include/hw/pci/pci.h | 3 --- hw/block/nvme.c| 1

[Qemu-block] [PULL 02/26] virtio: remove event notifier cleanup call on de-assign

2018-02-08 Thread Michael S. Tsirkin
change is a preparation to allow executing the virtio_bus_set_host_notifier function in a memory region transaction. Signed-off-by: Gal Hammer Reviewed-by: Greg Kurz Tested-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-bus.h | 2

[Qemu-block] [PULL v4 03/29] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-18 Thread Michael S. Tsirkin
. Tsirkin Signed-off-by: Michael S. Tsirkin --- default-configs/pci.mak| 1 + default-configs/s390x-softmmu.mak | 1 + hw/virtio/virtio-pci.h | 18 ++ include/hw/virtio/vhost-user-blk.h | 41 + hw/block/vhost-user-blk.c | 359

[Qemu-block] [PULL v2 03/34] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-16 Thread Michael S. Tsirkin
. Tsirkin Signed-off-by: Michael S. Tsirkin --- default-configs/pci.mak| 1 + default-configs/s390x-softmmu.mak | 1 + hw/virtio/virtio-pci.h | 18 ++ include/hw/virtio/vhost-user-blk.h | 41 + hw/block/vhost-user-blk.c | 359

Re: [Qemu-block] [PATCH V5] pci: removed the is_express field since a uniform interface was inserted

2018-01-15 Thread Michael S. Tsirkin
On Mon, Dec 18, 2017 at 05:21:40PM +0200, Yoni Bettan wrote: > according to Eduardo Habkost's commit fd3b02c889 all PCIEs now implement > INTERFACE_PCIE_DEVICE so we don't need is_express field anymore. > > Devices that implements only INTERFACE_PCIE_DEVICE (is_express == 1) > or > devices that im

[Qemu-block] [PULL 03/33] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-15 Thread Michael S. Tsirkin
. Tsirkin Signed-off-by: Michael S. Tsirkin --- default-configs/pci.mak| 1 + hw/virtio/virtio-pci.h | 18 ++ include/hw/virtio/vhost-user-blk.h | 41 + hw/block/vhost-user-blk.c | 359 + hw/virtio/virtio-pci.c

Re: [Qemu-block] [PULL 15/25] hw/block/nvme: QOM'ify PCI NVME

2017-12-21 Thread Michael S. Tsirkin
On Thu, Dec 21, 2017 at 04:29:21PM +0200, Michael S. Tsirkin wrote: > From: Philippe Mathieu-Daudé > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin Dropped due to merge conflicts. Pls rebase and ask storage maint

[Qemu-block] [PULL 15/25] hw/block/nvme: QOM'ify PCI NVME

2017-12-21 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/nvme.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[Qemu-block] [PULL 07/25] pci: Add pci_dev_bus_num() helper

2017-12-21 Thread Michael S. Tsirkin
ff-by: David Gibson Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum Reviewed-by: Peter Xu --- include/hw/pci/pci.h| 5 + include/hw/xen/xen_common.h | 8 hw/pci/pcie_aer.c | 2 +- hw/s390x/s390-pci-bus.c | 2 +

[Qemu-block] [PULL 04/25] tests: add test to check VirtQueue object

2017-12-21 Thread Michael S. Tsirkin
From: Prasad J Pandit An uninitialised VirtQueue object or one with Vring.align field set to zero(0) could lead to arithmetic exceptions. Add a unit test to validate it. Signed-off-by: Prasad J Pandit Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan

[Qemu-block] [PATCH dontapply] virtio: rework set_status callbacks

2017-12-13 Thread Michael S. Tsirkin
it is better to keep that as part of status. The actual case was virtio_error invoking a status callback, but that is gone now. I thus do not plan to apply this patch, posting here for achival purposes. Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 2 +- hw/block/virtio-

Re: [Qemu-block] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Michael S. Tsirkin
are examples of the ugly > bit-rotting debug print statements; cleaning those up is left as > a bite-sized task for another day. > > Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 > > Signed-off-by: Eric Blake We can't really rely on co

[Qemu-block] [PULL 18/26] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices

2017-10-14 Thread Michael S. Tsirkin
-by: Eduardo Habkost Reviewed-by: David Gibson Acked-by: David Gibson Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/piix4.c | 1 + hw/audio/ac97.c | 4 hw/audio/es1370.c

[Qemu-block] [PULL 17/26] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices

2017-10-14 Thread Michael S. Tsirkin
From: Eduardo Habkost Change all devices that set is_express=1 to implement INTERFACE_PCIE_DEVICE. Cc: Keith Busch Cc: Kevin Wolf Cc: Max Reitz Cc: Dmitry Fleytman Cc: Jason Wang Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: Paul Burton Cc: Paolo Bonzini Cc: Hannes Re

Re: [Qemu-block] [Qemu-devel] [PATCH v2] virtio: introduce `info virtio' hmp command

2017-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2017 at 06:09:42PM +0300, Jan Dakinevich wrote: > The command is intended for exposing device specific virtio feature bits > and their negotiation status. It is convenient and useful for debug > purpose. > > Names of features are taken from a devices via get_feature_name() within >

Re: [Qemu-block] [PATCH for-2.11] ide: ahci: unparent children buses before freeing their memory

2017-08-28 Thread Michael S. Tsirkin
ealized() > > As result later when qdev_device_add() tries to unparent ich9-ahci > after failed device_set_realized(), > object_unparent() -> object_property_del_child() > iterates over existing QOM children including buses added by > ide_bus_new() and tries to unparent them, which cau

Re: [Qemu-block] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 07:40:39AM +0200, Thomas Huth wrote: > On 23.08.2017 02:10, Philippe Mathieu-Daudé wrote: > > On 08/22/2017 07:42 PM, Michael S. Tsirkin wrote: > >> On Tue, Aug 22, 2017 at 06:43:43PM -0300, Philippe Mathieu-Daudé wrote: > >>> 9e047b98245

Re: [Qemu-block] [PATCH for-2.10-rc4?] acpi: pcihp: fix use-after-free for machines previous pc-1.7 compat

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 06:43:43PM -0300, Philippe Mathieu-Daudé wrote: > 9e047b982452 "piix4: add acpi pci hotplug support" introduced a new property > 'use_acpi_pci_hotplug' for pc-1.7 and older machines. > c24d5e0b91d1 "convert ACPI PCI hotplug to use hotplug-handler API" added the > qbus hotplu

[Qemu-block] [PULL 08/21] pci: Replace pci_add_capability2() with pci_add_capability()

2017-07-03 Thread Michael S. Tsirkin
by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 3 --- hw/i386/kvm/pci-assign.c | 14 +++--- hw/ide/ich.c | 2 +- hw/pci/msi.c | 2 +- hw/pci/msix.c| 2 +- hw/pci/pci.c

Re: [Qemu-block] [PATCH 0/6] virtio: use ioeventfd in TCG and qtest mode

2017-06-29 Thread Michael S. Tsirkin
s: add virtio used ring support > tests: fix virtio-scsi-test ISR dependence > tests: fix virtio-blk-test ISR dependence > tests: fix virtio-net-test ISR dependence > virtio-pci: use ioeventfd even when KVM is disabled Reviewed-by: Michael S. Tsirkin Feel free to merge. &

[Qemu-block] [PULL 02/23] virtio: Report real progress in VQ aio poll handler

2017-02-17 Thread Michael S. Tsirkin
uot; VQ and take 100% host CPU. Fix this by reporting actual progress from virtio queue aio handlers. Reported-by: Ed Swierk Signed-off-by: Fam Zheng Tested-by: Ed Swierk Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virti

[Qemu-block] [PULL v5 16/22] pci: Convert msix_init() to Error and fix callers

2017-01-31 Thread Michael S. Tsirkin
1000e, vmxnet3, nvme) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bo

[Qemu-block] [PULL v4 17/23] pci: Convert msix_init() to Error and fix callers

2017-01-31 Thread Michael S. Tsirkin
1000e, vmxnet3, nvme) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bo

[Qemu-block] [PULL v3 15/21] pci: Convert msix_init() to Error and fix callers

2017-01-31 Thread Michael S. Tsirkin
1000e, vmxnet3, nvme) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bo

[Qemu-block] [PULL v2 14/18] pci: Convert msix_init() to Error and fix callers

2017-01-26 Thread Michael S. Tsirkin
1000e, vmxnet3, nvme) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bo

[Qemu-block] [PULL 13/16] pci: Convert msix_init() to Error and fix callers

2017-01-24 Thread Michael S. Tsirkin
1000e, vmxnet3, nvme) who won't fail because of msix_init's failure, suppress the error report by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bo

Re: [Qemu-block] [PULL 04/41] virtio: convert to use DMA api

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:59:03PM +0100, Paolo Bonzini wrote: > > > On 10/01/2017 06:39, Michael S. Tsirkin wrote: > > -void virtqueue_map(VirtQueueElement *elem) > > +void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) > > { > > -virtqueue_map

[Qemu-block] [PULL 04/41] virtio: convert to use DMA api

2017-01-09 Thread Michael S. Tsirkin
space. (only pci version is implemented). - query and use this address space during virtio device guest memory accessing when iommu platform (VIRTIO_F_IOMMU_PLATFORM) was enabled for this device. Cc: Michael S. Tsirkin Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: Amit Shah Cc: Paolo Bonzini Cc

[Qemu-block] [PULL 4/7] virtio: set ISR on dataplane notifications

2016-11-18 Thread Michael S. Tsirkin
ced with a new public function virtio_notify_irqfd that also sets ISR. The irqfd emulation code now need not set ISR anymore, so virtio_irq is removed. Reviewed-by: Stefan Hajnoczi Tested-by: Farhan Ali Tested-by: Alex Williamson Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Sig

[Qemu-block] [PULL 40/47] megasas: undo the overwrites of msi user configuration

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Acked-by: Marcel Apfelbaum Reviewed

[Qemu-block] [PULL 39/47] megasas: remove unnecessary megasas_use_msix()

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Acked-by: Marcel Apfelbaum Reviewed-by

[Qemu-block] [PULL 36/47] pci: Convert msix_init() to Error and fix callers to check it

2016-11-10 Thread Michael S. Tsirkin
by passing NULL error object. Bonus: add comment for msix_init. CC: Jiri Pirko CC: Gerd Hoffmann CC: Dmitry Fleytman CC: Jason Wang CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Alex Williamson CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Markus Armbruster

[Qemu-block] [PULL 37/47] megasas: change behaviour of msix switch

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. Also undo the overwrites of user configuration of msix. CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum

Re: [Qemu-block] [PATCH V2 02/11] virtio: convert to use DMA api

2016-11-03 Thread Michael S. Tsirkin
troducing a new transport specific helper to query the dma address > space. (only pci version is implemented). > - query and use this address space during virtio device guest memory > accessing when iommu platform (VIRTIO_F_IOMMU_PLATFORM) was enabled > for this device. > > Cc:

[Qemu-block] [PULL 05/47] virtio: move ioeventfd_started flag to VirtioBusState

2016-10-30 Thread Michael S. Tsirkin
ld be implemented in virtio-bus.c. Instead of ioeventfd_started, the ioeventfd_assign callback now determines whether the virtio bus supports host notifiers. Reviewed-by: Stefan Hajnoczi Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Mich

[Qemu-block] [PULL 08/47] virtio-blk: always use dataplane path if ioeventfd is active

2016-10-30 Thread Michael S. Tsirkin
,ioeventfd=off,iothread=io,drive=null: ioeventfd is required for iothread while previously it would have started just fine. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/dataplane/virtio-blk.h | 6

[Qemu-block] [PULL 32/33] virtio: cleanup VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Now all the usages of the old version of VMSTATE_VIRTIO_DEVICE are gone, so we can get rid of the conditionals, and the old macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 27

[Qemu-block] [PULL 12/33] virtio-blk: make some functions static

2016-10-09 Thread Michael S. Tsirkin
t() since commit "6aa46d8ff1ee virtio: move VirtQueueElement at the beginning of the structs". This patch converts them to static. Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk

[Qemu-block] [PULL 09/33] virtio-blk: add missing virtio_detach_element() call

2016-10-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Make sure to unmap the scatter-gather list and decrement vq->inuse before freeing requests in virtio_blk_reset(). Signed-off-by: Stefan Hajnoczi Reviewed-by: Ladi Prosek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c

[Qemu-block] [PULL 14/33] virtio-blk: handle virtio_blk_handle_request() errors

2016-10-09 Thread Michael S. Tsirkin
ueued requests as well. Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 38 -- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/hw/block/virtio-blk.c

[Qemu-block] [PULL 22/33] virtio-blk: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/hw/block/virtio

[Qemu-block] [PATCH] iotests: drop thread spun work-around

2016-10-09 Thread Michael S. Tsirkin
We've disabled the warning, no need for test to work around it. Signed-off-by: Michael S. Tsirkin --- tests/qemu-iotests/common.filter | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index cfdb633..49217b0 100644 --- a/

Re: [Qemu-block] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-09-04 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 11:06:50AM +0800, Jason Wang wrote: > @@ -1587,6 +1595,11 @@ static void virtio_pci_device_plugged(DeviceState *d, > Error **errp) > } > > if (legacy) { > +if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) { > +error_setg(errp, "VIR

Re: [Qemu-block] qom and debug

2016-08-30 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 01:37:41PM +0200, Cornelia Huck wrote: > On Tue, 30 Aug 2016 14:15:14 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Aug 30, 2016 at 01:11:05PM +0200, Cornelia Huck wrote: > > > On Tue, 30 Aug 2016 13:21:23 +0300 > > > &quo

Re: [Qemu-block] qom and debug (was: [PATCH for 2.8 02/11] virtio: convert to use DMA api)

2016-08-30 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 01:11:05PM +0200, Cornelia Huck wrote: > On Tue, 30 Aug 2016 13:21:23 +0300 > "Michael S. Tsirkin" wrote: > > > BTW downstreams are building with --disable-qom-cast-debug which drops > > all QOM casts on data path - one way is to say we

Re: [Qemu-block] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-08-30 Thread Michael S. Tsirkin
On Tue, Aug 30, 2016 at 01:02:14PM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 30, 2016 at 09:31:27AM +0200, Cornelia Huck wrote: > > On Tue, 30 Aug 2016 11:06:50 +0800 > > Jason Wang wrote: > > > > > Currently, all virtio devices bypass IOM

Re: [Qemu-block] [PATCH for 2.8 02/11] virtio: convert to use DMA api

2016-08-30 Thread Michael S. Tsirkin
ce guest memory > > accessing when iommu platform (VIRTIO_F_IOMMU_PLATFORM) was enabled > > for this device. > > > > Cc: Michael S. Tsirkin > > Cc: Stefan Hajnoczi > > Cc: Kevin Wolf > > Cc: Amit Shah > > Cc: Paolo Bonzini > > Cc: qemu-block@nongnu.org

[Qemu-block] [PULL v5 47/57] virtio-blk: Wrap in vmstate

2016-07-21 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 16 ++---

[Qemu-block] [PULL v5 41/57] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-21 Thread Michael S. Tsirkin
From: Fam Zheng This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[Qemu-block] [PULL v5 39/57] virtio-blk: Call virtio_add_queue_aio

2016-07-21 Thread Michael S. Tsirkin
From: Fam Zheng AIO based handler is more appropriate here because it will then cooperate with bdrv_drained_begin/end. It is needed by the coming revert patch. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by

[Qemu-block] [PULL v4 46/57] virtio-blk: Wrap in vmstate

2016-07-21 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 16 ++---

[Qemu-block] [PULL v4 40/57] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-21 Thread Michael S. Tsirkin
From: Fam Zheng This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[Qemu-block] [PULL v4 38/57] virtio-blk: Call virtio_add_queue_aio

2016-07-21 Thread Michael S. Tsirkin
From: Fam Zheng AIO based handler is more appropriate here because it will then cooperate with bdrv_drained_begin/end. It is needed by the coming revert patch. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by

[Qemu-block] [PULL v3 46/55] virtio-blk: Wrap in vmstate

2016-07-20 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 16 ++---

[Qemu-block] [PULL v3 38/55] virtio-blk: Call virtio_add_queue_aio

2016-07-20 Thread Michael S. Tsirkin
From: Fam Zheng AIO based handler is more appropriate here because it will then cooperate with bdrv_drained_begin/end. It is needed by the coming revert patch. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by

[Qemu-block] [PULL v3 40/55] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-20 Thread Michael S. Tsirkin
From: Fam Zheng This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[Qemu-block] [PULL v2 38/55] virtio-blk: Call virtio_add_queue_aio

2016-07-19 Thread Michael S. Tsirkin
From: Fam Zheng AIO based handler is more appropriate here because it will then cooperate with bdrv_drained_begin/end. It is needed by the coming revert patch. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by

[Qemu-block] [PULL v2 40/55] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-19 Thread Michael S. Tsirkin
From: Fam Zheng This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[Qemu-block] [PULL v2 46/55] virtio-blk: Wrap in vmstate

2016-07-19 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 16 ++---

[Qemu-block] [PULL 46/55] virtio-blk: Wrap in vmstate

2016-07-18 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 16 ++---

[Qemu-block] [PULL 38/55] virtio-blk: Call virtio_add_queue_aio

2016-07-18 Thread Michael S. Tsirkin
From: Fam Zheng AIO based handler is more appropriate here because it will then cooperate with bdrv_drained_begin/end. It is needed by the coming revert patch. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by

[Qemu-block] [PULL 40/55] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-18 Thread Michael S. Tsirkin
From: Fam Zheng This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[Qemu-block] [PULL v2 26/30] megasas: remove unnecessary megasas_use_msi()

2016-07-05 Thread Michael S. Tsirkin
Armbruster cc: Marcel Apfelbaum cc: Michael S. Tsirkin Acked-by: Hannes Reinecke Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/scsi/megasas.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions

<    2   3   4   5   6   7   8   9   >