All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/3] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing
  2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
@ 2020-03-09 19:18 ` BALATON Zoltan
  2020-03-09 19:18 ` [PATCH v3 3/3] via-ide: Also emulate non 100% native mode BALATON Zoltan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 19:18 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: John Snow, Mark Cave-Ayland, Aleksandar Markovic, philmd,
	Artyom Tarasenko, Richard Henderson

We'll need a flag for implementing some device specific behaviour in
via-ide but we already have a currently CMD646 specific field that can
be repurposed for this and leave room for furhter flags if needed in
the future. This patch changes the "secondary" field to "flags" and
define the flags for CMD646 and via-ide and change CMD646 and its
users accordingly.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/alpha/dp264.c     |  2 +-
 hw/ide/cmd646.c      | 12 ++++++------
 hw/sparc64/sun4u.c   |  9 ++-------
 include/hw/ide.h     |  4 ++--
 include/hw/ide/pci.h |  7 ++++++-
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index e5350a287f..f104e5dfa4 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -103,7 +103,7 @@ static void clipper_init(MachineState *machine)
         DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
         ide_drive_get(hd, ARRAY_SIZE(hd));
 
-        pci_cmd646_ide_init(pci_bus, hd, 0);
+        pci_cmd646_ide_init(pci_bus, hd, -1, false);
     }
 
     /* Load PALcode.  Given that this is not "real" cpu palcode,
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 335c060673..0be650791f 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -256,7 +256,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
     pci_conf[PCI_CLASS_PROG] = 0x8f;
 
     pci_conf[CNTRL] = CNTRL_EN_CH0; // enable IDE0
-    if (d->secondary) {
+    if (d->flags & BIT(PCI_IDE_SECONDARY)) {
         /* XXX: if not enabled, really disable the seconday IDE controller */
         pci_conf[CNTRL] |= CNTRL_EN_CH1; /* enable IDE1 */
     }
@@ -317,20 +317,20 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
     }
 }
 
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
-                         int secondary_ide_enabled)
+void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
+                         bool secondary_ide_enabled)
 {
     PCIDevice *dev;
 
-    dev = pci_create(bus, -1, "cmd646-ide");
-    qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
+    dev = pci_create(bus, devfn, "cmd646-ide");
+    qdev_prop_set_bit(&dev->qdev, "secondary", secondary_ide_enabled);
     qdev_init_nofail(&dev->qdev);
 
     pci_ide_create_devs(dev, hd_table);
 }
 
 static Property cmd646_ide_properties[] = {
-    DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
+    DEFINE_PROP_BIT("secondary", PCIIDEState, flags, PCI_IDE_SECONDARY, false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d33e84f831..fbe6790847 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -50,8 +50,7 @@
 #include "hw/sparc/sparc64.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/sysbus.h"
-#include "hw/ide.h"
-#include "hw/ide/pci.h"
+#include "hw/ide/internal.h"
 #include "hw/loader.h"
 #include "hw/fw-path-provider.h"
 #include "elf.h"
@@ -664,11 +663,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
     }
 
     ide_drive_get(hd, ARRAY_SIZE(hd));
-
-    pci_dev = pci_create(pci_busA, PCI_DEVFN(3, 0), "cmd646-ide");
-    qdev_prop_set_uint32(&pci_dev->qdev, "secondary", 1);
-    qdev_init_nofail(&pci_dev->qdev);
-    pci_ide_create_devs(pci_dev, hd);
+    pci_cmd646_ide_init(pci_busA, hd, PCI_DEVFN(3, 0), true);
 
     /* Map NVRAM into I/O (ebus) space */
     nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
diff --git a/include/hw/ide.h b/include/hw/ide.h
index 28d8a06439..d88c5ee695 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -12,8 +12,8 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
                         DriveInfo *hd0, DriveInfo *hd1);
 
 /* ide-pci.c */
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
-                         int secondary_ide_enabled);
+void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
+                         bool secondary_ide_enabled);
 PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h
index a9f2c33e68..21075edf16 100644
--- a/include/hw/ide/pci.h
+++ b/include/hw/ide/pci.h
@@ -40,6 +40,11 @@ typedef struct BMDMAState {
 #define TYPE_PCI_IDE "pci-ide"
 #define PCI_IDE(obj) OBJECT_CHECK(PCIIDEState, (obj), TYPE_PCI_IDE)
 
+enum {
+    PCI_IDE_SECONDARY, /* used only for cmd646 */
+    PCI_IDE_LEGACY_IRQ
+};
+
 typedef struct PCIIDEState {
     /*< private >*/
     PCIDevice parent_obj;
@@ -47,7 +52,7 @@ typedef struct PCIIDEState {
 
     IDEBus bus[2];
     BMDMAState bmdma[2];
-    uint32_t secondary; /* used only for cmd646 */
+    uint32_t flags;
     MemoryRegion bmdma_bar;
     MemoryRegion cmd_bar[2];
     MemoryRegion data_bar[2];
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/3] via-ide: Also emulate non 100% native mode
  2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
  2020-03-09 19:18 ` [PATCH v3 1/3] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing BALATON Zoltan
@ 2020-03-09 19:18 ` BALATON Zoltan
  2020-03-09 20:36   ` Michael S. Tsirkin
  2020-03-09 19:18 ` [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE BALATON Zoltan
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 19:18 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: John Snow, Mark Cave-Ayland, Aleksandar Markovic, philmd,
	Artyom Tarasenko, Richard Henderson

Some machines operate in "non 100% native mode" where interrupts are
fixed at legacy IDE interrupts and some guests expect this behaviour
without checking based on knowledge about hardware. Even Linux has
arch specific workarounds for this that are activated on such boards
so this needs to be emulated as well.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
v2: Don't use PCI_INTERRUPT_LINE in via_ide_set_irq()
v3: Patch pci.c instead of local workaround for PCI reset clearing
    PCI_INTERRUPT_PIN config reg

 hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
 hw/mips/mips_fulong2e.c |  2 +-
 include/hw/ide.h        |  3 ++-
 3 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 096de8dba0..02d29809f2 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -1,9 +1,10 @@
 /*
- * QEMU IDE Emulation: PCI VIA82C686B support.
+ * QEMU VIA southbridge IDE emulation (VT82C686B, VT8231)
  *
  * Copyright (c) 2003 Fabrice Bellard
  * Copyright (c) 2006 Openedhand Ltd.
  * Copyright (c) 2010 Huacai Chen <zltjiangshi@gmail.com>
+ * Copyright (c) 2019-2020 BALATON Zoltan
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -25,6 +26,8 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/range.h"
+#include "hw/qdev-properties.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
@@ -111,11 +114,18 @@ static void via_ide_set_irq(void *opaque, int n, int level)
     } else {
         d->config[0x70 + n * 8] &= ~0x80;
     }
-
     level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
-    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
-    if (n) {
-        qemu_set_irq(isa_get_irq(NULL, n), level);
+
+    /*
+     * Some machines operate in "non 100% native mode" where PCI_INTERRUPT_LINE
+     * is not used but IDE always uses ISA IRQ 14 and 15 even in native mode.
+     * Some guest drivers expect this, often without checking.
+     */
+    if (!(pci_get_byte(d->config + PCI_CLASS_PROG) & (n ? 4 : 1)) ||
+        PCI_IDE(d)->flags & BIT(PCI_IDE_LEGACY_IRQ)) {
+        qemu_set_irq(isa_get_irq(NULL, (n ? 15 : 14)), level);
+    } else {
+        qemu_set_irq(isa_get_irq(NULL, 14), level);
     }
 }
 
@@ -169,7 +179,8 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
 
     pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
     pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
-    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
+    dev->wmask[PCI_CLASS_PROG] = 5;
+    dev->wmask[PCI_INTERRUPT_LINE] = 0;
 
     memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops,
                           &d->bus[0], "via-ide0-data", 8);
@@ -213,14 +224,23 @@ static void via_ide_exitfn(PCIDevice *dev)
     }
 }
 
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
+void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
+                  bool legacy_irq)
 {
     PCIDevice *dev;
 
-    dev = pci_create_simple(bus, devfn, "via-ide");
+    dev = pci_create(bus, devfn, "via-ide");
+    qdev_prop_set_bit(&dev->qdev, "legacy-irq", legacy_irq);
+    qdev_init_nofail(&dev->qdev);
     pci_ide_create_devs(dev, hd_table);
 }
 
+static Property via_ide_properties[] = {
+    DEFINE_PROP_BIT("legacy-irq", PCIIDEState, flags, PCI_IDE_LEGACY_IRQ,
+                    false),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 static void via_ide_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -233,6 +253,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_VIA_IDE;
     k->revision = 0x06;
     k->class_id = PCI_CLASS_STORAGE_IDE;
+    device_class_set_props(dc, via_ide_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 4727b1d3a4..150182c62a 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -257,7 +257,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
     isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
 
     ide_drive_get(hd, ARRAY_SIZE(hd));
-    via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1));
+    via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1), false);
 
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
diff --git a/include/hw/ide.h b/include/hw/ide.h
index d88c5ee695..2a7001ccba 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -18,7 +18,8 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
+void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
+                  bool legacy_irq);
 
 /* ide-mmio.c */
 void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 0/3] Implement "non 100% native mode" in via-ide
@ 2020-03-09 19:18 BALATON Zoltan
  2020-03-09 19:18 ` [PATCH v3 1/3] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing BALATON Zoltan
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 19:18 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: John Snow, Mark Cave-Ayland, Aleksandar Markovic, philmd,
	Artyom Tarasenko, Richard Henderson

This small series implements "non-100% native mode" of via-ide found
at least on pegasos2 where io addresses come from PCI BARs but
interrupts are hard coded to legacy IRQ14 and 15. This is needed for
guests that expect it and activate work arounds on that platform and
don't work unless this is emulated. (Symptom is missing IDE IRQs after
enabling BMDMA and boot freezes waiting for interrupt.)

We need a flag to turn this mode on or off so the first patch
repurposes the last remaining CMD646 specific field in PCIIDEState to
allow more flags and make room for the new legacy-irq flag there. (The
CMD646 may need similar mode or something else may need more flags in
the future.) Boards using CMD646 and VIA IDE are updated for the above
changes. Second patch fixes up PCI reset to not clear value set by
device emulation on bus reset when wmask does not allow that.

Tested with Linux and MorphOS on pegasos2 and a Gentoo live CD kernel
for mips_fulong2e that's the only one I could find but being beta not
sure if that fully works on real hardware. (The mips_fulong2e also
seems to have problems with pci devices so to boot Linux you need
-net none -vga none and use serial console otherwise the kernel panics.)

Regards,
BALATON Zoltan

BALATON Zoltan (3):
  ide: Make room for flags in PCIIDEState and add one for legacy IRQ
    routing
  pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  via-ide: Also emulate non 100% native mode

 hw/alpha/dp264.c        |  2 +-
 hw/ide/cmd646.c         | 12 ++++++------
 hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
 hw/mips/mips_fulong2e.c |  2 +-
 hw/pci/pci.c            |  4 +++-
 hw/sparc64/sun4u.c      |  9 ++-------
 include/hw/ide.h        |  7 ++++---
 include/hw/ide/pci.h    |  7 ++++++-
 8 files changed, 52 insertions(+), 28 deletions(-)

-- 
2.21.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
  2020-03-09 19:18 ` [PATCH v3 1/3] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing BALATON Zoltan
  2020-03-09 19:18 ` [PATCH v3 3/3] via-ide: Also emulate non 100% native mode BALATON Zoltan
@ 2020-03-09 19:18 ` BALATON Zoltan
  2020-03-09 20:39   ` Michael S. Tsirkin
  2020-03-09 21:16 ` [PATCH v3 0/3] Implement "non 100% native mode" in via-ide no-reply
  2020-03-10 18:31 ` Mark Cave-Ayland
  4 siblings, 1 reply; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 19:18 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: Michael S. Tsirkin, John Snow, Mark Cave-Ayland,
	Aleksandar Markovic, philmd, Artyom Tarasenko, Richard Henderson

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 allows
to do that without additional workaround in device emulation to
reverse the effect of this PCI bus reset function.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/pci/pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e1ed6677e1..d07e4ed9de 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
     pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
                                  pci_get_word(dev->wmask + PCI_STATUS) |
                                  pci_get_word(dev->w1cmask + PCI_STATUS));
+    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
+                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
+                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
     dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
-    dev->config[PCI_INTERRUPT_LINE] = 0x0;
     for (r = 0; r < PCI_NUM_REGIONS; ++r) {
         PCIIORegion *region = &dev->io_regions[r];
         if (!region->size) {
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode
  2020-03-09 19:18 ` [PATCH v3 3/3] via-ide: Also emulate non 100% native mode BALATON Zoltan
@ 2020-03-09 20:36   ` Michael S. Tsirkin
  2020-03-09 20:50     ` BALATON Zoltan
  0 siblings, 1 reply; 16+ messages in thread
From: Michael S. Tsirkin @ 2020-03-09 20:36 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
> Some machines operate in "non 100% native mode" where interrupts are
> fixed at legacy IDE interrupts and some guests expect this behaviour
> without checking based on knowledge about hardware. Even Linux has
> arch specific workarounds for this that are activated on such boards
> so this needs to be emulated as well.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> v2: Don't use PCI_INTERRUPT_LINE in via_ide_set_irq()
> v3: Patch pci.c instead of local workaround for PCI reset clearing
>     PCI_INTERRUPT_PIN config reg
> 
>  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
>  hw/mips/mips_fulong2e.c |  2 +-
>  include/hw/ide.h        |  3 ++-
>  3 files changed, 32 insertions(+), 10 deletions(-)
> 
> diff --git a/hw/ide/via.c b/hw/ide/via.c
> index 096de8dba0..02d29809f2 100644
> --- a/hw/ide/via.c
> +++ b/hw/ide/via.c
> @@ -1,9 +1,10 @@
>  /*
> - * QEMU IDE Emulation: PCI VIA82C686B support.
> + * QEMU VIA southbridge IDE emulation (VT82C686B, VT8231)
>   *
>   * Copyright (c) 2003 Fabrice Bellard
>   * Copyright (c) 2006 Openedhand Ltd.
>   * Copyright (c) 2010 Huacai Chen <zltjiangshi@gmail.com>
> + * Copyright (c) 2019-2020 BALATON Zoltan
>   *
>   * Permission is hereby granted, free of charge, to any person obtaining a copy
>   * of this software and associated documentation files (the "Software"), to deal
> @@ -25,6 +26,8 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu/range.h"
> +#include "hw/qdev-properties.h"
>  #include "hw/pci/pci.h"
>  #include "migration/vmstate.h"
>  #include "qemu/module.h"
> @@ -111,11 +114,18 @@ static void via_ide_set_irq(void *opaque, int n, int level)
>      } else {
>          d->config[0x70 + n * 8] &= ~0x80;
>      }
> -
>      level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
> -    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
> -    if (n) {
> -        qemu_set_irq(isa_get_irq(NULL, n), level);
> +
> +    /*
> +     * Some machines operate in "non 100% native mode" where PCI_INTERRUPT_LINE
> +     * is not used but IDE always uses ISA IRQ 14 and 15 even in native mode.
> +     * Some guest drivers expect this, often without checking.
> +     */
> +    if (!(pci_get_byte(d->config + PCI_CLASS_PROG) & (n ? 4 : 1)) ||
> +        PCI_IDE(d)->flags & BIT(PCI_IDE_LEGACY_IRQ)) {
> +        qemu_set_irq(isa_get_irq(NULL, (n ? 15 : 14)), level);
> +    } else {
> +        qemu_set_irq(isa_get_irq(NULL, 14), level);
>      }
>  }
>  
> @@ -169,7 +179,8 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
>  
>      pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
>      pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
> -    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
> +    dev->wmask[PCI_CLASS_PROG] = 5;

What's the story here? Why is class suddenly writeable?

> +    dev->wmask[PCI_INTERRUPT_LINE] = 0;
>  
>      memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops,
>                            &d->bus[0], "via-ide0-data", 8);
> @@ -213,14 +224,23 @@ static void via_ide_exitfn(PCIDevice *dev)
>      }
>  }
>  
> -void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
> +void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
> +                  bool legacy_irq)
>  {
>      PCIDevice *dev;
>  
> -    dev = pci_create_simple(bus, devfn, "via-ide");
> +    dev = pci_create(bus, devfn, "via-ide");
> +    qdev_prop_set_bit(&dev->qdev, "legacy-irq", legacy_irq);
> +    qdev_init_nofail(&dev->qdev);
>      pci_ide_create_devs(dev, hd_table);
>  }
>  
> +static Property via_ide_properties[] = {
> +    DEFINE_PROP_BIT("legacy-irq", PCIIDEState, flags, PCI_IDE_LEGACY_IRQ,
> +                    false),
> +    DEFINE_PROP_END_OF_LIST(),
> +};
> +
>  static void via_ide_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> @@ -233,6 +253,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
>      k->device_id = PCI_DEVICE_ID_VIA_IDE;
>      k->revision = 0x06;
>      k->class_id = PCI_CLASS_STORAGE_IDE;
> +    device_class_set_props(dc, via_ide_properties);
>      set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
>  }
>  
> diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
> index 4727b1d3a4..150182c62a 100644
> --- a/hw/mips/mips_fulong2e.c
> +++ b/hw/mips/mips_fulong2e.c
> @@ -257,7 +257,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
>      isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
>  
>      ide_drive_get(hd, ARRAY_SIZE(hd));
> -    via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1));
> +    via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1), false);
>  
>      pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
>      pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
> diff --git a/include/hw/ide.h b/include/hw/ide.h
> index d88c5ee695..2a7001ccba 100644
> --- a/include/hw/ide.h
> +++ b/include/hw/ide.h
> @@ -18,7 +18,8 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
>  PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
>  PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
>  int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
> -void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
> +void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn,
> +                  bool legacy_irq);
>  
>  /* ide-mmio.c */
>  void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
> -- 
> 2.21.1
> 
> 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-09 19:18 ` [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE BALATON Zoltan
@ 2020-03-09 20:39   ` Michael S. Tsirkin
  2020-03-09 20:54     ` BALATON Zoltan
  0 siblings, 1 reply; 16+ messages in thread
From: Michael S. Tsirkin @ 2020-03-09 20:39 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
> 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 allows
> to do that without additional workaround in device emulation to
> reverse the effect of this PCI bus reset function.
> 
> Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/pci/pci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index e1ed6677e1..d07e4ed9de 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
>      pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
>                                   pci_get_word(dev->wmask + PCI_STATUS) |
>                                   pci_get_word(dev->w1cmask + PCI_STATUS));
> +    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
> +                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
> +                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));

PCI spec says:

Interrupt Line
The Interrupt Line register is an eight-bit register used to communicate interrupt line routing
information.

I don't see how it makes sense to access it as a word.


>      dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
> -    dev->config[PCI_INTERRUPT_LINE] = 0x0;
>      for (r = 0; r < PCI_NUM_REGIONS; ++r) {
>          PCIIORegion *region = &dev->io_regions[r];
>          if (!region->size) {

Please add comments here explaining that some devices
make PCI_INTERRUPT_LINE read-only.


> -- 
> 2.21.1
> 
> 



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode
  2020-03-09 20:36   ` Michael S. Tsirkin
@ 2020-03-09 20:50     ` BALATON Zoltan
  2020-03-09 21:06       ` BALATON Zoltan
  2020-03-10  3:32       ` Michael S. Tsirkin
  0 siblings, 2 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 20:50 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
>> Some machines operate in "non 100% native mode" where interrupts are
>> fixed at legacy IDE interrupts and some guests expect this behaviour
>> without checking based on knowledge about hardware. Even Linux has
>> arch specific workarounds for this that are activated on such boards
>> so this needs to be emulated as well.
>>
>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>> ---
>> v2: Don't use PCI_INTERRUPT_LINE in via_ide_set_irq()
>> v3: Patch pci.c instead of local workaround for PCI reset clearing
>>     PCI_INTERRUPT_PIN config reg
>>
>>  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
>>  hw/mips/mips_fulong2e.c |  2 +-
>>  include/hw/ide.h        |  3 ++-
>>  3 files changed, 32 insertions(+), 10 deletions(-)
>>
>> diff --git a/hw/ide/via.c b/hw/ide/via.c
>> index 096de8dba0..02d29809f2 100644
>> --- a/hw/ide/via.c
>> +++ b/hw/ide/via.c
>> @@ -1,9 +1,10 @@
>>  /*
>> - * QEMU IDE Emulation: PCI VIA82C686B support.
>> + * QEMU VIA southbridge IDE emulation (VT82C686B, VT8231)
>>   *
>>   * Copyright (c) 2003 Fabrice Bellard
>>   * Copyright (c) 2006 Openedhand Ltd.
>>   * Copyright (c) 2010 Huacai Chen <zltjiangshi@gmail.com>
>> + * Copyright (c) 2019-2020 BALATON Zoltan
>>   *
>>   * Permission is hereby granted, free of charge, to any person obtaining a copy
>>   * of this software and associated documentation files (the "Software"), to deal
>> @@ -25,6 +26,8 @@
>>   */
>>
>>  #include "qemu/osdep.h"
>> +#include "qemu/range.h"
>> +#include "hw/qdev-properties.h"
>>  #include "hw/pci/pci.h"
>>  #include "migration/vmstate.h"
>>  #include "qemu/module.h"
>> @@ -111,11 +114,18 @@ static void via_ide_set_irq(void *opaque, int n, int level)
>>      } else {
>>          d->config[0x70 + n * 8] &= ~0x80;
>>      }
>> -
>>      level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
>> -    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
>> -    if (n) {
>> -        qemu_set_irq(isa_get_irq(NULL, n), level);
>> +
>> +    /*
>> +     * Some machines operate in "non 100% native mode" where PCI_INTERRUPT_LINE
>> +     * is not used but IDE always uses ISA IRQ 14 and 15 even in native mode.
>> +     * Some guest drivers expect this, often without checking.
>> +     */
>> +    if (!(pci_get_byte(d->config + PCI_CLASS_PROG) & (n ? 4 : 1)) ||
>> +        PCI_IDE(d)->flags & BIT(PCI_IDE_LEGACY_IRQ)) {
>> +        qemu_set_irq(isa_get_irq(NULL, (n ? 15 : 14)), level);
>> +    } else {
>> +        qemu_set_irq(isa_get_irq(NULL, 14), level);
>>      }
>>  }
>>
>> @@ -169,7 +179,8 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
>>
>>      pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
>>      pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
>> -    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
>> +    dev->wmask[PCI_CLASS_PROG] = 5;
>
> What's the story here? Why is class suddenly writeable?

The via-ide (function 1 of some VIA southbridge chips) use bits in this 
reg to set legacy compatibility mode as described in VT82C686B and VT8231 
datasheets and Linux writes this on pegasos2 board I'm emulating. See 
longer description in this message:

https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg00019.html

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-09 20:39   ` Michael S. Tsirkin
@ 2020-03-09 20:54     ` BALATON Zoltan
  2020-03-10  3:36       ` Michael S. Tsirkin
  2020-03-10 18:15       ` Mark Cave-Ayland
  0 siblings, 2 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 20:54 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
>> 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 allows
>> to do that without additional workaround in device emulation to
>> reverse the effect of this PCI bus reset function.
>>
>> Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>> ---
>>  hw/pci/pci.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>> index e1ed6677e1..d07e4ed9de 100644
>> --- a/hw/pci/pci.c
>> +++ b/hw/pci/pci.c
>> @@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
>>      pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
>>                                   pci_get_word(dev->wmask + PCI_STATUS) |
>>                                   pci_get_word(dev->w1cmask + PCI_STATUS));
>> +    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
>> +                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
>> +                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
>
> PCI spec says:
>
> Interrupt Line
> The Interrupt Line register is an eight-bit register used to communicate interrupt line routing
> information.
>
> I don't see how it makes sense to access it as a word.

Patch actually comes from Mark, I don't know. Should we change it to 
pci_byte_test_and_clear_mask or what's the appropriate way here?

>
>>      dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
>> -    dev->config[PCI_INTERRUPT_LINE] = 0x0;
>>      for (r = 0; r < PCI_NUM_REGIONS; ++r) {
>>          PCIIORegion *region = &dev->io_regions[r];
>>          if (!region->size) {
>
> Please add comments here explaining that some devices
> make PCI_INTERRUPT_LINE read-only.

Something like the commit message would be appropriate?

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode
  2020-03-09 20:50     ` BALATON Zoltan
@ 2020-03-09 21:06       ` BALATON Zoltan
  2020-03-10  3:32       ` Michael S. Tsirkin
  1 sibling, 0 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-09 21:06 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, 9 Mar 2020, BALATON Zoltan wrote:
> On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
>> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
>>> Some machines operate in "non 100% native mode" where interrupts are
>>> fixed at legacy IDE interrupts and some guests expect this behaviour
>>> without checking based on knowledge about hardware. Even Linux has
>>> arch specific workarounds for this that are activated on such boards
>>> so this needs to be emulated as well.
>>> 
>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>>> ---
>>> v2: Don't use PCI_INTERRUPT_LINE in via_ide_set_irq()
>>> v3: Patch pci.c instead of local workaround for PCI reset clearing
>>>     PCI_INTERRUPT_PIN config reg
>>>
>>>  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
>>>  hw/mips/mips_fulong2e.c |  2 +-
>>>  include/hw/ide.h        |  3 ++-
>>>  3 files changed, 32 insertions(+), 10 deletions(-)
>>> 
>>> diff --git a/hw/ide/via.c b/hw/ide/via.c
>>> index 096de8dba0..02d29809f2 100644
>>> --- a/hw/ide/via.c
>>> +++ b/hw/ide/via.c
>>> @@ -1,9 +1,10 @@
>>>  /*
>>> - * QEMU IDE Emulation: PCI VIA82C686B support.
>>> + * QEMU VIA southbridge IDE emulation (VT82C686B, VT8231)
>>>   *
>>>   * Copyright (c) 2003 Fabrice Bellard
>>>   * Copyright (c) 2006 Openedhand Ltd.
>>>   * Copyright (c) 2010 Huacai Chen <zltjiangshi@gmail.com>
>>> + * Copyright (c) 2019-2020 BALATON Zoltan
>>>   *
>>>   * Permission is hereby granted, free of charge, to any person obtaining 
>>> a copy
>>>   * of this software and associated documentation files (the "Software"), 
>>> to deal
>>> @@ -25,6 +26,8 @@
>>>   */
>>>
>>>  #include "qemu/osdep.h"
>>> +#include "qemu/range.h"
>>> +#include "hw/qdev-properties.h"
>>>  #include "hw/pci/pci.h"
>>>  #include "migration/vmstate.h"
>>>  #include "qemu/module.h"
>>> @@ -111,11 +114,18 @@ static void via_ide_set_irq(void *opaque, int n, int 
>>> level)
>>>      } else {
>>>          d->config[0x70 + n * 8] &= ~0x80;
>>>      }
>>> -
>>>      level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
>>> -    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
>>> -    if (n) {
>>> -        qemu_set_irq(isa_get_irq(NULL, n), level);
>>> +
>>> +    /*
>>> +     * Some machines operate in "non 100% native mode" where 
>>> PCI_INTERRUPT_LINE
>>> +     * is not used but IDE always uses ISA IRQ 14 and 15 even in native 
>>> mode.
>>> +     * Some guest drivers expect this, often without checking.
>>> +     */
>>> +    if (!(pci_get_byte(d->config + PCI_CLASS_PROG) & (n ? 4 : 1)) ||
>>> +        PCI_IDE(d)->flags & BIT(PCI_IDE_LEGACY_IRQ)) {
>>> +        qemu_set_irq(isa_get_irq(NULL, (n ? 15 : 14)), level);
>>> +    } else {
>>> +        qemu_set_irq(isa_get_irq(NULL, 14), level);
>>>      }
>>>  }
>>> 
>>> @@ -169,7 +179,8 @@ static void via_ide_realize(PCIDevice *dev, Error 
>>> **errp)
>>>
>>>      pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode 
>>> */
>>>      pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
>>> -    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
>>> +    dev->wmask[PCI_CLASS_PROG] = 5;
>> 
>> What's the story here? Why is class suddenly writeable?
>
> The via-ide (function 1 of some VIA southbridge chips) use bits in this reg 
> to set legacy compatibility mode as described in VT82C686B and VT8231 
> datasheets and Linux writes this on pegasos2 board I'm emulating. See longer 
> description in this message:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg00019.html

And before we go through all previous discussions again I'd like to add 
that the comment in Linux fixup function saying that firmware sets 
conroller in legacy mode is wrong it does actually set it in native mode 
but on this hardware IRQs are hardcoded to legacy interrupts for some 
reason even in native mode. Most guest OSes just know this and expect that 
without looking at config regs but Linux uses this reg to force its driver 
to legacy mode despite using io addresses from PCI BARs which Linux calls 
non-100% native mode. This probably happens on some platforms but looks 
like pegasos2 will be the first in QEMU.

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/3] Implement "non 100% native mode" in via-ide
  2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
                   ` (2 preceding siblings ...)
  2020-03-09 19:18 ` [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE BALATON Zoltan
@ 2020-03-09 21:16 ` no-reply
  2020-03-10 18:31 ` Mark Cave-Ayland
  4 siblings, 0 replies; 16+ messages in thread
From: no-reply @ 2020-03-09 21:16 UTC (permalink / raw)
  To: balaton
  Cc: qemu-block, philmd, mark.cave-ayland, qemu-devel, amarkovic,
	jsnow, atar4qemu, rth

Patchew URL: https://patchew.org/QEMU/cover.1583781493.git.balaton@eik.bme.hu/



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
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

PASS 1 fdc-test /x86_64/fdc/cmos
PASS 2 fdc-test /x86_64/fdc/no_media_on_start
PASS 3 fdc-test /x86_64/fdc/read_without_media
==6206==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 fdc-test /x86_64/fdc/media_change
PASS 5 fdc-test /x86_64/fdc/sense_interrupt
PASS 6 fdc-test /x86_64/fdc/relative_seek
---
PASS 32 test-opts-visitor /visitor/opts/range/beyond
PASS 33 test-opts-visitor /visitor/opts/dict/unvisited
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-coroutine -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-coroutine" 
==6249==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-coroutine /basic/no-dangling-access
PASS 2 test-coroutine /basic/lifecycle
PASS 3 test-coroutine /basic/yield
==6249==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff1325c000; bottom 0x7f172b0bd000; size: 0x00e7e819f000 (996031459328)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 4 test-coroutine /basic/nesting
---
PASS 11 test-aio /aio/event/wait
PASS 12 test-aio /aio/event/flush
PASS 13 test-aio /aio/event/wait/no-flush-cb
==6264==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 test-aio /aio/timer/schedule
PASS 15 test-aio /aio/coroutine/queue-chaining
PASS 16 test-aio /aio-gsource/flush
---
PASS 12 fdc-test /x86_64/fdc/read_no_dma_19
PASS 13 fdc-test /x86_64/fdc/fuzz-registers
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/ide-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="ide-test" 
==6272==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 28 test-aio /aio-gsource/timer/schedule
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-aio-multithread -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-aio-multithread" 
PASS 1 ide-test /x86_64/ide/identify
==6279==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-aio-multithread /aio/multi/lifecycle
==6281==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 ide-test /x86_64/ide/flush
PASS 2 test-aio-multithread /aio/multi/schedule
==6298==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 ide-test /x86_64/ide/bmdma/simple_rw
==6309==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 ide-test /x86_64/ide/bmdma/trim
PASS 3 test-aio-multithread /aio/multi/mutex/contended
==6315==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 test-aio-multithread /aio/multi/mutex/handoff
PASS 5 test-aio-multithread /aio/multi/mutex/mcs
PASS 6 test-aio-multithread /aio/multi/mutex/pthread
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-throttle -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-throttle" 
==6337==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-throttle /throttle/leak_bucket
PASS 2 test-throttle /throttle/compute_wait
PASS 3 test-throttle /throttle/init
---
PASS 14 test-throttle /throttle/config/max
PASS 15 test-throttle /throttle/config/iops_size
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-thread-pool -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-thread-pool" 
==6343==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-thread-pool /thread-pool/submit
PASS 2 test-thread-pool /thread-pool/submit-aio
PASS 3 test-thread-pool /thread-pool/submit-co
PASS 4 test-thread-pool /thread-pool/submit-many
==6339==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 5 test-thread-pool /thread-pool/cancel
PASS 6 test-thread-pool /thread-pool/cancel-async
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-hbitmap -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-hbitmap" 
---
PASS 12 test-hbitmap /hbitmap/set/two-elem
PASS 13 test-hbitmap /hbitmap/set/general
PASS 14 test-hbitmap /hbitmap/set/twice
==6418==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 15 test-hbitmap /hbitmap/set/overlap
PASS 16 test-hbitmap /hbitmap/reset/empty
PASS 17 test-hbitmap /hbitmap/reset/general
---
PASS 28 test-hbitmap /hbitmap/truncate/shrink/medium
PASS 29 test-hbitmap /hbitmap/truncate/shrink/large
PASS 30 test-hbitmap /hbitmap/meta/zero
==6424==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 31 test-hbitmap /hbitmap/meta/one
PASS 32 test-hbitmap /hbitmap/meta/byte
PASS 33 test-hbitmap /hbitmap/meta/word
---
PASS 44 test-hbitmap /hbitmap/next_dirty_area/next_dirty_area_4
PASS 45 test-hbitmap /hbitmap/next_dirty_area/next_dirty_area_after_truncate
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bdrv-drain -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bdrv-drain" 
==6431==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-bdrv-drain /bdrv-drain/nested
PASS 2 test-bdrv-drain /bdrv-drain/multiparent
PASS 3 test-bdrv-drain /bdrv-drain/set_aio_context
---
PASS 41 test-bdrv-drain /bdrv-drain/bdrv_drop_intermediate/poll
PASS 42 test-bdrv-drain /bdrv-drain/replace_child/mid-drain
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bdrv-graph-mod -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bdrv-graph-mod" 
==6470==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-bdrv-graph-mod /bdrv-graph-mod/update-perm-tree
PASS 2 test-bdrv-graph-mod /bdrv-graph-mod/should-update-child
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-blockjob -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-blockjob" 
==6474==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-blockjob /blockjob/ids
PASS 2 test-blockjob /blockjob/cancel/created
PASS 3 test-blockjob /blockjob/cancel/running
---
PASS 7 test-blockjob /blockjob/cancel/pending
PASS 8 test-blockjob /blockjob/cancel/concluded
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-blockjob-txn -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-blockjob-txn" 
==6478==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-blockjob-txn /single/success
PASS 2 test-blockjob-txn /single/failure
PASS 3 test-blockjob-txn /single/cancel
---
PASS 6 test-blockjob-txn /pair/cancel
PASS 7 test-blockjob-txn /pair/fail-cancel-race
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-block-backend -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-block-backend" 
==6482==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-block-backend /block-backend/drain_aio_error
PASS 2 test-block-backend /block-backend/drain_all_aio_error
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-block-iothread -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-block-iothread" 
==6486==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-block-iothread /sync-op/pread
PASS 2 test-block-iothread /sync-op/pwrite
PASS 3 test-block-iothread /sync-op/load_vmstate
---
PASS 15 test-block-iothread /propagate/diamond
PASS 16 test-block-iothread /propagate/mirror
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-image-locking -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-image-locking" 
==6508==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-image-locking /image-locking/basic
PASS 2 test-image-locking /image-locking/set-perm-abort
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-x86-cpuid -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-x86-cpuid" 
==6488==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-x86-cpuid /cpuid/topology/basic
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-xbzrle -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-xbzrle" 
PASS 1 test-xbzrle /xbzrle/uleb
---
PASS 2 rcutorture /rcu/torture/10readers
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-list -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-list" 
PASS 1 test-rcu-list /rcu/qlist/single-threaded
==6576==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 test-rcu-list /rcu/qlist/short-few
PASS 3 test-rcu-list /rcu/qlist/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-simpleq -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-simpleq" 
---
PASS 2 test-rcu-simpleq /rcu/qsimpleq/short-few
PASS 3 test-rcu-simpleq /rcu/qsimpleq/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-tailq -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-tailq" 
==6636==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-rcu-tailq /rcu/qtailq/single-threaded
PASS 2 test-rcu-tailq /rcu/qtailq/short-few
PASS 3 test-rcu-tailq /rcu/qtailq/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-slist -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-slist" 
PASS 1 test-rcu-slist /rcu/qslist/single-threaded
PASS 2 test-rcu-slist /rcu/qslist/short-few
==6708==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-rcu-slist /rcu/qslist/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qdist -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qdist" 
PASS 1 test-qdist /qdist/none
---
PASS 7 test-qdist /qdist/binning/expand
PASS 8 test-qdist /qdist/binning/shrink
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qht -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qht" 
==6721==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qht /qht/mode/default
PASS 2 test-qht /qht/mode/resize
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qht-par -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qht-par" 
---
PASS 5 ide-test /x86_64/ide/bmdma/various_prdts
PASS 2 test-qht-par /qht/parallel/2threads-20%updates-1s
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bitops -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bitops" 
==6742==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6742==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffed87d4000; bottom 0x7f7e8cdfe000; size: 0x00804b9d6000 (551024418816)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-bitops /bitops/sextract32
---
PASS 9 test-keyval /keyval/visit/alternate
PASS 10 test-keyval /keyval/visit/any
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-write-threshold -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-write-threshold" 
==6777==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 ide-test /x86_64/ide/flush/empty_drive
PASS 1 test-write-threshold /write-threshold/not-set-on-init
PASS 2 test-write-threshold /write-threshold/set-get
---
PASS 3 test-crypto-hmac /crypto/hmac/prealloc
PASS 4 test-crypto-hmac /crypto/hmac/digest
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-cipher -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-cipher" 
==6797==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-cipher /crypto/cipher/aes-ecb-128
PASS 2 test-crypto-cipher /crypto/cipher/aes-ecb-192
PASS 3 test-crypto-cipher /crypto/cipher/aes-ecb-256
---
PASS 15 test-crypto-secret /crypto/secret/crypt/missingiv
PASS 16 test-crypto-secret /crypto/secret/crypt/badiv
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-tlscredsx509 -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-tlscredsx509" 
==6816==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/perfectserver
PASS 2 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/perfectclient
PASS 10 ide-test /x86_64/ide/flush/retry_isa
==6830==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca1
PASS 4 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca2
PASS 11 ide-test /x86_64/ide/cdrom/pio
==6836==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 5 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca3
PASS 6 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/badca1
PASS 7 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/badca2
---
PASS 9 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver1
PASS 12 ide-test /x86_64/ide/cdrom/pio_large
PASS 10 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver2
==6842==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 ide-test /x86_64/ide/cdrom/dma
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/ahci-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="ahci-test" 
PASS 11 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver3
PASS 12 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver4
PASS 13 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver5
PASS 14 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver6
==6856==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 15 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver7
PASS 16 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/badserver1
PASS 17 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/badserver2
---
PASS 38 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/missingserver
PASS 39 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/missingclient
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-tlssession -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-tlssession" 
==6862==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 ahci-test /x86_64/ahci/pci_spec
PASS 1 test-crypto-tlssession /qcrypto/tlssession/psk
==6872==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 ahci-test /x86_64/ahci/pci_enable
PASS 2 test-crypto-tlssession /qcrypto/tlssession/basicca
==6878==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 ahci-test /x86_64/ahci/hba_spec
==6884==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 5 ahci-test /x86_64/ahci/hba_enable
PASS 3 test-crypto-tlssession /qcrypto/tlssession/differentca
==6890==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 test-crypto-tlssession /qcrypto/tlssession/altname1
PASS 6 ahci-test /x86_64/ahci/identify
PASS 5 test-crypto-tlssession /qcrypto/tlssession/altname2
PASS 6 test-crypto-tlssession /qcrypto/tlssession/altname3
==6896==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 7 ahci-test /x86_64/ahci/max
PASS 7 test-crypto-tlssession /qcrypto/tlssession/altname4
==6902==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 test-crypto-tlssession /qcrypto/tlssession/altname5
PASS 8 ahci-test /x86_64/ahci/reset
PASS 9 test-crypto-tlssession /qcrypto/tlssession/altname6
==6908==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6908==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcdd88a000; bottom 0x7f75ab7fe000; size: 0x00873208c000 (580660019200)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 9 ahci-test /x86_64/ahci/io/pio/lba28/simple/zero
==6914==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6914==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fffe8750000; bottom 0x7fea7bbfe000; size: 0x00156cb52000 (92018122752)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 10 ahci-test /x86_64/ahci/io/pio/lba28/simple/low
---
PASS 11 test-crypto-tlssession /qcrypto/tlssession/wildcard2
PASS 12 test-crypto-tlssession /qcrypto/tlssession/wildcard3
PASS 13 test-crypto-tlssession /qcrypto/tlssession/wildcard4
==6920==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 test-crypto-tlssession /qcrypto/tlssession/wildcard5
==6920==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe974a6000; bottom 0x7f8a0e5fe000; size: 0x007488ea8000 (500513275904)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 15 test-crypto-tlssession /qcrypto/tlssession/wildcard6
PASS 16 test-crypto-tlssession /qcrypto/tlssession/cachain
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qga -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qga" 
PASS 11 ahci-test /x86_64/ahci/io/pio/lba28/simple/high
==6934==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6934==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe6637a000; bottom 0x7fddd51fe000; size: 0x00209117c000 (139873206272)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-qga /qga/sync-delimited
---
PASS 15 test-qga /qga/invalid-cmd
PASS 16 test-qga /qga/invalid-args
PASS 17 test-qga /qga/fsfreeze-status
==6940==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6940==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffdec1bb000; bottom 0x7f36697fe000; size: 0x00c7829bd000 (856889741312)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 13 ahci-test /x86_64/ahci/io/pio/lba28/double/low
---
PASS 19 test-qga /qga/config
PASS 20 test-qga /qga/guest-exec
PASS 21 test-qga /qga/guest-exec-invalid
==6949==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6949==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe64f88000; bottom 0x7fbd3d9fe000; size: 0x00412758a000 (279832993792)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 14 ahci-test /x86_64/ahci/io/pio/lba28/double/high
---
PASS 24 test-qga /qga/guest-get-timezone
PASS 25 test-qga /qga/guest-get-users
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-timed-average -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-timed-average" 
==6967==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-timed-average /timed-average/average
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-util-filemonitor -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-util-filemonitor" 
==6967==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffee8fcf000; bottom 0x7f1b433fe000; size: 0x00e3a5bd1000 (977738207232)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-util-filemonitor /util/filemonitor
---
PASS 5 test-authz-list /auth/list/explicit/deny
PASS 6 test-authz-list /auth/list/explicit/allow
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-authz-listfile -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-authz-listfile" 
==6995==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-authz-listfile /auth/list/complex
PASS 2 test-authz-listfile /auth/list/default/deny
PASS 3 test-authz-listfile /auth/list/default/allow
---
PASS 4 test-io-task /crypto/task/thread_complete
PASS 5 test-io-task /crypto/task/thread_failure
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-io-channel-socket -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-io-channel-socket" 
==6995==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffec12cb000; bottom 0x7fb394b24000; size: 0x004b2c7a7000 (322868768768)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-io-channel-socket /io/channel/socket/ipv4-sync
---
PASS 4 test-io-channel-file /io/channel/pipe/sync
PASS 5 test-io-channel-file /io/channel/pipe/async
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-io-channel-tls -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-io-channel-tls" 
==7051==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7051==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff46224000; bottom 0x7fef453fe000; size: 0x001000e26000 (68734312448)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-io-channel-tls /qio/channel/tls/basic
---
PASS 17 ahci-test /x86_64/ahci/io/pio/lba28/long/high
PASS 1 test-io-channel-buffer /io/channel/buf
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-base64 -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-base64" 
==7081==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-base64 /util/base64/good
PASS 2 test-base64 /util/base64/embedded-nul
PASS 3 test-base64 /util/base64/not-nul-terminated
---
PASS 17 test-crypto-xts /crypto/xts/t-21-key-32-ptx-31/basic
PASS 18 test-crypto-xts /crypto/xts/t-21-key-32-ptx-31/unaligned
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-block -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-block" 
==7102==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-block /crypto/block/qcow
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-logging -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-logging" 
PASS 1 test-logging /logging/parse_range
---
PASS 4 test-logging /logging/logfile_lock_path
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-replication -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-replication" 
PASS 19 ahci-test /x86_64/ahci/io/pio/lba28/short/low
==7121==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-replication /replication/primary/read
==7123==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 test-replication /replication/primary/write
PASS 20 ahci-test /x86_64/ahci/io/pio/lba28/short/high
==7131==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7131==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc7932e000; bottom 0x7fe6915fe000; size: 0x0015e7d30000 (94083678208)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 21 ahci-test /x86_64/ahci/io/pio/lba48/simple/zero
---
PASS 4 test-replication /replication/primary/stop
PASS 5 test-replication /replication/primary/do_checkpoint
PASS 6 test-replication /replication/primary/get_error_all
==7137==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7137==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff9dc44000; bottom 0x7fb4efffe000; size: 0x004aadc46000 (320742907904)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 22 ahci-test /x86_64/ahci/io/pio/lba48/simple/low
PASS 7 test-replication /replication/secondary/read
==7143==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7143==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffd89e5b000; bottom 0x7f4f569fe000; size: 0x00ae3345d000 (748184522752)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 8 test-replication /replication/secondary/write
PASS 23 ahci-test /x86_64/ahci/io/pio/lba48/simple/high
==7149==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7149==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe2fd4f000; bottom 0x7f0d415fe000; size: 0x00f0ee751000 (1034792800256)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 24 ahci-test /x86_64/ahci/io/pio/lba48/double/zero
==7155==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7155==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffdeacdd000; bottom 0x7f658b7fe000; size: 0x00985f4df000 (654433972224)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 25 ahci-test /x86_64/ahci/io/pio/lba48/double/low
==7161==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7161==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffeef3b7000; bottom 0x7f77121fe000; size: 0x0087dd1b9000 (583530156032)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 26 ahci-test /x86_64/ahci/io/pio/lba48/double/high
==7168==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7168==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffceb64f000; bottom 0x7eff539fe000; size: 0x00fd97c51000 (1089173000192)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
==7121==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fffc34ba000; bottom 0x7f6ed50e9000; size: 0x0090ee3d1000 (622472269824)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 27 ahci-test /x86_64/ahci/io/pio/lba48/long/zero
PASS 9 test-replication /replication/secondary/start
==7189==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7189==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcf2345000; bottom 0x7faca93fe000; size: 0x005048f47000 (344821362688)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 28 ahci-test /x86_64/ahci/io/pio/lba48/long/low
==7195==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7195==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcffab8000; bottom 0x7f7b9817c000; size: 0x00816793c000 (555788517376)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 29 ahci-test /x86_64/ahci/io/pio/lba48/long/high
==7201==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 10 test-replication /replication/secondary/stop
PASS 30 ahci-test /x86_64/ahci/io/pio/lba48/short/zero
==7207==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 31 ahci-test /x86_64/ahci/io/pio/lba48/short/low
==7213==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 32 ahci-test /x86_64/ahci/io/pio/lba48/short/high
==7219==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 33 ahci-test /x86_64/ahci/io/dma/lba28/fragmented
==7226==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 11 test-replication /replication/secondary/continuous_replication
PASS 34 ahci-test /x86_64/ahci/io/dma/lba28/retry
==7232==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 35 ahci-test /x86_64/ahci/io/dma/lba28/simple/zero
==7238==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 test-replication /replication/secondary/do_checkpoint
PASS 36 ahci-test /x86_64/ahci/io/dma/lba28/simple/low
==7244==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 test-replication /replication/secondary/get_error_all
PASS 37 ahci-test /x86_64/ahci/io/dma/lba28/simple/high
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bufferiszero -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bufferiszero" 
==7250==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 38 ahci-test /x86_64/ahci/io/dma/lba28/double/zero
==7259==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 39 ahci-test /x86_64/ahci/io/dma/lba28/double/low
==7265==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 40 ahci-test /x86_64/ahci/io/dma/lba28/double/high
==7271==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7271==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffed21f9000; bottom 0x7f623fd7b000; size: 0x009c9247e000 (672469082112)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 41 ahci-test /x86_64/ahci/io/dma/lba28/long/zero
==7278==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7278==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc89e18000; bottom 0x7f4128123000; size: 0x00bb61cf5000 (804799860736)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 42 ahci-test /x86_64/ahci/io/dma/lba28/long/low
==7285==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7285==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcea6b2000; bottom 0x7fb7f617b000; size: 0x0044f4537000 (296156884992)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 43 ahci-test /x86_64/ahci/io/dma/lba28/long/high
==7292==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 44 ahci-test /x86_64/ahci/io/dma/lba28/short/zero
==7298==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 45 ahci-test /x86_64/ahci/io/dma/lba28/short/low
==7304==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 46 ahci-test /x86_64/ahci/io/dma/lba28/short/high
==7310==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 47 ahci-test /x86_64/ahci/io/dma/lba48/simple/zero
==7316==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 48 ahci-test /x86_64/ahci/io/dma/lba48/simple/low
==7322==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 49 ahci-test /x86_64/ahci/io/dma/lba48/simple/high
==7328==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 50 ahci-test /x86_64/ahci/io/dma/lba48/double/zero
==7334==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 51 ahci-test /x86_64/ahci/io/dma/lba48/double/low
==7340==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 52 ahci-test /x86_64/ahci/io/dma/lba48/double/high
==7346==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7346==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe8b0ea000; bottom 0x7fd367d23000; size: 0x002b233c7000 (185274757120)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 53 ahci-test /x86_64/ahci/io/dma/lba48/long/zero
==7353==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7353==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc5347f000; bottom 0x7f97be9fd000; size: 0x006494a82000 (431990775808)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 54 ahci-test /x86_64/ahci/io/dma/lba48/long/low
==7360==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7360==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcee244000; bottom 0x7f33acbfd000; size: 0x00c941647000 (864385527808)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 55 ahci-test /x86_64/ahci/io/dma/lba48/long/high
==7367==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 56 ahci-test /x86_64/ahci/io/dma/lba48/short/zero
==7373==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 57 ahci-test /x86_64/ahci/io/dma/lba48/short/low
==7379==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 58 ahci-test /x86_64/ahci/io/dma/lba48/short/high
==7385==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 59 ahci-test /x86_64/ahci/io/ncq/simple
==7391==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 60 ahci-test /x86_64/ahci/io/ncq/retry
==7397==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 61 ahci-test /x86_64/ahci/flush/simple
==7403==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 62 ahci-test /x86_64/ahci/flush/retry
==7409==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7415==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 63 ahci-test /x86_64/ahci/flush/migrate
==7423==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7429==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-bufferiszero /cutils/bufferiszero
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-uuid -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-uuid" 
PASS 1 test-uuid /uuid/is_null
---
PASS 1 test-qapi-util /qapi/util/qapi_enum_parse
PASS 2 test-qapi-util /qapi/util/parse_qapi_name
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qgraph -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qgraph" 
==7443==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qgraph /qgraph/init_nop
PASS 2 test-qgraph /qgraph/test_machine
PASS 3 test-qgraph /qgraph/test_contains
---
PASS 21 test-qgraph /qgraph/test_two_test_same_interface
PASS 22 test-qgraph /qgraph/test_test_in_path
PASS 23 test-qgraph /qgraph/test_double_edge
==7456==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 65 ahci-test /x86_64/ahci/migrate/dma/simple
==7464==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7470==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 66 ahci-test /x86_64/ahci/migrate/dma/halted
==7478==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7484==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 67 ahci-test /x86_64/ahci/migrate/ncq/simple
==7492==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7498==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 68 ahci-test /x86_64/ahci/migrate/ncq/halted
==7506==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 69 ahci-test /x86_64/ahci/cdrom/eject
==7511==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 70 ahci-test /x86_64/ahci/cdrom/dma/single
==7517==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 71 ahci-test /x86_64/ahci/cdrom/dma/multi
==7523==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 72 ahci-test /x86_64/ahci/cdrom/pio/single
==7529==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7529==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffd78a7a000; bottom 0x7f79247ba000; size: 0x0084542c0000 (568347852800)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 73 ahci-test /x86_64/ahci/cdrom/pio/multi
==7535==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 74 ahci-test /x86_64/ahci/cdrom/pio/bcl
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/hd-geo-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="hd-geo-test" 
PASS 1 hd-geo-test /x86_64/hd-geo/ide/none
==7549==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 hd-geo-test /x86_64/hd-geo/ide/drive/cd_0
==7555==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/blank
==7561==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/lba
==7567==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 5 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/chs
==7573==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 6 hd-geo-test /x86_64/hd-geo/ide/device/mbr/blank
==7579==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 7 hd-geo-test /x86_64/hd-geo/ide/device/mbr/lba
==7585==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 hd-geo-test /x86_64/hd-geo/ide/device/mbr/chs
==7591==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 9 hd-geo-test /x86_64/hd-geo/ide/device/user/chs
==7596==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 10 hd-geo-test /x86_64/hd-geo/ide/device/user/chst
==7602==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7606==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7610==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7614==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7618==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7622==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7626==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7630==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7633==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 11 hd-geo-test /x86_64/hd-geo/override/ide
==7640==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7644==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7648==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7652==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7656==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7660==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7664==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7668==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7671==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 hd-geo-test /x86_64/hd-geo/override/scsi
==7678==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7682==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7686==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7690==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7694==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7698==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7702==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7706==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7709==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 hd-geo-test /x86_64/hd-geo/override/scsi_2_controllers
==7716==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7720==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7724==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7728==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7731==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 hd-geo-test /x86_64/hd-geo/override/virtio_blk
==7738==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7742==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7745==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 15 hd-geo-test /x86_64/hd-geo/override/zero_chs
==7752==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7756==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7760==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7764==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7767==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 16 hd-geo-test /x86_64/hd-geo/override/scsi_hot_unplug
==7774==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7778==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7782==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7786==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7789==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 17 hd-geo-test /x86_64/hd-geo/override/virtio_hot_unplug
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/boot-order-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="boot-order-test" 
PASS 1 boot-order-test /x86_64/boot-order/pc
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7858==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP'
Using expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7864==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP'
Using expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7870==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.bridge'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7876==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.ipmikcs'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7882==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.cphp'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7889==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.memhp'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7895==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.numamem'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7901==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.dimmpxm'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7910==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.acpihmat'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7917==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.bridge'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7923==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.mmio64'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7929==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.ipmibt'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7935==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.cphp'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7942==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.memhp'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7948==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.numamem'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7954==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.dimmpxm'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7963==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.acpihmat'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
PASS 1 i440fx-test /x86_64/i440fx/defaults
PASS 2 i440fx-test /x86_64/i440fx/pam
PASS 3 i440fx-test /x86_64/i440fx/firmware/bios
==8055==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 i440fx-test /x86_64/i440fx/firmware/pflash
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/fw_cfg-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="fw_cfg-test" 
PASS 1 fw_cfg-test /x86_64/fw_cfg/signature
---
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/drive_del-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="drive_del-test" 
PASS 1 drive_del-test /x86_64/drive_del/without-dev
PASS 2 drive_del-test /x86_64/drive_del/after_failed_device_add
==8148==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 drive_del-test /x86_64/blockdev/drive_del_device_del
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/wdt_ib700-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="wdt_ib700-test" 
PASS 1 wdt_ib700-test /x86_64/wdt_ib700/pause
---
dbus-daemon[8318]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

**
ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18)
ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18)
cleaning up pid 8318
make: *** [/tmp/qemu-test/src/tests/Makefile.include:632: check-qtest-x86_64] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=027f4111f3254ced9f71bae2729bf1ce', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-13gj8a_q/src/docker-src.2020-03-09-16.48.02.19919:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=027f4111f3254ced9f71bae2729bf1ce
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-13gj8a_q/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    28m17.713s
user    0m8.353s


The full log is available at
http://patchew.org/logs/cover.1583781493.git.balaton@eik.bme.hu/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode
  2020-03-09 20:50     ` BALATON Zoltan
  2020-03-09 21:06       ` BALATON Zoltan
@ 2020-03-10  3:32       ` Michael S. Tsirkin
  1 sibling, 0 replies; 16+ messages in thread
From: Michael S. Tsirkin @ 2020-03-10  3:32 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, Mar 09, 2020 at 09:50:57PM +0100, BALATON Zoltan wrote:
> On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
> > On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
> > > Some machines operate in "non 100% native mode" where interrupts are
> > > fixed at legacy IDE interrupts and some guests expect this behaviour
> > > without checking based on knowledge about hardware. Even Linux has
> > > arch specific workarounds for this that are activated on such boards
> > > so this needs to be emulated as well.
> > > 
> > > Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> > > ---
> > > v2: Don't use PCI_INTERRUPT_LINE in via_ide_set_irq()
> > > v3: Patch pci.c instead of local workaround for PCI reset clearing
> > >     PCI_INTERRUPT_PIN config reg
> > > 
> > >  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
> > >  hw/mips/mips_fulong2e.c |  2 +-
> > >  include/hw/ide.h        |  3 ++-
> > >  3 files changed, 32 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/hw/ide/via.c b/hw/ide/via.c
> > > index 096de8dba0..02d29809f2 100644
> > > --- a/hw/ide/via.c
> > > +++ b/hw/ide/via.c
> > > @@ -1,9 +1,10 @@
> > >  /*
> > > - * QEMU IDE Emulation: PCI VIA82C686B support.
> > > + * QEMU VIA southbridge IDE emulation (VT82C686B, VT8231)
> > >   *
> > >   * Copyright (c) 2003 Fabrice Bellard
> > >   * Copyright (c) 2006 Openedhand Ltd.
> > >   * Copyright (c) 2010 Huacai Chen <zltjiangshi@gmail.com>
> > > + * Copyright (c) 2019-2020 BALATON Zoltan
> > >   *
> > >   * Permission is hereby granted, free of charge, to any person obtaining a copy
> > >   * of this software and associated documentation files (the "Software"), to deal
> > > @@ -25,6 +26,8 @@
> > >   */
> > > 
> > >  #include "qemu/osdep.h"
> > > +#include "qemu/range.h"
> > > +#include "hw/qdev-properties.h"
> > >  #include "hw/pci/pci.h"
> > >  #include "migration/vmstate.h"
> > >  #include "qemu/module.h"
> > > @@ -111,11 +114,18 @@ static void via_ide_set_irq(void *opaque, int n, int level)
> > >      } else {
> > >          d->config[0x70 + n * 8] &= ~0x80;
> > >      }
> > > -
> > >      level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
> > > -    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
> > > -    if (n) {
> > > -        qemu_set_irq(isa_get_irq(NULL, n), level);
> > > +
> > > +    /*
> > > +     * Some machines operate in "non 100% native mode" where PCI_INTERRUPT_LINE
> > > +     * is not used but IDE always uses ISA IRQ 14 and 15 even in native mode.
> > > +     * Some guest drivers expect this, often without checking.
> > > +     */
> > > +    if (!(pci_get_byte(d->config + PCI_CLASS_PROG) & (n ? 4 : 1)) ||
> > > +        PCI_IDE(d)->flags & BIT(PCI_IDE_LEGACY_IRQ)) {
> > > +        qemu_set_irq(isa_get_irq(NULL, (n ? 15 : 14)), level);
> > > +    } else {
> > > +        qemu_set_irq(isa_get_irq(NULL, 14), level);
> > >      }
> > >  }
> > > 
> > > @@ -169,7 +179,8 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
> > > 
> > >      pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
> > >      pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
> > > -    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
> > > +    dev->wmask[PCI_CLASS_PROG] = 5;
> > 
> > What's the story here? Why is class suddenly writeable?
> 
> The via-ide (function 1 of some VIA southbridge chips) use bits in this reg
> to set legacy compatibility mode as described in VT82C686B and VT8231
> datasheets and Linux writes this on pegasos2 board I'm emulating. See longer
> description in this message:
> 
> https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg00019.html
> 
> Regards,
> BALATON Zoltan


Pls add a code comment so people don't have to dig through mailing list
archives.

-- 
MST



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-09 20:54     ` BALATON Zoltan
@ 2020-03-10  3:36       ` Michael S. Tsirkin
  2020-03-10 18:15       ` Mark Cave-Ayland
  1 sibling, 0 replies; 16+ messages in thread
From: Michael S. Tsirkin @ 2020-03-10  3:36 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: qemu-block, philmd, Mark Cave-Ayland, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

On Mon, Mar 09, 2020 at 09:54:27PM +0100, BALATON Zoltan wrote:
> On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
> > On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
> > > 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 allows
> > > to do that without additional workaround in device emulation to
> > > reverse the effect of this PCI bus reset function.
> > > 
> > > Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> > > Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> > > ---
> > >  hw/pci/pci.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> > > index e1ed6677e1..d07e4ed9de 100644
> > > --- a/hw/pci/pci.c
> > > +++ b/hw/pci/pci.c
> > > @@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
> > >      pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
> > >                                   pci_get_word(dev->wmask + PCI_STATUS) |
> > >                                   pci_get_word(dev->w1cmask + PCI_STATUS));
> > > +    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
> > > +                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
> > > +                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
> > 
> > PCI spec says:
> > 
> > Interrupt Line
> > The Interrupt Line register is an eight-bit register used to communicate interrupt line routing
> > information.
> > 
> > I don't see how it makes sense to access it as a word.
> 
> Patch actually comes from Mark, I don't know. Should we change it to
> pci_byte_test_and_clear_mask or what's the appropriate way here?

Superficially that makes sense. I don't know if that does what
you want to do.


> > 
> > >      dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
> > > -    dev->config[PCI_INTERRUPT_LINE] = 0x0;
> > >      for (r = 0; r < PCI_NUM_REGIONS; ++r) {
> > >          PCIIORegion *region = &dev->io_regions[r];
> > >          if (!region->size) {
> > 
> > Please add comments here explaining that some devices
> > make PCI_INTERRUPT_LINE read-only.
> 
> Something like the commit message would be appropriate?

Code comments are more appropriate when we want to describe why code is
the way it is. commit message is there to describe the change, answering
questions like: why we aren't happy with the old code? why is the new
code is better? etc ...

> Regards,
> BALATON Zoltan



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-09 20:54     ` BALATON Zoltan
  2020-03-10  3:36       ` Michael S. Tsirkin
@ 2020-03-10 18:15       ` Mark Cave-Ayland
  2020-03-10 18:20         ` BALATON Zoltan
  1 sibling, 1 reply; 16+ messages in thread
From: Mark Cave-Ayland @ 2020-03-10 18:15 UTC (permalink / raw)
  To: BALATON Zoltan, Michael S. Tsirkin
  Cc: qemu-block, philmd, qemu-devel, Aleksandar Markovic, John Snow,
	Artyom Tarasenko, Richard Henderson

On 09/03/2020 20:54, BALATON Zoltan wrote:

> On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
>> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
>>> 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 allows
>>> to do that without additional workaround in device emulation to
>>> reverse the effect of this PCI bus reset function.
>>>
>>> Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>>> ---
>>>  hw/pci/pci.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>>> index e1ed6677e1..d07e4ed9de 100644
>>> --- a/hw/pci/pci.c
>>> +++ b/hw/pci/pci.c
>>> @@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
>>>      pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
>>>                                   pci_get_word(dev->wmask + PCI_STATUS) |
>>>                                   pci_get_word(dev->w1cmask + PCI_STATUS));
>>> +    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
>>> +                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
>>> +                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
>>
>> PCI spec says:
>>
>> Interrupt Line
>> The Interrupt Line register is an eight-bit register used to communicate interrupt
>> line routing
>> information.
>>
>> I don't see how it makes sense to access it as a word.
> 
> Patch actually comes from Mark, I don't know. Should we change it to
> pci_byte_test_and_clear_mask or what's the appropriate way here?

Ooops yes it should pci_byte_test_and_clear_mask(). Clearly I got a bit too excited
from copying the existing examples in pci_do_device_reset().


ATB,

Mark.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-10 18:15       ` Mark Cave-Ayland
@ 2020-03-10 18:20         ` BALATON Zoltan
  0 siblings, 0 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-10 18:20 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: qemu-block, Michael S. Tsirkin, philmd, qemu-devel,
	Aleksandar Markovic, John Snow, Artyom Tarasenko,
	Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 2301 bytes --]

On Tue, 10 Mar 2020, Mark Cave-Ayland wrote:
> On 09/03/2020 20:54, BALATON Zoltan wrote:
>> On Mon, 9 Mar 2020, Michael S. Tsirkin wrote:
>>> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote:
>>>> 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 allows
>>>> to do that without additional workaround in device emulation to
>>>> reverse the effect of this PCI bus reset function.
>>>>
>>>> Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>>>> ---
>>>>  hw/pci/pci.c | 4 +++-
>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>>>> index e1ed6677e1..d07e4ed9de 100644
>>>> --- a/hw/pci/pci.c
>>>> +++ b/hw/pci/pci.c
>>>> @@ -302,8 +302,10 @@ static void pci_do_device_reset(PCIDevice *dev)
>>>>      pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
>>>>                                   pci_get_word(dev->wmask + PCI_STATUS) |
>>>>                                   pci_get_word(dev->w1cmask + PCI_STATUS));
>>>> +    pci_word_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
>>>> +                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
>>>> +                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
>>>
>>> PCI spec says:
>>>
>>> Interrupt Line
>>> The Interrupt Line register is an eight-bit register used to communicate interrupt
>>> line routing
>>> information.
>>>
>>> I don't see how it makes sense to access it as a word.
>>
>> Patch actually comes from Mark, I don't know. Should we change it to
>> pci_byte_test_and_clear_mask or what's the appropriate way here?
>
> Ooops yes it should pci_byte_test_and_clear_mask(). Clearly I got a bit too excited
> from copying the existing examples in pci_do_device_reset().

OK will test it and send updated version.

Regards,
BALATON Zoltan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/3] Implement "non 100% native mode" in via-ide
  2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
                   ` (3 preceding siblings ...)
  2020-03-09 21:16 ` [PATCH v3 0/3] Implement "non 100% native mode" in via-ide no-reply
@ 2020-03-10 18:31 ` Mark Cave-Ayland
  2020-03-10 18:36   ` BALATON Zoltan
  4 siblings, 1 reply; 16+ messages in thread
From: Mark Cave-Ayland @ 2020-03-10 18:31 UTC (permalink / raw)
  To: BALATON Zoltan, qemu-devel, qemu-block
  Cc: philmd, John Snow, Artyom Tarasenko, Aleksandar Markovic,
	Richard Henderson

On 09/03/2020 19:18, BALATON Zoltan wrote:

> This small series implements "non-100% native mode" of via-ide found
> at least on pegasos2 where io addresses come from PCI BARs but
> interrupts are hard coded to legacy IRQ14 and 15. This is needed for
> guests that expect it and activate work arounds on that platform and
> don't work unless this is emulated. (Symptom is missing IDE IRQs after
> enabling BMDMA and boot freezes waiting for interrupt.)
> 
> We need a flag to turn this mode on or off so the first patch
> repurposes the last remaining CMD646 specific field in PCIIDEState to
> allow more flags and make room for the new legacy-irq flag there. (The
> CMD646 may need similar mode or something else may need more flags in
> the future.) Boards using CMD646 and VIA IDE are updated for the above
> changes. Second patch fixes up PCI reset to not clear value set by
> device emulation on bus reset when wmask does not allow that.
> 
> Tested with Linux and MorphOS on pegasos2 and a Gentoo live CD kernel
> for mips_fulong2e that's the only one I could find but being beta not
> sure if that fully works on real hardware. (The mips_fulong2e also
> seems to have problems with pci devices so to boot Linux you need
> -net none -vga none and use serial console otherwise the kernel panics.)
> 
> Regards,
> BALATON Zoltan
> 
> BALATON Zoltan (3):
>   ide: Make room for flags in PCIIDEState and add one for legacy IRQ
>     routing
>   pci: Honour wmask when resetting PCI_INTERRUPT_LINE
>   via-ide: Also emulate non 100% native mode
> 
>  hw/alpha/dp264.c        |  2 +-
>  hw/ide/cmd646.c         | 12 ++++++------
>  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
>  hw/mips/mips_fulong2e.c |  2 +-
>  hw/pci/pci.c            |  4 +++-
>  hw/sparc64/sun4u.c      |  9 ++-------
>  include/hw/ide.h        |  7 ++++---
>  include/hw/ide/pci.h    |  7 ++++++-
>  8 files changed, 52 insertions(+), 28 deletions(-)

To summarise what has been quite a long thread, I don't believe the approach of
introducing a feature flag for legacy IRQ routing is the correct solution here. It
seems to me that qdev can do all the work: provide qdev gpio connectors for 2 IRQ
sets: a named "legacy-irq" array and a standard ("irq") qdev connector and then let
the boards wire up the ones as they need.

With this in place it is simple to always fallback to the legacy IRQs if no PCI IRQ
is connected regardless of mode, and this also allows the deprecated isa_get_irq()
function to be removed.


ATB,

Mark.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/3] Implement "non 100% native mode" in via-ide
  2020-03-10 18:31 ` Mark Cave-Ayland
@ 2020-03-10 18:36   ` BALATON Zoltan
  0 siblings, 0 replies; 16+ messages in thread
From: BALATON Zoltan @ 2020-03-10 18:36 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: qemu-block, philmd, qemu-devel, Aleksandar Markovic, John Snow,
	Artyom Tarasenko, Richard Henderson

On Tue, 10 Mar 2020, Mark Cave-Ayland wrote:
> On 09/03/2020 19:18, BALATON Zoltan wrote:
>> This small series implements "non-100% native mode" of via-ide found
>> at least on pegasos2 where io addresses come from PCI BARs but
>> interrupts are hard coded to legacy IRQ14 and 15. This is needed for
>> guests that expect it and activate work arounds on that platform and
>> don't work unless this is emulated. (Symptom is missing IDE IRQs after
>> enabling BMDMA and boot freezes waiting for interrupt.)
>>
>> We need a flag to turn this mode on or off so the first patch
>> repurposes the last remaining CMD646 specific field in PCIIDEState to
>> allow more flags and make room for the new legacy-irq flag there. (The
>> CMD646 may need similar mode or something else may need more flags in
>> the future.) Boards using CMD646 and VIA IDE are updated for the above
>> changes. Second patch fixes up PCI reset to not clear value set by
>> device emulation on bus reset when wmask does not allow that.
>>
>> Tested with Linux and MorphOS on pegasos2 and a Gentoo live CD kernel
>> for mips_fulong2e that's the only one I could find but being beta not
>> sure if that fully works on real hardware. (The mips_fulong2e also
>> seems to have problems with pci devices so to boot Linux you need
>> -net none -vga none and use serial console otherwise the kernel panics.)
>>
>> Regards,
>> BALATON Zoltan
>>
>> BALATON Zoltan (3):
>>   ide: Make room for flags in PCIIDEState and add one for legacy IRQ
>>     routing
>>   pci: Honour wmask when resetting PCI_INTERRUPT_LINE
>>   via-ide: Also emulate non 100% native mode
>>
>>  hw/alpha/dp264.c        |  2 +-
>>  hw/ide/cmd646.c         | 12 ++++++------
>>  hw/ide/via.c            | 37 +++++++++++++++++++++++++++++--------
>>  hw/mips/mips_fulong2e.c |  2 +-
>>  hw/pci/pci.c            |  4 +++-
>>  hw/sparc64/sun4u.c      |  9 ++-------
>>  include/hw/ide.h        |  7 ++++---
>>  include/hw/ide/pci.h    |  7 ++++++-
>>  8 files changed, 52 insertions(+), 28 deletions(-)
>
> To summarise what has been quite a long thread, I don't believe the approach of
> introducing a feature flag for legacy IRQ routing is the correct solution here. It
> seems to me that qdev can do all the work: provide qdev gpio connectors for 2 IRQ
> sets: a named "legacy-irq" array and a standard ("irq") qdev connector and then let
> the boards wire up the ones as they need.
>
> With this in place it is simple to always fallback to the legacy IRQs if no PCI IRQ
> is connected regardless of mode, and this also allows the deprecated isa_get_irq()
> function to be removed.

You have to provide an example patch to show how this would work because I 
can't implement this. I don't see how it could work so to me this just a 
vague idea not something I can make a patch from.

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-03-10 18:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 19:18 [PATCH v3 0/3] Implement "non 100% native mode" in via-ide BALATON Zoltan
2020-03-09 19:18 ` [PATCH v3 1/3] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing BALATON Zoltan
2020-03-09 19:18 ` [PATCH v3 3/3] via-ide: Also emulate non 100% native mode BALATON Zoltan
2020-03-09 20:36   ` Michael S. Tsirkin
2020-03-09 20:50     ` BALATON Zoltan
2020-03-09 21:06       ` BALATON Zoltan
2020-03-10  3:32       ` Michael S. Tsirkin
2020-03-09 19:18 ` [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE BALATON Zoltan
2020-03-09 20:39   ` Michael S. Tsirkin
2020-03-09 20:54     ` BALATON Zoltan
2020-03-10  3:36       ` Michael S. Tsirkin
2020-03-10 18:15       ` Mark Cave-Ayland
2020-03-10 18:20         ` BALATON Zoltan
2020-03-09 21:16 ` [PATCH v3 0/3] Implement "non 100% native mode" in via-ide no-reply
2020-03-10 18:31 ` Mark Cave-Ayland
2020-03-10 18:36   ` BALATON Zoltan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.