Re: [PATCH 1/3] Use _abort instead of separate assert()

2020-03-13 Thread Markus Armbruster
Alexander Bulekov writes: > On 200313 1805, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster > > >> index 1a99277d60..aa9eee6ebf 100644 >> --- a/tests/qtest/fuzz/qos_fuzz.c >> +++ b/tests/qtest/fuzz/qos_fuzz.c >> @@ -57,8 +57,7 @@ static void qos_set_machines_devices_available(void)

Re: [PATCH 2/9] qapi/misc: Move add_client command with chardev code

2020-03-13 Thread Marc-André Lureau
Hi On Fri, Mar 13, 2020 at 7:42 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Without looking at the rest of the series, I fail to see the improvement, quite the opposite. A bit of context? > --- > qapi/char.json | 32 >

Re: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()

2020-03-13 Thread BALATON Zoltan
On Fri, 13 Mar 2020, BALATON Zoltan wrote: The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Eric Blake
On 3/13/20 4:54 PM, Markus Armbruster wrote: I append my hacked up version of auto-propagated-errp.cocci. It produces the same patch as yours for the complete tree. // Use ERRP_AUTO_PROPAGATE (see include/qapi/error.h) // // // Usage example: // spatch --sp-file

Re: [PATCH 5/5] block/io: auto-no-fallback for write-zeroes

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD driver may has max_pwrite_zeroes but doesn't has max_pwrite_zeroes_no_fallback limit. This means, that (when BDRV_REQ_NO_FALLBACK is supported) it is beneficial to try send request with BDRV_REQ_NO_FALLBACK instead of splitting the

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 13.03.2020 18:42, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 12.03.2020 19:36, Markus Armbruster wrote: I may have a second look tomorrow with fresher eyes, but let's get this out now as is. Vladimir

Re: [PATCH 4/5] block/io: fix bdrv_co_do_pwrite_zeroes head calculation

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: It's wrong to update head using num in this place, as num may be reduced during the iteration, and we'll have wrong head value on next iteration. Instead update head at iteration end. Cc: qemu-sta...@nongnu.org Signed-off-by: Vladimir

Re: [PATCH v6 1/4] qcow2: introduce compression type feature

2020-03-13 Thread Eric Blake
On 3/12/20 4:22 AM, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be

[PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()

2020-03-13 Thread BALATON Zoltan
The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c | 13 +++-- hw/i386/pc_piix.c

[PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h

2020-03-13 Thread BALATON Zoltan
After previous patches we don't need hw/pci/pci.h any more in hw/ide.h. Some files depended on implicit inclusion by this header which are also fixed up here. Signed-off-by: BALATON Zoltan --- hw/ide/ahci_internal.h| 1 + include/hw/ide.h | 1 - include/hw/ide/pci.h

[PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h

2020-03-13 Thread BALATON Zoltan
We can move it next to the MAX_IDE_BUS define now that less files use it. Signed-off-by: BALATON Zoltan --- include/hw/ide.h | 2 -- include/hw/ide/internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index

[PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h

2020-03-13 Thread BALATON Zoltan
After previous clean ups we can drop direct inclusion of hw/ide.h from several places. Signed-off-by: BALATON Zoltan --- hw/hppa/hppa_sys.h | 1 - hw/hppa/machine.c | 1 - hw/i386/pc_piix.c | 1 - hw/isa/piix4.c | 1 - hw/mips/mips_fulong2e.c | 1 -

[PATCH 2/8] hw/ide: Get rid of piix4_init function

2020-03-13 Thread BALATON Zoltan
This removes pci_piix4_ide_init() function similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan --- hw/ide/piix.c| 12 +--- hw/isa/piix4.c | 5 - include/hw/ide.h | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/ide/piix.c

[PATCH 0/8] Misc hw/ide legacy clean up

2020-03-13 Thread BALATON Zoltan
These are some clean ups to remove more legacy init functions and lessen dependence on include/hw/ide.h with some simplifications in board code. There should be no functional change. BALATON Zoltan (8): hw/ide: Get rid of piix3_init functions hw/ide: Get rid of piix4_init function hw/ide:

[PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors

2020-03-13 Thread BALATON Zoltan
Spaces are required around a + operator and if statements should have braces even for single line. Also make it simpler by reversing the condition instead of breaking the loop. Signed-off-by: BALATON Zoltan --- hw/ide/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 1/8] hw/ide: Get rid of piix3_init functions

2020-03-13 Thread BALATON Zoltan
This removes pci_piix3_ide_init() and pci_piix3_xen_ide_init() functions similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan --- hw/i386/pc_piix.c | 10 +- hw/ide/pci.c | 1 + hw/ide/piix.c | 21 + include/hw/ide.h | 2 -- 4 files

[PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header

2020-03-13 Thread BALATON Zoltan
There are several definitions of MAX_IDE_BUS in different boards (some of them unused) with the same value. Move it to include/hw/ide/internal.h to have it in a central place. Signed-off-by: BALATON Zoltan --- hw/alpha/dp264.c | 2 -- hw/hppa/machine.c | 2 -- hw/i386/pc_piix.c

Re: [PATCH 0/9] user-mode: Prune build dependencies (part 2)

2020-03-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184153.11275-1-phi...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH 0/9] user-mode: Prune build dependencies (part 2)

2020-03-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200313184153.11275-1-phi...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [PATCH 3/5] block: add max_pwrite_zeroes_no_fallback to BlockLimits

2020-03-13 Thread Eric Blake
On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD spec is updated, so that max_block doesn't relate to Maybe: The NBD spec was recently updated to clarify that max_block... NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag BDRV_REQ_NO_FALLBACK). To drop the

Re: [PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread BALATON Zoltan
On Fri, 13 Mar 2020, John Snow wrote: On 3/13/20 4:24 AM, Mark Cave-Ayland wrote: Following on from the earlier thread "Implement "non 100% native mode" in via-ide", here is an updated patchset based upon the test cases sent to me off-list. The VIA IDE controller is similar to early versions

Re: [PATCH 1/7] via-ide: move registration of VMStateDescription to DeviceClass

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/13/20 9:24 AM, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/ide/via.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 096de8dba0..84f0efff94 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -190,8 +190,6 @@ static

Re: [PATCH 3/3] xen-block: Use one Error * variable instead of two

2020-03-13 Thread Philippe Mathieu-Daudé
On 3/13/20 6:05 PM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- hw/block/xen-block.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 3885464513..7b3b6dee97 100644 --- a/hw/block/xen-block.c +++

[PATCH 9/9] qapi/misc: Restrict device memory commands to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 131 +++ qapi/misc.json | 132 include/hw/mem/memory-device.h | 1 + include/hw/virtio/virtio-pmem.h | 2 +- 4 files changed, 133

[PATCH 7/9] qapi/misc: Restrict ACPI commands to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json| 154 +++ qapi/misc.json | 154 --- include/hw/acpi/acpi_dev_interface.h | 2 +- hw/acpi/core.c | 2 +- hw/acpi/cpu.c

[PATCH 6/9] qapi/misc: Restrict query-vm-generation-id command to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 20 qapi/misc.json| 21 - hw/acpi/vmgenid.c | 2 +- stubs/vmgenid.c | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index

[PATCH 8/9] qapi/misc: Restrict PCI commands to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 304 ++ qapi/misc.json| 304 -- hw/pci/pci-stub.c | 2 +- hw/pci/pci.c | 2 +- 4 files changed, 306 insertions(+), 306 deletions(-)

[PATCH 5/9] qapi/misc: Move query-uuid command with block code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/block-core.json | 30 ++ qapi/misc.json | 30 -- block/iscsi.c| 2 +- stubs/uuid.c | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git

[PATCH 1/9] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-03-13 Thread Philippe Mathieu-Daudé
Move out x86-specific structures from generic machine code. Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine-target.json | 45 ++ qapi/machine.json | 42 --- target/i386/cpu.c | 2 +-

[PATCH 2/9] qapi/misc: Move add_client command with chardev code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/char.json | 32 qapi/misc.json | 32 monitor/qmp-cmds.c | 1 + 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/qapi/char.json b/qapi/char.json index

[PATCH 0/9] user-mode: Prune build dependencies (part 2)

2020-03-13 Thread Philippe Mathieu-Daudé
This is the second part of a series reducing user-mode dependencies. By stripping out unused code, the build and testing time is reduced (as is space used by objects). Part 2: - Extract code not related to user-mode from qapi/misc.json Based-on: <20200313183652.10258-1-phi...@redhat.com>

[PATCH 4/9] qapi/misc: Restrict balloon-related commands to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json | 83 ++ qapi/misc.json | 83 -- include/sysemu/balloon.h | 2 +- balloon.c | 2 +- hw/virtio/virtio-balloon.c | 2 +-

[PATCH 3/9] qapi/misc: Restrict LostTickPolicy enum to machine code

2020-03-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json| 32 qapi/misc.json | 32 include/hw/rtc/mc146818rtc.h | 2 +- hw/core/qdev-properties.c| 1 + hw/i386/kvm/i8254.c | 2 +- 5

Re: [PATCH v4 7/7] qemu-img: Deprecate use of -b without -F

2020-03-13 Thread Eric Blake
On 3/12/20 2:28 PM, Eric Blake wrote: Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot, although these days tools like libvirt are aware of the

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-13 Thread Eric Blake
On 3/9/20 10:31 AM, Kashyap Chamarthy wrote: On Fri, Mar 06, 2020 at 04:51:21PM -0600, Eric Blake wrote: Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on +qemu-img backing file without format (since

Re: [PATCH 3/3] xen-block: Use one Error * variable instead of two

2020-03-13 Thread Eric Blake
On 3/13/20 12:05 PM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- hw/block/xen-block.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization:

Re: [PATCH 2/3] hw/misc/ivshmem: Use one Error * variable instead of two

2020-03-13 Thread Eric Blake
On 3/13/20 12:05 PM, Markus Armbruster wrote: Commit fe44dc9180 "migration: disallow migrate_add_blocker during migration" accidentally added a second Error * variable. Use the first one instead. Signed-off-by: Markus Armbruster --- hw/misc/ivshmem.c | 7 +++ 1 file changed, 3

Re: [PATCH 1/3] Use _abort instead of separate assert()

2020-03-13 Thread Eric Blake
On 3/13/20 12:37 PM, Alexander Bulekov wrote: On 200313 1805, Markus Armbruster wrote: Signed-off-by: Markus Armbruster index 1a99277d60..aa9eee6ebf 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -57,8 +57,7 @@ static void

Re: [PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread John Snow
On 3/13/20 4:24 AM, Mark Cave-Ayland wrote: > Following on from the earlier thread "Implement "non 100% native mode" > in via-ide", here is an updated patchset based upon the test cases > sent to me off-list. > > The VIA IDE controller is similar to early versions of the PIIX > controller in

Re: [PATCH 1/3] Use _abort instead of separate assert()

2020-03-13 Thread Alexander Bulekov
On 200313 1805, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > index 1a99277d60..aa9eee6ebf 100644 > --- a/tests/qtest/fuzz/qos_fuzz.c > +++ b/tests/qtest/fuzz/qos_fuzz.c > @@ -57,8 +57,7 @@ static void qos_set_machines_devices_available(void) > QList *lst; > Error *err

Re: [PATCH 0/3] Minor error handling cleanups

2020-03-13 Thread Peter Maydell
On Fri, 13 Mar 2020 at 17:06, Markus Armbruster wrote: > > Markus Armbruster (3): > Use _abort instead of separate assert() > hw/misc/ivshmem: Use one Error * variable instead of two > xen-block: Use one Error * variable instead of two > > block/monitor/block-hmp-cmds.c | 4 +--- >

Re: [EXTERNAL][PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread BALATON Zoltan
Hello, On Fri, 13 Mar 2020, Aleksandar Markovic wrote: Hi, Mark, could you just enumerate those test images, download locations, etc. and whatever else is needed to reproduce the boot processes in question - it would be useful not only for this patch set, but for possible future work, wouldn't

[PATCH 2/3] hw/misc/ivshmem: Use one Error * variable instead of two

2020-03-13 Thread Markus Armbruster
Commit fe44dc9180 "migration: disallow migrate_add_blocker during migration" accidentally added a second Error * variable. Use the first one instead. Signed-off-by: Markus Armbruster --- hw/misc/ivshmem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 1/3] Use _abort instead of separate assert()

2020-03-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block/monitor/block-hmp-cmds.c | 4 +--- target/arm/monitor.c | 8 ++-- tests/qtest/fuzz/qos_fuzz.c| 6 ++ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c

[PATCH 3/3] xen-block: Use one Error * variable instead of two

2020-03-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/block/xen-block.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 3885464513..7b3b6dee97 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -998,14 +998,13 @@ static

[PATCH 0/3] Minor error handling cleanups

2020-03-13 Thread Markus Armbruster
Markus Armbruster (3): Use _abort instead of separate assert() hw/misc/ivshmem: Use one Error * variable instead of two xen-block: Use one Error * variable instead of two block/monitor/block-hmp-cmds.c | 4 +--- hw/block/xen-block.c | 5 + hw/misc/ivshmem.c | 7

Re: [EXTERNAL][PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread Aleksandar Markovic
> From: Mark Cave-Ayland > This patchset effectively updates the VIA IDE PCI device to follow the > behaviour in the datasheet in two ways: fixing some PCI configuration > space register defaults and behaviours, and always using legacy IRQ 14/15 > routing, and once applied allows all our known

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
13.03.2020 18:42, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 12.03.2020 19:36, Markus Armbruster wrote: I may have a second look tomorrow with fresher eyes, but let's get this out now as is. Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 12.03.2020 19:36, Markus Armbruster wrote: >> I may have a second look tomorrow with fresher eyes, but let's get this >> out now as is. >> >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 13.03.2020 10:50, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >> [...] >>> +// Warn several Error * definitions. >>> +@check1 disable optional_qualifier exists@ >>> +identifier fn = rule1.fn, local_err, local_err2; >>> +@@ >>> + >>>

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
13.03.2020 17:58, Markus Armbruster wrote: I tried this script on the whole tree. Observations: * $ git-diff --shortstat \*.[ch] 333 files changed, 3480 insertions(+), 4586 deletions(-) * Twelve functions have "several definitions of Error * local variable". Eight declare such a

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
I tried this script on the whole tree. Observations: * $ git-diff --shortstat \*.[ch] 333 files changed, 3480 insertions(+), 4586 deletions(-) * Twelve functions have "several definitions of Error * local variable". Eight declare such a variable within a loop. Reported because

Re: [PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread BALATON Zoltan
On Fri, 13 Mar 2020, Mark Cave-Ayland wrote: Following on from the earlier thread "Implement "non 100% native mode" in via-ide", here is an updated patchset based upon the test cases sent to me off-list. The VIA IDE controller is similar to early versions of the PIIX controller in that the

[PATCH 2/3] python/qemu: Kill QEMU process if 'quit' doesn't work

2020-03-13 Thread Kevin Wolf
With a QEMU bug, it can happen that the QEMU process doesn't react to a 'quit' QMP command. If we got an exception during previous QMP communication (e.g. iotests Timeout expiring), we could also be in an inconsistent state where after sending 'quit' we immediately read an old response and close

[PATCH 3/3] iotests: Increase pause_wait() timeout

2020-03-13 Thread Kevin Wolf
Waiting for only 1 second proved to be too short on a loaded system, resulting in false positives when testing pull requests. Increase the timeout a bit to make this less likely. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/3] iotests.py: Enable faulthandler

2020-03-13 Thread Kevin Wolf
With this, you can send SIGABRT to a hanging test case and you'll get a Python stack trace so you know where it was hanging. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[PATCH 0/3] iotests: Fix intermittent 030 hang

2020-03-13 Thread Kevin Wolf
Peter ran into a 030 hang while testing a pull request. This turned out to be two bugs in the test suite at once: First was the test failing because a timeout was apparently too short, second was that the timeout would actually cause the test to hang instead of failing. This series should fix

[PATCH 7/7] via-ide: always use legacy IRQ 14/15 routing

2020-03-13 Thread Mark Cave-Ayland
The existing code uses fixed PCI IRQ routing on IRQ 14 rather than legacy IRQ 14/15 routing as documented in the datasheet. With the changes in this patchset guest OSs now correctly detect and configure the VIA controller in legacy IRQ routing mode, allowing the incorrect fixed PCI IRQ routing to

[PATCH 5/7] via-ide: initialise IDE controller in legacy mode

2020-03-13 Thread Mark Cave-Ayland
According to both the VT82C686B and VT8231 datasheets the VIA Southbridge IDE controller is initialised in legacy mode. This allows Linux to correctly determine that legacy rather than PCI IRQ routing should be used since the boot console text in the fulong2e test image changes from: scsi0 :

[PATCH 4/7] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value

2020-03-13 Thread Mark Cave-Ayland
Some firmwares accidentally write to PCI_INTERRUPT_LINE on startup which has no effect on real hardware since it is hard-wired to its default value, but causes the guest OS to become confused trying to initialise IDE devices when running under QEMU. Signed-off-by: Mark Cave-Ayland ---

[PATCH 3/7] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-13 Thread Mark Cave-Ayland
From: BALATON Zoltan The pci_do_device_reset() function (called from pci_device_reset) clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did this without taking wmask into account. We'll have a device model now that needs to set a constant value for this reg and this patch

[PATCH 1/7] via-ide: move registration of VMStateDescription to DeviceClass

2020-03-13 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/ide/via.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 096de8dba0..84f0efff94 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -190,8 +190,6 @@ static void via_ide_realize(PCIDevice *dev, Error

[PATCH 0/7] via-ide: fixes and improvements

2020-03-13 Thread Mark Cave-Ayland
Following on from the earlier thread "Implement "non 100% native mode" in via-ide", here is an updated patchset based upon the test cases sent to me off-list. The VIA IDE controller is similar to early versions of the PIIX controller in that the primary and secondary IDE channels are hardwired to

[PATCH 2/7] ide/via: Get rid of via_ide_init()

2020-03-13 Thread Mark Cave-Ayland
From: BALATON Zoltan Follow example of CMD646 and remove via_ide_init function and do it directly in board code instead. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland --- hw/ide/via.c| 8 hw/mips/mips_fulong2e.c | 5 - include/hw/ide.h| 1 - 3

[PATCH 6/7] via-ide: allow guests to write to PCI_CLASS_PROG

2020-03-13 Thread Mark Cave-Ayland
MorphOS writes to PCI_CLASS_PROG during IDE initialisation to place the controller in native mode, but thinks the initialisation has failed because the native mode bits aren't set when reading the register back. Signed-off-by: Mark Cave-Ayland --- hw/ide/via.c | 1 + 1 file changed, 1

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
13.03.2020 10:50, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: [...] +// Warn several Error * definitions. +@check1 disable optional_qualifier exists@ +identifier fn = rule1.fn, local_err, local_err2; +@@ + + fn(..., Error ** , ...) + { + ... + Error *local_err =

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: [...] > +// Warn several Error * definitions. > +@check1 disable optional_qualifier exists@ > +identifier fn = rule1.fn, local_err, local_err2; > +@@ > + > + fn(..., Error ** , ...) > + { > + ... > + Error *local_err = NULL; > + ... when any >

Re: [PATCH v4 00/10] Further bitmaps improvements

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
12.03.2020 23:41, John Snow wrote: On 3/12/20 1:59 AM, Vladimir Sementsov-Ogievskiy wrote: 11.03.2020 20:03, John Snow wrote: On 3/11/20 9:58 AM, Vladimir Sementsov-Ogievskiy wrote: 11.03.2020 12:55, Max Reitz wrote: On 11.03.20 07:17, Vladimir Sementsov-Ogievskiy wrote: 10.03.2020

Re: [PATCH] block/io: fix bdrv_co_do_copy_on_readv

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
13.03.2020 2:09, John Snow wrote: On 3/12/20 4:19 AM, Vladimir Sementsov-Ogievskiy wrote: Prior to 1143ec5ebf4 it was OK to qemu_iovec_from_buf() from aligned-up buffer to original qiov, as qemu_iovec_from_buf() will stop at qiov end anyway. But after 1143ec5ebf4 we assume that

Re: [PATCH v9 00/10] error: auto propagated local_err part I

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
12.03.2020 17:24, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: v9 01: A lot of rewordings [thanks to Eric] Still, keep all r-b marks, assuming that they are mostly about macro definition 02: significant changes are: 1. Do not match double propagation pattern in

Re: [PATCH v9 02/10] scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE()

2020-03-13 Thread Vladimir Sementsov-Ogievskiy
12.03.2020 19:36, Markus Armbruster wrote: I may have a second look tomorrow with fresher eyes, but let's get this out now as is. Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details