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

2018-05-23 Thread Eduardo Habkost
On Wed, May 23, 2018 at 01:19:46PM +0200, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > > On Mon, May 21, 2018 at 07:44:40PM +0100, Daniel P. Berrangé wrote: > >> On Mon, May 21, 2018 at 03:29:28PM -0300, Eduardo Habkost wrote: > >

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

2018-05-22 Thread Eduardo Habkost
On Tue, May 22, 2018 at 05:02:21PM +0200, Kevin Wolf wrote: > Am 22.05.2018 um 16:19 hat Michael S. Tsirkin geschrieben: > > 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

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

2018-05-22 Thread Eduardo Habkost
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

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

2018-05-21 Thread Eduardo Habkost
On Mon, May 21, 2018 at 09:18:17PM +0100, Daniel P. Berrangé wrote: > On Fri, May 18, 2018 at 02:41:33PM -0300, Eduardo Habkost wrote: > > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > > On Fri, May 18, 2018 at 06:30:38PM +0300, Michael S. Tsirkin

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

2018-05-21 Thread Eduardo Habkost
On Mon, May 21, 2018 at 07:44:40PM +0100, Daniel P. Berrangé wrote: > On Mon, May 21, 2018 at 03:29:28PM -0300, Eduardo Habkost wrote: > > On Sat, May 19, 2018 at 08:05:06AM +0200, Markus Armbruster wrote: > > > Eduardo Habkost <ehabk...@redhat.com> writes: > > >

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

2018-05-21 Thread Eduardo Habkost
On Sat, May 19, 2018 at 08:05:06AM +0200, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > [...] > > About being more expressive than just a single list of key,value > > pairs, I don't see any evidence of that being necessary for th

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

2018-05-18 Thread Eduardo Habkost
On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > On Fri, May 18, 2018 at 06:30:38PM +0300, Michael S. Tsirkin wrote: > > Hi! > > Right now, QEMU supports multiple machine types within > > a given architecture. This was the case for many architectures > > (like ARM) for a

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

2018-05-18 Thread Eduardo Habkost
On Fri, May 18, 2018 at 06:30:38PM +0300, Michael S. Tsirkin wrote: > 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

[Qemu-block] [RFC 10/10] python: futurize -f lib2to3.fixes.fix_numliterals

2018-05-11 Thread Eduardo Habkost
Convert octal literals into the new syntax. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_numliterals $py Signed-off-by: Eduardo

[Qemu-block] [RFC 06/10] python: futurize -f lib2to3.fixes.fix_reduce

2018-05-11 Thread Eduardo Habkost
Handle the move of reduce() to functools.reduce(). This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_reduce $py Signed-off-by: Eduardo

[Qemu-block] [RFC 05/10] python: futurize -f lib2to3.fixes.fix_standarderror

2018-05-11 Thread Eduardo Habkost
Rename StandardError to Exception. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_standarderror $py Signed-off-by: Eduardo Habkost

[Qemu-block] [RFC 09/10] python: futurize -f lib2to3.fixes.fix_except

2018-05-11 Thread Eduardo Habkost
Convert "except X, T" to "except X as T". This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_except $py Signed-off

[Qemu-block] [RFC 07/10] python: futurize -f lib2to3.fixes.fix_tuple_params

2018-05-11 Thread Eduardo Habkost
Remove implicit tuple parameter unpacking. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_tuple_params $py Signed-off-by: Eduardo

[Qemu-block] [RFC 08/10] python: futurize -f lib2to3.fixes.fix_renames

2018-05-11 Thread Eduardo Habkost
Change sys.maxint to sys.maxsize. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_renames $py Signed-off-by: Eduardo Habkost <eh

[Qemu-block] [RFC 01/10] python: futurize -f libfuturize.fixes.fix_print_with_import

2018-05-11 Thread Eduardo Habkost
-by: Eduardo Habkost <ehabk...@redhat.com> --- scripts/analyse-9p-simpletrace.py| 89 scripts/analyse-locks-simpletrace.py | 1 + scripts/analyze-migration.py | 11 ++-- scripts/dump-guest-memory.py | 1 + scripts/replay-d

[Qemu-block] [RFC 04/10] python: futurize -f lib2to3.fixes.fix_has_key

2018-05-11 Thread Eduardo Habkost
Change "dict.has_key(key)" to "key in dict" This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_has_key $py Signed-off

[Qemu-block] [RFC 02/10] python: futurize -f libfuturize.fixes.fix_absolute_import

2018-05-11 Thread Eduardo Habkost
README.sh4) $ futurize -w -f libfuturize.fixes.fix_absolute_import $py Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- scripts/qmp/qemu-ga-client | 3 ++- scripts/qmp/qmp | 3 ++- scripts/qmp/qmp-shell| 3 ++- scripts/qmp/qom-fuse

[Qemu-block] [RFC 03/10] python: futurize -f libfuturize.fixes.fix_next_call

2018-05-11 Thread Eduardo Habkost
Change obj.next() calls to next(obj). This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_next_call $py Signed-off-by: Eduardo Habkost

[Qemu-block] [RFC 00/10] [TESTING NEEDED] python: futurize --stage1 (Python 3 compatibility)

2018-05-11 Thread Eduardo Habkost
stage1 on all Python code in the tree. To make review and testing easier, I have run the fixers separately instead of doing all changes in a single patch. [1] http://python-future.org/automatic_conversion.html Eduardo Habkost (10): python: futurize -f libfuturize.fixes.fix_print_with_import pyt

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

2017-12-19 Thread Eduardo Habkost
hw/usb/hcd-xhci.c > - hw/xen/xen_pt.c > > For those 3 I made sure that QEMU_PCI_CAP_EXPRESS is on in instance_init() > > Signed-off-by: Yoni Bettan <ybet...@redhat.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> -- Eduardo

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

2017-12-18 Thread Eduardo Habkost
On Tue, Dec 12, 2017 at 07:36:49AM +0200, Yoni Bettan wrote: > * according to Eduardo Habkost's commit > fd3b02c8896d597dd8b9e053dec579cf0386aee1 > > * since all PCIEs now implement INTERFACE_PCIE_DEVICE we > don't need this field anymore > > * Devices

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

2017-12-18 Thread Eduardo Habkost
d are those that are hybrid and > also > had (is_express == 1) - therefor only: > - hw/vfio/pci.c > - hw/usb/hcd-xhci.c > > For both I made sure that QEMU_PCI_CAP_EXPRESS is on > > Signed-off-by: Yoni Bettan <ybet...@redh

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

2017-12-11 Thread Eduardo Habkost
On Mon, Dec 11, 2017 at 03:11:39PM +0200, Yoni Bettan wrote: > > > On 12/07/2017 10:58 PM, Eduardo Habkost wrote: > > On Tue, Dec 05, 2017 at 07:17:06PM +0200, Yoni Bettan wrote: > > > * according to Eduardo Habkost's commit > > >fd3b02c

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

2017-12-07 Thread Eduardo Habkost
On Tue, Dec 05, 2017 at 07:17:06PM +0200, Yoni Bettan wrote: > * according to Eduardo Habkost's commit > fd3b02c8896d597dd8b9e053dec579cf0386aee1 > > * since all PCIEs now implement INTERFACE_PCIE_DEVICE we > don't need this field anymore > > * Devices

[Qemu-block] [PULL 1/5] iotests: Set up Python logging

2017-10-11 Thread Eduardo Habkost
Set up Python logging module instead of relying on QEMUMachine._debug to enable debugging messages. Cc: Kevin Wolf <kw...@redhat.com> Cc: Max Reitz <mre...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <2017092

[Qemu-block] [PATCH] xen/pt: Mark TYPE_XEN_PT_DEVICE as hybrid

2017-10-05 Thread Eduardo Habkost
xen-pt doesn't set the is_express field, but is supposed to be able to handle PCI Express devices too. Mark it as hybrid. Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/xen/xen_pt.c | 1 + 1 file changed, 1 insertion(+) dif

Re: [Qemu-block] xen-pci-passthrough PCI Express support? (Re: [Qemu-devel] [Xen-devel] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices)

2017-10-04 Thread Eduardo Habkost
On Wed, Oct 04, 2017 at 03:08:15AM -0600, Jan Beulich wrote: > >>> On 03.10.17 at 02:12, <ehabk...@redhat.com> wrote: > > On Thu, Sep 28, 2017 at 10:12:34AM -0300, Eduardo Habkost wrote: > >> On Thu, Sep 28, 2017 at 02:33:57AM -0600, Jan Beulich wrote: > &

[Qemu-block] xen-pci-passthrough PCI Express support? (Re: [Qemu-devel] [Xen-devel] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices)

2017-10-02 Thread Eduardo Habkost
On Thu, Sep 28, 2017 at 10:12:34AM -0300, Eduardo Habkost wrote: > On Thu, Sep 28, 2017 at 02:33:57AM -0600, Jan Beulich wrote: > > >>> On 27.09.17 at 21:56, <ehabk...@redhat.com> wrote: > > > --- a/hw/xen/xen_pt.c > > > +++ b/hw/xen/xen_pt.c > &

Re: [Qemu-block] [Xen-devel] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices

2017-09-28 Thread Eduardo Habkost
On Thu, Sep 28, 2017 at 02:33:57AM -0600, Jan Beulich wrote: > >>> On 27.09.17 at 21:56, wrote: > > --- a/hw/xen/xen_pt.c > > +++ b/hw/xen/xen_pt.c > > @@ -964,6 +964,10 @@ static const TypeInfo xen_pci_passthrough_info = { > > .instance_size =

[Qemu-block] [PATCH v2 4/5] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices

2017-09-27 Thread Eduardo Habkost
-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes v1 -> v2: * s/legacy/conventional/ * Suggested-by: Alex Williamson <alex.william...@redhat.com> * Note about pcie-pci-bridge on commit message. * New devices: sungem, sunhme

[Qemu-block] [PATCH v2 3/5] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices

2017-09-27 Thread Eduardo Habkost
t; Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Marcel Apfelbaum <mar...@redhat.com> Cc: Paul Burton <paul.bur...@imgtec.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Hannes Reinecke <h...@suse.com> Cc: qemu-block@nongnu.org Reviewed-by: Alistair Franc

[Qemu-block] [PATCH 2/5] iotests: Set up Python logging

2017-09-27 Thread Eduardo Habkost
Set up Python logging module instead of relying on QEMUMachine._debug to enable debugging messages. Cc: Kevin Wolf <kw...@redhat.com> Cc: Max Reitz <mre...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- tests/qemu-iotests/iotests.

Re: [Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations

2017-09-06 Thread Eduardo Habkost
On Wed, Sep 06, 2017 at 03:00:41PM +0200, Kevin Wolf wrote: > Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: > > From: Jeffrey Cody > > > > If configured without live block operations enabled, unregister the > > live block operation commands. > > > > Signed-off-by: Jeff

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] pci: Add INTERFACE_LEGACY_PCI_DEVICE to legacy PCI devices

2017-08-28 Thread Eduardo Habkost
On Mon, Aug 28, 2017 at 06:58:37PM -0400, John Snow wrote: > > > On 08/25/2017 03:39 PM, Eduardo Habkost wrote: > > CCing maintainers of affected devices (sorry for not CCing you > > before). > > > > On Wed, Aug 23, 2017 at 07:14:44PM -0300

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] pci: Add INTERFACE_LEGACY_PCI_DEVICE to legacy PCI devices

2017-08-25 Thread Eduardo Habkost
CCing maintainers of affected devices (sorry for not CCing you before). On Wed, Aug 23, 2017 at 07:14:44PM -0300, Eduardo Habkost wrote: > Add INTERFACE_LEGACY_PCI_DEVICE to all direct subtypes of > TYPE_PCI_DEVICE, except: > > 1) The ones that already have INTERFACE_PCIE_DEVICE set:

Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices

2017-08-25 Thread Eduardo Habkost
CCing maintainers of affected devices (sorry for not CCing you before). On Wed, Aug 23, 2017 at 07:14:43PM -0300, Eduardo Habkost wrote: > Change all devices that set is_express=1 to implement > INTERFACE_PCIE_DEVICE. > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>

Re: [Qemu-block] [RFC v4 08/13] ide: enumerate_slots implementation

2017-08-18 Thread Eduardo Habkost
On Wed, Aug 16, 2017 at 05:46:18PM -0400, John Snow wrote: > > > On 08/14/2017 05:57 PM, Eduardo Habkost wrote: > > Example output when using "-machine q35": > > > > { > > "available": true, > >

[Qemu-block] [RFC v4 08/13] ide: enumerate_slots implementation

2017-08-14 Thread Eduardo Habkost
ot;: true } { "available": true, "count": 10, "device-types": [ "ide-device" ], "hotpluggable": false, "opts": [ { "option": "unit", "values": [ [ 0, 1 ] ] }, { "

[Qemu-block] [PATCH 2/5] block: Don't try to set *errp directly

2017-06-08 Thread Eduardo Habkost
z <mre...@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- block.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index fa1d06d846..1750a1838e 100644 --- a/block.c +++ b/block.c @@ -4263,

[Qemu-block] [PULL 10/22] sysbus-ahci: Remove user_creatable flag

2017-05-17 Thread Eduardo Habkost
xilinx.com> Acked-by: John Snow <js...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20170503203604.31462-11-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>

[Qemu-block] [PULL 02/22] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-05-17 Thread Eduardo Habkost
nx.com> Cc: Beniamino Galvani <b.galv...@gmail.com> Cc: Christian Borntraeger <borntrae...@de.ibm.com> Cc: Cornelia Huck <cornelia.h...@de.ibm.com> Cc: David Gibson <da...@gibson.dropbear.id.au> Cc: "Edgar E. Iglesias" <edgar.igles...@gmail.com> Cc: E

[Qemu-block] [PULL 06/22] pflash_cfi01: Remove user_creatable flag

2017-05-17 Thread Eduardo Habkost
@redhat.com> Cc: Philippe Mathieu-Daudé <f4...@amsat.org> Cc: Marcel Apfelbaum <mar...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Laszlo Ersek <ler...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by:

[Qemu-block] [PULL 05/22] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo

2017-05-17 Thread Eduardo Habkost
<mre...@redhat.com> Cc: qemu-block@nongnu.org Cc: Thomas Huth <th...@redhat.com> Acked-by: John Snow <js...@redhat.com> Reviewed-by: Thomas Huth <th...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@re

[Qemu-block] [PATCH] fixup! sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-05-05 Thread Eduardo Habkost
On Fri, May 05, 2017 at 01:54:19PM -0300, Eduardo Habkost wrote: > On Fri, May 05, 2017 at 09:36:22AM +0200, Cornelia Huck wrote: > [...] > > > diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c > > > index c0f560b289..6a2eec8dd0 100644 > > > --- a/hw/core/sysb

Re: [Qemu-block] [PATCH RESEND v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-05-05 Thread Eduardo Habkost
On Fri, May 05, 2017 at 09:36:22AM +0200, Cornelia Huck wrote: [...] > > diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c > > index c0f560b289..6a2eec8dd0 100644 > > --- a/hw/core/sysbus.c > > +++ b/hw/core/sysbus.c > > @@ -326,6 +326,17 @@ static void sysbus_device_class_init(ObjectClass > >

[Qemu-block] [PATCH RESEND v2 11/21] allwinner-ahci: Remove user_creatable flag

2017-05-03 Thread Eduardo Habkost
lt;b.galv...@gmail.com> Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: qemu-...@nongnu.org Cc: Marcel Apfelbaum <mar...@redhat.com> Acked-by: John Snow <js...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@red

[Qemu-block] [PATCH RESEND v2 06/21] pflash_cfi01: Remove user_creatable flag

2017-05-03 Thread Eduardo Habkost
@redhat.com> Cc: Philippe Mathieu-Daudé <f4...@amsat.org> Cc: Marcel Apfelbaum <mar...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Laszlo Ersek <ler...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Edua

[Qemu-block] [PATCH RESEND v2 10/21] sysbus-ahci: Remove user_creatable flag

2017-05-03 Thread Eduardo Habkost
xilinx.com> Acked-by: John Snow <js...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes v1 -> v2: * (none) --- hw/ide/ahci.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/ide/ahci.c b/hw

[Qemu-block] [PATCH RESEND v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-05-03 Thread Eduardo Habkost
nx.com> Cc: Beniamino Galvani <b.galv...@gmail.com> Cc: Christian Borntraeger <borntrae...@de.ibm.com> Cc: Cornelia Huck <cornelia.h...@de.ibm.com> Cc: David Gibson <da...@gibson.dropbear.id.au> Cc: "Edgar E. Iglesias" <edgar.igles...@gmail.com> Cc: E

[Qemu-block] [PATCH RESEND v2 05/21] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo

2017-05-03 Thread Eduardo Habkost
<mre...@redhat.com> Cc: qemu-block@nongnu.org Cc: Thomas Huth <th...@redhat.com> Acked-by: John Snow <js...@redhat.com> Reviewed-by: Thomas Huth <th...@redhat.com> Acked-by: Marcel Apfelbaum <mar...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com&g

[Qemu-block] [PATCH v2 11/21] allwinner-ahci: Remove user_creatable flag

2017-04-04 Thread Eduardo Habkost
lt;b.galv...@gmail.com> Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: qemu-...@nongnu.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes v1 -> v2: * Commit message rewrite only --- hw/ide/ahci.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/ide/a

[Qemu-block] [PATCH v2 06/21] pflash_cfi01: Remove user_creatable flag

2017-04-04 Thread Eduardo Habkost
r...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Laszlo Ersek <ler...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes v1 -> v2: * Commit message rewrite only --- hw/block/pflash_cfi01.c | 5 - 1 file changed

[Qemu-block] [PATCH v2 05/21] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo

2017-04-04 Thread Eduardo Habkost
gnu.org Cc: Thomas Huth <th...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes v1 -> v2: * Commit message rewrite only --- hw/block/fdc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 3d05565628..a3286

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-04 Thread Eduardo Habkost
On Tue, Apr 04, 2017 at 03:06:30PM +0200, Alexander Graf wrote: > On 04/04/2017 02:59 PM, Eduardo Habkost wrote: > > On Tue, Apr 04, 2017 at 09:02:28AM +0200, Alexander Graf wrote: > > > > > > On 04.04.17 08:58, Thomas Huth wrote: > > > > On

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-03 Thread Eduardo Habkost
On Mon, Apr 03, 2017 at 10:15:44PM +0200, Alexander Graf wrote: > > > On 03.04.17 22:10, Eduardo Habkost wrote: > > On Mon, Apr 03, 2017 at 08:49:16PM +0100, Peter Maydell wrote: > > > On 1 April 2017 at 01:46, Eduardo Habkost <ehabk...@redhat

Re: [Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-04-03 Thread Eduardo Habkost
On Mon, Apr 03, 2017 at 08:49:16PM +0100, Peter Maydell wrote: > On 1 April 2017 at 01:46, Eduardo Habkost <ehabk...@redhat.com> wrote: > > commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset > > cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making > > al

[Qemu-block] [RFC 10/19] sysbus-ahci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
ing <r...@kernel.org> Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: Alistair Francis <alistair.fran...@xilinx.com> Cc: "Edgar E. Iglesias" <edgar.igles...@gmail.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/ide/ahci.c | 5 - 1 fil

[Qemu-block] [RFC 11/19] allwinner-ahci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
<peter.mayd...@linaro.org> Cc: qemu-...@nongnu.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/ide/ahci.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 68f2ce09ee..f60826d6e0 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1815,1

[Qemu-block] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-03-31 Thread Eduardo Habkost
by q35. Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: Alexander Graf <ag...@suse.de> Cc: John Snow <js...@redhat.com> Cc: Kevin Wolf <kw...@redhat.com> Cc: Max Reitz <mre...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Richard Henderson <r...@

[Qemu-block] [RFC 05/19] pflash_cfi01: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/block/pflash_cfi01.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index f48dc20035..594d4cf6fe 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -927,

[Qemu-block] [RFC 04/19] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo

2017-03-31 Thread Eduardo Habkost
lock@nongnu.org Cc: Thomas Huth <th...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/block/fdc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index a06c8e358c..a328693d15 100644 --- a/hw/block/fdc.c +++ b/hw/b

Re: [Qemu-block] [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Eduardo Habkost
On Fri, Mar 31, 2017 at 05:18:39PM +0100, Stefan Hajnoczi wrote: > On Fri, Mar 31, 2017 at 10:40:33AM -0300, Eduardo Habkost wrote: > > On Fri, Mar 31, 2017 at 10:27:44AM -0300, Philippe Mathieu-Daudé wrote: > > > Hi, > > > > > > Eduardo you seem

Re: [Qemu-block] [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters()

2017-03-31 Thread Eduardo Habkost
On Fri, Mar 31, 2017 at 10:27:44AM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > Eduardo you seem skilled regarding Coccinelle scripts, is it possible to > write one to find those overflows? Probably not. AFAIK, Coccinelle rules are based on local code syntax only. This means it doesn't know

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/3] coccinelle: Clean up error checks and return value variables

2016-06-14 Thread Eduardo Habkost
On Tue, Jun 14, 2016 at 11:03:20AM +0200, Markus Armbruster wrote: [...] > > * Manual fixups > > With the commit message of 3/3 amended, series > Reviewed-by: Markus Armbruster > > My other suggested touch ups are optional. If you don't object, I'll do > them, and take the

[Qemu-block] [PATCH v3 0/3] coccinelle: Clean up error checks and return value variables

2016-06-13 Thread Eduardo Habkost
its(format, pixman_image_get_width(image), -pixman_image_get_height(image), NULL, +return pixman_image_create_bits(format, +pixman_image_get_width(image), +pixman_image_get_heigh

Re: [Qemu-block] [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-13 Thread Eduardo Habkost
On Mon, Jun 13, 2016 at 01:29:47PM +0200, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > > Use Coccinelle script to replace 'ret = E; return ret' with > > 'return E'. The script will do the substitution only when the > > function

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-13 Thread Eduardo Habkost
On Mon, Jun 13, 2016 at 08:49:37PM +0200, Markus Armbruster wrote: > Eric Blake writes: [...] > >> > >> See, e.g.: > >> > >> void qmp_guest_suspend_disk(Error **errp) > >> { > >> Error *local_err = NULL; > >> GuestSuspendMode *mode = g_new(GuestSuspendMode, 1); > >>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-13 Thread Eduardo Habkost
On Mon, Jun 13, 2016 at 10:01:16AM -0600, Eric Blake wrote: > On 06/13/2016 09:52 AM, Eduardo Habkost wrote: [...] > > > > See, e.g.: > > > > void qmp_guest_suspend_disk(Error **errp) > > { > > Error *local_err = NULL; > > Guest

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-13 Thread Eduardo Habkost
On Mon, Jun 13, 2016 at 01:42:15PM +0200, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > > This patch simplifies code that uses a local_err variable just to > > immediately use it for an error_propagate() call. > > > > Coccinel

Re: [Qemu-block] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-10 Thread Eduardo Habkost
On Fri, Jun 10, 2016 at 02:59:55PM -0600, Eric Blake wrote: > On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > > This patch simplifies code that uses a local_err variable just to > > immediately use it for an error_propagate() call. > > > > Coccinelle patch used t

[Qemu-block] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-10 Thread Eduardo Habkost
This patch simplifies code that uses a local_err variable just to immediately use it for an error_propagate() call. Coccinelle patch used to perform the changes added to scripts/coccinelle/remove_local_err.cocci. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- b

[Qemu-block] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls

2016-06-10 Thread Eduardo Habkost
error_propagate() already ignores local_err==NULL, so there's no need to check it before calling. Coccinelle patch used to perform the changes added to scripts/coccinelle/error_propagate_null.cocci. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- b

[Qemu-block] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-10 Thread Eduardo Habkost
each maintainer review and apply it? Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- audio/audio.c| 10 ++ block.c | 4 +--- block/archipelago.c | 4 +--- block/qcow2-clu

[Qemu-block] [PATCH v2 0/3] coccinelle: Clean up error checks and return value variables

2016-06-10 Thread Eduardo Habkost
Added script to remove unnecessary variables for function return value. * Coccinelle scripts added to scripts/coccinelle. Eduardo Habkost (3): error: Remove NULL checks on error_propagate() calls error: Remove unnecessary local_err variables [RFC] Remove unnecessary variables for function retur

Re: [Qemu-block] [PATCH] error: Avoid redudant error_propagate() usage

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 02:54:51PM -0600, Eric Blake wrote: > On 06/09/2016 02:47 PM, Eduardo Habkost wrote: > > On Thu, Jun 09, 2016 at 05:21:34PM -0300, Eduardo Habkost wrote: > >> This patch simplifies code that uses a local_err variable just to > &g

[Qemu-block] [PATCH] error: Avoid redudant error_propagate() usage

2016-06-09 Thread Eduardo Habkost
(ARGS, ERRP); ) ... ) } Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- In the end, I found a way to avoid matching cases where local_err is used elsewhere in the function. --- block.c| 4 +--- block/raw-posix.c | 8 ++-- block/raw

Re: [Qemu-block] [Qemu-devel] [PATCH] error: Remove NULL checks on error_propagate() calls

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 01:37:23PM -0600, Eric Blake wrote: [...] > > Hmm - it seems like in most of the cases where the ONLY thing done in > the if (local_err) block is to propagate the error, we should instead be > directly assigning to errp instead of wasting a local variable. At this >

[Qemu-block] [PATCH] error: Remove NULL checks on error_propagate() calls

2016-06-09 Thread Eduardo Habkost
error_propagate() already ignores local_err==NULL, so there's no need to check it before calling. Done using the following Coccinelle patch: @@ identifier L; expression E; @@ -if (L) { error_propagate(E, L); -} Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- b

Re: [Qemu-block] [Qemu-devel] [PATCH] error: Remove NULL checks on error_propagate() calls

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 02:11:23PM -0600, Eric Blake wrote: > On 06/09/2016 01:50 PM, Eduardo Habkost wrote: > > On Thu, Jun 09, 2016 at 01:37:23PM -0600, Eric Blake wrote: > > [...] > >> > >> Hmm - it seems like in most of the cases where the ONLY thing done

Re: [Qemu-block] [Qemu-devel] [RFC] ide: Don't use qemu_hw_version() for firmware revision

2015-11-12 Thread Eduardo Habkost
On Thu, Nov 12, 2015 at 09:27:56AM +0100, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > > The IDEState.version field is used for firmware version > > information returned to the guest. Updating firmware information > > on QEMU upgrad

[Qemu-block] [RFC] ide: Don't use qemu_hw_version() for firmware revision

2015-11-11 Thread Eduardo Habkost
The IDEState.version field is used for firmware version information returned to the guest. Updating firmware information on QEMU upgrade is supposed to be acceptable, so IDE doesn't need the version compatibility magic of qemu_hw_version() and can use QEMU_VERSION directly. Signed-off-by: Eduardo

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-09 Thread Eduardo Habkost
On Mon, Nov 09, 2015 at 01:58:27PM +0800, Xiao Guangrong wrote: > > > On 11/06/2015 11:54 PM, Eduardo Habkost wrote: > >On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > >>lseek can not work for all block devices as the man page says: > >>| Some

Re: [Qemu-block] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-09 Thread Eduardo Habkost
On Mon, Nov 09, 2015 at 12:44:55PM +0800, Xiao Guangrong wrote: > On 11/06/2015 11:50 PM, Eduardo Habkost wrote: > >As this patch affects raw_getlength(), CCing the raw block driver > >maintainer and the qemu-block mailing list. > > Eduardo, thanks for your reminder. I

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does

Re: [Qemu-block] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > It is used to get the size of the specified file, also qemu_fd_getlength() > is introduced to unify the code with

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does not specify > | which devices must support lseek(). > > This patch tries to add the support on Linux by using

[Qemu-block] [PATCH RESEND v2 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-10-30 Thread Eduardo Habkost
d-by: Hannes Reinecke <h...@suse.com> Acked-by: Laszlo Ersek <ler...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/scsi/megasas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index dcd724e

[Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Eduardo Habkost
g Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/scsi/megasas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index a04369c..e0529b1 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -757,7 +757,7 @@ static int meg

Re: [Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Eduardo Habkost
On Tue, Sep 22, 2015 at 10:33:32PM +0200, Laszlo Ersek wrote: > On 09/22/15 22:16, Eduardo Habkost wrote: > > Guest visible data shouldn't change with a simple QEMU upgrade, so use > > qemu_hw_version() to ensure it won't change (as long as the machine > > class being us

<    1   2   3