]> Git Repo - qemu.git/log
qemu.git
4 years agoqom: Tidy up a few object_initialize_child() calls
Markus Armbruster [Wed, 10 Jun 2020 05:32:24 +0000 (07:32 +0200)]
qom: Tidy up a few object_initialize_child() calls

The callers of object_initialize_child() commonly  pass either
&child, sizeof(child), or pchild, sizeof(*pchild).  Tidy up the few
that don't, mostly to keep the next commit simpler.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoauxbus: Eliminate aux_create_slave()
Markus Armbruster [Wed, 10 Jun 2020 05:32:23 +0000 (07:32 +0200)]
auxbus: Eliminate aux_create_slave()

aux_create_slave() has become a trivial wrapper around qdev_new().
There's just one user.  Eliminate.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoauxbus: Convert a use of qdev_set_parent_bus()
Markus Armbruster [Wed, 10 Jun 2020 05:32:22 +0000 (07:32 +0200)]
auxbus: Convert a use of qdev_set_parent_bus()

Convert qdev_set_parent_bus()/qdev_init_nofail() to qdev_realize();
recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoauxbus: New aux_bus_realize(), pairing with aux_bus_init()
Markus Armbruster [Wed, 10 Jun 2020 05:32:21 +0000 (07:32 +0200)]
auxbus: New aux_bus_realize(), pairing with aux_bus_init()

aux_bus_init() encapsulates the creation of an aux-bus and its
aux-to-i2c-bridge device.

Create aux_bus_realize() to similarly encapsulate their realization.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoauxbus: Rename aux_init_bus() to aux_bus_init()
Markus Armbruster [Wed, 10 Jun 2020 05:32:20 +0000 (07:32 +0200)]
auxbus: Rename aux_init_bus() to aux_bus_init()

Suggested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
4 years agoqdev: qdev_create(), qdev_try_create() are now unused, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:19 +0000 (07:32 +0200)]
qdev: qdev_create(), qdev_try_create() are now unused, drop

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agousb: Eliminate usb_try_create_simple()
Markus Armbruster [Wed, 10 Jun 2020 05:32:18 +0000 (07:32 +0200)]
usb: Eliminate usb_try_create_simple()

usb_try_create_simple() is qdev_try_new() and qdev_realize_and_unref()
with more verbose error messages.  Of its two users, one ignores
errors, and the other asserts they are impossible.

Make them use qdev_try_new() and qdev_realize_and_unref() directly,
and eliminate usb_try_create_simple

Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agousb: usb_create() is now unused, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:17 +0000 (07:32 +0200)]
usb: usb_create() is now unused, drop

Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agousb: Convert uses of usb_create()
Markus Armbruster [Wed, 10 Jun 2020 05:32:16 +0000 (07:32 +0200)]
usb: Convert uses of usb_create()

Replace

    dev = usb_create(bus, type_name);
    ...
    object_property_set_bool(OBJECT(dev), true, "realized", &err);

by

    dev = isa_new(type_name);
    ...
    usb_realize_and_unref(dev, bus, &err);

Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.

Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agousb: New usb_new(), usb_realize_and_unref()
Markus Armbruster [Wed, 10 Jun 2020 05:32:15 +0000 (07:32 +0200)]
usb: New usb_new(), usb_realize_and_unref()

I'm converting from qdev_create()/qdev_init_nofail() to
qdev_new()/qdev_realize_and_unref(); recent commit "qdev: New
qdev_new(), qdev_realize(), etc." explains why.

USB devices use qdev_create() through usb_create().

Provide usb_new() and usb_realize_and_unref() for converting USB
devices.

Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agossi: ssi_create_slave_no_init() is now unused, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:14 +0000 (07:32 +0200)]
ssi: ssi_create_slave_no_init() is now unused, drop

Cc: Alistair Francis <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agossi: Convert last use of ssi_create_slave_no_init() manually
Markus Armbruster [Wed, 10 Jun 2020 05:32:13 +0000 (07:32 +0200)]
ssi: Convert last use of ssi_create_slave_no_init() manually

Same transformation as in the previous commit.  Manual, because
convincing Coccinelle to transform this case is not worthwhile.

Cc: Alistair Francis <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agossi: Convert uses of ssi_create_slave_no_init() with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:32:12 +0000 (07:32 +0200)]
ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle

Replace

    dev = ssi_create_slave_no_init(bus, type_name);
    ...
    qdev_init_nofail(dev);

by

    dev = qdev_new(type_name);
    ...
    qdev_realize_and_unref(dev, bus, &error_fatal);

Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.

    @@
    type SSIBus;
    identifier bus;
    expression dev, qbus, expr;
    expression list args;
    @@
    -    bus = (SSIBus *)qbus;
    +    bus = qbus; // TODO fix up decl
         ...
    -    dev = ssi_create_slave_no_init(bus, args);
    +    dev = qdev_new(args);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = ssi_create_slave_no_init(bus, args);
    +    dev = qdev_new(args);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, BUS(bus), &error_fatal);

Bus declarations fixed up manually.

Cc: Alistair Francis <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agossi: ssi_auto_connect_slaves() never does anything, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:11 +0000 (07:32 +0200)]
ssi: ssi_auto_connect_slaves() never does anything, drop

ssi_auto_connect_slaves(parent, cs_line, bus) iterates over @parent's
QOM children @dev of type TYPE_SSI_SLAVE.  It puts these on @bus, and
sets cs_line[] to qdev_get_gpio_in_named(dev, SSI_GPIO_CS, 0).

Suspicious: there is no protection against overrunning cs_line[].

Turns out it's safe because ssi_auto_connect_slaves() never finds any
such children.  Its called by realize methods of some (but not all)
devices providing an SSI bus, and gets passed the device.

SSI slave devices are always created with ssi_create_slave_no_init(),
optionally via ssi_create_slave().  This adds them to their SSI bus.
It doesn't set their QOM parent.

ssi_create_slave_no_init() is always immediately followed by
qdev_init_nofail(), with no QOM parent assigned, so
device_set_realized() puts the device into the /machine/unattached/
orphanage.  None become QOM children of a device providing an SSI bus.

ssi_auto_connect_slaves() was added in commit b4ae3cfa57 "ssi: Add
slave autoconnect helper".  I can't see which slaves it was supposed
to connect back then.

Cc: Alistair Francis <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoisa: isa_create(), isa_try_create() are now unused, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:10 +0000 (07:32 +0200)]
isa: isa_create(), isa_try_create() are now unused, drop

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoisa: Convert uses of isa_create(), isa_try_create() manually
Markus Armbruster [Wed, 10 Jun 2020 05:32:09 +0000 (07:32 +0200)]
isa: Convert uses of isa_create(), isa_try_create() manually

Same transformation as in the previous commit.  Manual, because
convincing Coccinelle to transform these cases is not worthwhile.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoisa: Convert uses of isa_create() with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:32:08 +0000 (07:32 +0200)]
isa: Convert uses of isa_create() with Coccinelle

Replace

    dev = isa_create(bus, type_name);
    ...
    qdev_init_nofail(dev);

by

    dev = isa_new(type_name);
    ...
    isa_realize_and_unref(dev, bus, &error_fatal);

Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.

Coccinelle script:

    @@
    expression dev, bus, expr;
    expression list args;
    expression d;
    @@
    -    dev = isa_create(bus, args);
    +    dev = isa_new(args);
    (
         d = &dev->qdev;
    |
         d = DEVICE(dev);
    )
         ... when != dev = expr
    -    qdev_init_nofail(d);
    +    isa_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = isa_create(bus, args);
    +    dev = isa_new(args);
         ... when != dev = expr
    -    qdev_init_nofail(DEVICE(dev));
    +    isa_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = DEVICE(isa_create(bus, args));
    +    ISADevice *isa_dev; // TODO move
    +    isa_dev = isa_new(args);
    +    dev = DEVICE(isa_dev);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    isa_realize_and_unref(isa_dev, bus, &error_fatal);

Missing #include "qapi/error.h" added manually, whitespace changes
minimized manually.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoisa: New isa_new(), isa_realize_and_unref() etc.
Markus Armbruster [Wed, 10 Jun 2020 05:32:07 +0000 (07:32 +0200)]
isa: New isa_new(), isa_realize_and_unref() etc.

I'm converting from qdev_create()/qdev_init_nofail() to
qdev_new()/qdev_realize_and_unref(); recent commit "qdev: New
qdev_new(), qdev_realize(), etc." explains why.

ISA devices use qdev_create() through isa_create() and
isa_try_create().

Provide isa_new(), isa_try_new(), and isa_realize_and_unref() for
converting ISA devices.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agopci: pci_create(), pci_create_multifunction() are now unused, drop
Markus Armbruster [Wed, 10 Jun 2020 05:32:06 +0000 (07:32 +0200)]
pci: pci_create(), pci_create_multifunction() are now unused, drop

Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
4 years agopci: Convert uses of pci_create() etc. manually
Markus Armbruster [Wed, 10 Jun 2020 05:32:05 +0000 (07:32 +0200)]
pci: Convert uses of pci_create() etc. manually

Same transformation as in the previous commit.  Manual, because
convincing Coccinelle to transform these cases is not worthwhile.

Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
4 years agopci: Convert uses of pci_create() etc. with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:32:04 +0000 (07:32 +0200)]
pci: Convert uses of pci_create() etc. with Coccinelle

Replace

    dev = pci_create(bus, type_name);
    ...
    qdev_init_nofail(dev);

by

    dev = pci_new(type_name);
    ...
    pci_realize_and_unref(dev, bus, &error_fatal);

and similarly for pci_create_multifunction().

Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains
why.

Coccinelle script:

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = pci_create(bus, args);
    +    dev = pci_new(args);
         ... when != dev = expr
    -    qdev_init_nofail(&dev->qdev);
    +    pci_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    expression d;
    @@
    -    dev = pci_create(bus, args);
    +    dev = pci_new(args);
    (
         d = &dev->qdev;
    |
         d = DEVICE(dev);
    )
         ... when != dev = expr
    -    qdev_init_nofail(d);
    +    pci_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = pci_create(bus, args);
    +    dev = pci_new(args);
         ... when != dev = expr
    -    qdev_init_nofail(DEVICE(dev));
    +    pci_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = DEVICE(pci_create(bus, args));
    +    PCIDevice *pci_dev; // TODO move
    +    pci_dev = pci_new(args);
    +    dev = DEVICE(pci_dev);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    pci_realize_and_unref(pci_dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = pci_create_multifunction(bus, args);
    +    dev = pci_new_multifunction(args);
         ... when != dev = expr
    -    qdev_init_nofail(&dev->qdev);
    +    pci_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression bus, expr;
    expression list args;
    identifier dev;
    @@
    -    PCIDevice *dev = pci_create_multifunction(bus, args);
    +    PCIDevice *dev = pci_new_multifunction(args);
         ... when != dev = expr
    -    qdev_init_nofail(&dev->qdev);
    +    pci_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression dev, bus, expr;
    expression list args;
    @@
    -    dev = pci_create_multifunction(bus, args);
    +    dev = pci_new_multifunction(args);
         ... when != dev = expr
    -    qdev_init_nofail(DEVICE(dev));
    +    pci_realize_and_unref(dev, bus, &error_fatal);

Missing #include "qapi/error.h" added manually, whitespace changes
minimized manually, @pci_dev declarations moved manually.

Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
4 years agohw/ppc: Eliminate two superfluous QOM casts
Markus Armbruster [Wed, 10 Jun 2020 05:32:03 +0000 (07:32 +0200)]
hw/ppc: Eliminate two superfluous QOM casts

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
4 years agopci: New pci_new(), pci_realize_and_unref() etc.
Markus Armbruster [Wed, 10 Jun 2020 05:32:02 +0000 (07:32 +0200)]
pci: New pci_new(), pci_realize_and_unref() etc.

I'm converting from qdev_create()/qdev_init_nofail() to
qdev_new()/qdev_realize_and_unref(); recent commit "qdev: New
qdev_new(), qdev_realize(), etc." explains why.

PCI devices use qdev_create() through pci_create() and
pci_create_multifunction().

Provide pci_new(), pci_new_multifunction(), and
pci_realize_and_unref() for converting PCI devices.

Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
4 years agoqdev: Convert uses of qdev_set_parent_bus() manually
Markus Armbruster [Wed, 10 Jun 2020 05:32:01 +0000 (07:32 +0200)]
qdev: Convert uses of qdev_set_parent_bus() manually

Same transformation as in the previous commit.  Manual, because
convincing Coccinelle to transform these cases is somewhere between
not worthwhile and infeasible (at least for me).

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Convert uses of qdev_set_parent_bus() with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:32:00 +0000 (07:32 +0200)]
qdev: Convert uses of qdev_set_parent_bus() with Coccinelle

In addition to the qdev_create() patterns converted so far, we have a
qdev_set_parent_bus() pattern.  Mostly when we embed a device in a
parent device rather than allocating it on the heap.

This pattern also puts devices in the dangerous "no QOM parent, but
plugged into bus" state I explained in recent commit "qdev: New
qdev_new(), qdev_realize(), etc."

Apply same solution: convert to qdev_realize().  Coccinelle script:

    @@
    expression dev, bus, errp;
    symbol true;
    @@
    -    qdev_set_parent_bus(DEVICE(dev), bus);
         ...
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize(DEVICE(dev), bus, errp);

    @ depends on !(file in "qdev-monitor.c") && !(file in "hw/core/qdev.c")@
    expression dev, bus, errp;
    symbol true;
    @@
    -    qdev_set_parent_bus(dev, bus);
         ...
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize(dev, bus, errp);

    @@
    expression dev, bus;
    symbol true;
    @@
    -    qdev_set_parent_bus(DEVICE(dev), bus);
         ...
    -    qdev_init_nofail(DEVICE(dev));
    +    qdev_realize(DEVICE(dev), bus, &error_fatal);

Unconverted uses of qdev_set_parent_bus() remain.  They'll be
converted later in this series.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
[Also convert new hw/virtio/vhost-user-vsock-pci.c]

4 years agoqdev: Convert uses of qdev_create() manually
Markus Armbruster [Wed, 10 Jun 2020 05:31:59 +0000 (07:31 +0200)]
qdev: Convert uses of qdev_create() manually

Same transformation as in the previous commit.  Manual, because
convincing Coccinelle to transform these cases is somewhere between
not worthwhile and infeasible (at least for me).

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Convert uses of qdev_create() with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:31:58 +0000 (07:31 +0200)]
qdev: Convert uses of qdev_create() with Coccinelle

This is the transformation explained in the commit before previous.
Takes care of just one pattern that needs conversion.  More to come in
this series.

Coccinelle script:

    @ depends on !(file in "hw/arm/highbank.c")@
    expression bus, type_name, dev, expr;
    @@
    -    dev = qdev_create(bus, type_name);
    +    dev = qdev_new(type_name);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression bus, type_name, dev, expr;
    identifier DOWN;
    @@
    -    dev = DOWN(qdev_create(bus, type_name));
    +    dev = DOWN(qdev_new(type_name));
         ... when != dev = expr
    -    qdev_init_nofail(DEVICE(dev));
    +    qdev_realize_and_unref(DEVICE(dev), bus, &error_fatal);

    @@
    expression bus, type_name, expr;
    identifier dev;
    @@
    -    DeviceState *dev = qdev_create(bus, type_name);
    +    DeviceState *dev = qdev_new(type_name);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, bus, &error_fatal);

    @@
    expression bus, type_name, dev, expr, errp;
    symbol true;
    @@
    -    dev = qdev_create(bus, type_name);
    +    dev = qdev_new(type_name);
         ... when != dev = expr
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize_and_unref(dev, bus, errp);

    @@
    expression bus, type_name, expr, errp;
    identifier dev;
    symbol true;
    @@
    -    DeviceState *dev = qdev_create(bus, type_name);
    +    DeviceState *dev = qdev_new(type_name);
         ... when != dev = expr
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize_and_unref(dev, bus, errp);

The first rule exempts hw/arm/highbank.c, because it matches along two
control flow paths there, with different @type_name.  Covered by the
next commit's manual conversions.

Missing #include "qapi/error.h" added manually.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>
[Conflicts in hw/misc/empty_slot.c and hw/sparc/leon3.c resolved]

4 years agoqdev: Convert to qdev_unrealize() manually
Markus Armbruster [Wed, 10 Jun 2020 05:31:57 +0000 (07:31 +0200)]
qdev: Convert to qdev_unrealize() manually

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Convert to qdev_unrealize() with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:31:56 +0000 (07:31 +0200)]
qdev: Convert to qdev_unrealize() with Coccinelle

For readability, and consistency with qbus_realize().

Coccinelle script:

    @ depends on !(file in "hw/core/qdev.c")@
    typedef DeviceState;
    DeviceState *dev;
    symbol false, error_abort;
    @@
    -    object_property_set_bool(OBJECT(dev), false, "realized", &error_abort);
    +    qdev_unrealize(dev);

    @ depends on !(file in "hw/core/qdev.c") && !(file in "hw/core/bus.c")@
    expression dev;
    symbol false, error_abort;
    @@
    -    object_property_set_bool(OBJECT(dev), false, "realized", &error_abort);
    +    qdev_unrealize(DEVICE(dev));

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Convert to qbus_realize(), qbus_unrealize()
Markus Armbruster [Wed, 10 Jun 2020 05:31:55 +0000 (07:31 +0200)]
qdev: Convert to qbus_realize(), qbus_unrealize()

I'm going to convert device realization to qdev_realize() with the
help of Coccinelle.  Convert bus realization to qbus_realize() first,
to get it out of Coccinelle's way.  Readability improves.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Put qdev_new() to use with Coccinelle
Markus Armbruster [Wed, 10 Jun 2020 05:31:54 +0000 (07:31 +0200)]
qdev: Put qdev_new() to use with Coccinelle

Let's start simple and put qdev_new() to use.  Coccinelle script:

    @ depends on !(file in "hw/core/qdev.c")@
    expression type_name;
    @@
    -    DEVICE(object_new(type_name))
    +    qdev_new(type_name)

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: New qdev_new(), qdev_realize(), etc.
Markus Armbruster [Wed, 10 Jun 2020 05:31:53 +0000 (07:31 +0200)]
qdev: New qdev_new(), qdev_realize(), etc.

We commonly plug devices into their bus right when we create them,
like this:

    dev = qdev_create(bus, type_name);

Note that @dev is a weak reference.  The reference from @bus to @dev
is the only strong one.

We realize at some later time, either with

    object_property_set_bool(OBJECT(dev), true, "realized", errp);

or its convenience wrapper

    qdev_init_nofail(dev);

If @dev still has no QOM parent then, realizing makes the
/machine/unattached/ orphanage its QOM parent.

Note that the device returned by qdev_create() is plugged into a bus,
but doesn't have a QOM parent, yet.  Until it acquires one,
unrealizing the bus will hang in bus_unparent():

    while ((kid = QTAILQ_FIRST(&bus->children)) != NULL) {
        DeviceState *dev = kid->child;
        object_unparent(OBJECT(dev));
    }

object_unparent() does nothing when its argument has no QOM parent,
and the loop spins forever.

Device state "no QOM parent, but plugged into bus" is dangerous.

Paolo suggested to delay plugging into the bus until realize.  We need
to plug into the parent bus before we call the device's realize
method, in case it uses the parent bus.  So the dangerous state still
exists, but only within realization, where we can manage it safely.

This commit creates infrastructure to do this:

    dev = qdev_new(type_name);
    ...
    qdev_realize_and_unref(dev, bus, errp)

Note that @dev becomes a strong reference here.
qdev_realize_and_unref() drops it.  There is also plain
qdev_realize(), which doesn't drop it.

The remainder of this series will convert all users to this new
interface.

Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Mark Cave-Ayland <[email protected]>
Cc: David Gibson <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoRevert "hw/versatile: realize the PCI root bus as part of the versatile init"
Markus Armbruster [Wed, 10 Jun 2020 05:31:52 +0000 (07:31 +0200)]
Revert "hw/versatile: realize the PCI root bus as part of the versatile init"

This reverts commit b1af7959a66610669e1a019b9a84f6ed3a7936c6.

Realizing a device automatically realizes its buses, in
device_set_realized().  Realizing them in realize methods is
redundant, unless the methods themselves require them to be realized
early.  pci_vpb_realize() doesn't.  Drop the redundant bus
realization.

Cc: Marcel Apfelbaum <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoRevert "hw/prep: realize the PCI root bus as part of the prep init"
Markus Armbruster [Wed, 10 Jun 2020 05:31:51 +0000 (07:31 +0200)]
Revert "hw/prep: realize the PCI root bus as part of the prep init"

This reverts commit 685f9a3428f625f580af0123aa95f4838d86cac3.

Realizing a device automatically realizes its buses, in
device_set_realized().  Realizing them in realize methods is
redundant, unless the methods themselves require them to be realized
early.  raven_pcihost_realizefn() doesn't.  Drop the redundant bus
realization.

Cc: Marcel Apfelbaum <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Rename qbus_realize() to qbus_init()
Markus Armbruster [Wed, 10 Jun 2020 05:31:50 +0000 (07:31 +0200)]
qdev: Rename qbus_realize() to qbus_init()

qbus_realize() does not actually realize.  Rename it to qbus_init().

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <20200610053247.1583243[email protected]>

4 years agoqdev: Assert onboard devices all get realized properly
Markus Armbruster [Tue, 9 Jun 2020 12:23:39 +0000 (14:23 +0200)]
qdev: Assert onboard devices all get realized properly

This would have caught some of the bugs I just fixed.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agosd: Hide the qdev-but-not-quite thing created by sd_init()
Markus Armbruster [Tue, 9 Jun 2020 12:23:38 +0000 (14:23 +0200)]
sd: Hide the qdev-but-not-quite thing created by sd_init()

Commit 260bc9d8aa "hw/sd/sd.c: QOMify" QOMified only the device
itself, not its users.  It kept sd_init() around for non-QOMified
users.

More than four years later, three such users remain: omap1 (machines
cheetah, sx1, sx1-v1) and omap2 (machines n800, n810) are not
QOMified, and pl181 (machines integratorcp, realview-eb,
realview-eb-mpcore, realview-pb-a8 realview-pbx-a9, versatileab,
versatilepb, vexpress-a15, vexpress-a9) is not QOMified properly.

The issue I presently have with this: an "sd-card" device should plug
into an "sd-bus" (its DeviceClass member bus_type says so), but
sd_init() leaves it unplugged.  This is normally a bug (I just fixed
some instances), and I'd like to assert proper pluggedness to prevent
regressions.  However, the qdev-but-not-quite thing returned by
sd_init() would fail the assertion.  Meh.

Make sd_init() hide it from QOM/qdev.  Visible in "info qom-tree",
here's the change for cheetah:

     /machine (cheetah-machine)
       [...]
       /unattached (container)
         [...]
         /device[5] (serial-mm)
           /serial (serial)
           /serial[0] (qemu:memory-region)
    -    /device[6] (sd-card)
    -    /device[7] (omap-gpio)
    +    /device[6] (omap-gpio)
         [rest of device[*] renumbered...]

Cc: "Philippe Mathieu-Daudé" <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoqdev: Assert devices are plugged into a bus that can take them
Markus Armbruster [Tue, 9 Jun 2020 12:23:37 +0000 (14:23 +0200)]
qdev: Assert devices are plugged into a bus that can take them

This would have caught some of the bugs I just fixed.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Mark Cave-Ayland <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agosparc/leon3: Fix to put grlib,* devices on sysbus
Markus Armbruster [Tue, 9 Jun 2020 12:23:36 +0000 (14:23 +0200)]
sparc/leon3: Fix to put grlib,* devices on sysbus

leon3_generic_hw_init() creates a "grlib,ahbpnp" and a "grlib,apbpnp"
sysbus device in a way that leaves them unplugged.

Create them the common way that puts them into the main system bus.
Affects machine leon3_generic.  Visible in "info qtree":

     bus: main-system-bus
       type System
    +  dev: grlib,ahbpnp, id ""
    +    mmio 00000000fffff000/0000000000001000
    +  dev: grlib,apbpnp, id ""
    +    mmio 00000000800ff000/0000000000001000
       dev: grlib,irqmp, id ""

Cc: Fabien Chouteau <[email protected]>
Cc: KONRAD Frederic <[email protected]>
Cc: Mark Cave-Ayland <[email protected]>
Cc: Artyom Tarasenko <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: KONRAD Frederic <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>
Acked-by: Artyom Tarasenko <[email protected]>
4 years agoriscv: Fix type of SiFive[EU]SocState, member parent_obj
Markus Armbruster [Tue, 9 Jun 2020 12:23:35 +0000 (14:23 +0200)]
riscv: Fix type of SiFive[EU]SocState, member parent_obj

Device "riscv.sifive.e.soc" is a direct subtype of TYPE_DEVICE, but
its instance struct SiFiveESoCState's member @parent_obj is
SysBusDevice instead of DeviceState.  Correct that.

Same for "riscv.sifive.u.soc"'s instance struct SiFiveUSoCState.

Cc: Palmer Dabbelt <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Sagar Karandikar <[email protected]>
Cc: Bastian Koppelmann <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoriscv: Fix to put "riscv.hart_array" devices on sysbus
Markus Armbruster [Tue, 9 Jun 2020 12:23:34 +0000 (14:23 +0200)]
riscv: Fix to put "riscv.hart_array" devices on sysbus

riscv_sifive_e_soc_init(), riscv_sifive_u_soc_init(),
spike_board_init(), spike_v1_10_0_board_init(),
spike_v1_09_1_board_init(), and riscv_virt_board_init() create
"riscv-hart_array" sysbus devices in a way that leaves them unplugged.

Create them the common way that puts them into the main system bus.
Affects machines sifive_e, sifive_u, spike, spike_v1.10, spike_v1.9.1,
and virt.  Visible in "info qtree", here's the change for sifive_e:

     bus: main-system-bus
       type System
    +  dev: riscv.hart_array, id ""
    +    num-harts = 1 (0x1)
    +    hartid-base = 0 (0x0)
    +    cpu-type = "sifive-e31-riscv-cpu"
       dev: sifive_soc.gpio, id ""

Cc: Palmer Dabbelt <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Sagar Karandikar <[email protected]>
Cc: Bastian Koppelmann <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agodisplay/sm501 display/ati: Fix to realize "i2c-ddc"
Markus Armbruster [Tue, 9 Jun 2020 12:23:33 +0000 (14:23 +0200)]
display/sm501 display/ati: Fix to realize "i2c-ddc"

sm501_init() and ati_vga_realize() create an "i2c-ddc" device, but
neglect to realize it.  Affects machines sam460ex, shix, r2d, and
fulong2e.

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect
to realize it.

This one appears to work.  Nevertheless, it's a clear misuse of the
interface.  Even when it works today (more or less by chance), it can
break tomorrow.

Fix by realizing it right away.  Visible in "info qom-tree"; here's
the change for sam460ex:

     /machine (sam460ex-machine)
       [...]
       /unattached (container)
         [...]
    -    /device[14] (sii3112)
    +    /device[14] (i2c-ddc)
    +    /device[15] (sii3112)
         [rest of device[*] renumbered...]

Fixes: 4a1f253adb45ac6019971193d5077c4d5d55886a
Fixes: c82c7336de58876862e6b4dccbda29e9240fd388
Cc: BALATON Zoltan <[email protected]>
Cc: [email protected]
Cc: Magnus Damm <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>
Cc: Aleksandar Markovic <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Tested-by: BALATON Zoltan <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agopnv/psi: Correct the pnv-psi* devices not to be sysbus devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:32 +0000 (14:23 +0200)]
pnv/psi: Correct the pnv-psi* devices not to be sysbus devices

pnv_chip_power8_instance_init() creates a "pnv-psi-POWER8" sysbus
device in a way that leaves it unplugged.
pnv_chip_power9_instance_init() and pnv_chip_power10_instance_init()
do the same for "pnv-psi-POWER9" and "pnv-psi-POWER10", respectively.

These devices aren't actually sysbus devices.  Correct that.

Cc: "Cédric Le Goater" <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoppc/pnv: Put "*-pnv-chip" and "pnv-xive" on the main system bus
Markus Armbruster [Tue, 9 Jun 2020 12:23:31 +0000 (14:23 +0200)]
ppc/pnv: Put "*-pnv-chip" and "pnv-xive" on the main system bus

pnv_init() creates "power10_v1.0-pnv-chip", "power8_v2.0-pnv-chip",
"power8e_v2.1-pnv-chip", "power8nvl_v1.0-pnv-chip", or
"power9_v2.0-pnv-chip" sysbus devices in a way that leaves them
unplugged.

pnv_chip_power9_instance_init() creates a "pnv-xive" sysbus device in
a way that leaves it unplugged.

Create them the common way that puts them into the main system bus.
Affects machines powernv8, powernv9, and powernv10.  Visible in "info
qtree".  Here's the change for powernv9:

     bus: main-system-bus
       type System
    +  dev: power9_v2.0-pnv-chip, id ""
    +    chip-id = 0 (0x0)
    +    ram-start = 0 (0x0)
    +    ram-size = 1879048192 (0x70000000)
    +    nr-cores = 1 (0x1)
    +    cores-mask = 72057594037927935 (0xffffffffffffff)
    +    nr-threads = 1 (0x1)
    +    num-phbs = 6 (0x6)
    +    mmio 000603fc00000000/0000000400000000
    [...]
    +  dev: pnv-xive, id ""
    +    ic-bar = 1692157036462080 (0x6030203100000)
    +    vc-bar = 1689949371891712 (0x6010000000000)
    +    pc-bar = 1690499127705600 (0x6018000000000)
    +    tm-bar = 1692157036986368 (0x6030203180000)

Cc: "Cédric Le Goater" <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agomacio: Fix macio-bus to be a subtype of System bus
Markus Armbruster [Tue, 9 Jun 2020 12:23:30 +0000 (14:23 +0200)]
macio: Fix macio-bus to be a subtype of System bus

The devices we plug into the macio-bus are all sysbus devices
(DeviceClass member bus_type is TYPE_SYSTEM_BUS), but macio-bus does
not derive from TYPE_SYSTEM_BUS.  Fix that.

"info qtree" now shows the devices' mmio ranges, as it should

Cc: Mark Cave-Ayland <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agomacio: Put "macio-nvram" device on the macio bus
Markus Armbruster [Tue, 9 Jun 2020 12:23:29 +0000 (14:23 +0200)]
macio: Put "macio-nvram" device on the macio bus

macio_oldworld_init() creates a "macio-nvram", sysbus device, but
neglects to but it on a bus.

Put it on the macio bus.  Affects machine g3beige.  Visible in "info
qtree":

             bus: macio.0
               type macio-bus
               [...]
    +          dev: macio-nvram, id ""
    +            size = 8192 (0x2000)
    +            it_shift = 4 (0x4)

This also makes it a QOM child of macio-oldworld.  Visible in "info
qom-tree":

     /machine (g3beige-machine)
       [...]
       /unattached (container)
         [...]
         /device[6] (macio-oldworld)
           [...]
    -    /device[7] (macio-nvram)
    -      /macio-nvram[0] (qemu:memory-region)
    +      /nvram (macio-nvram)
    +        /macio-nvram[0] (qemu:memory-region)
         [rest of device[*] renumbered...]

Cc: Mark Cave-Ayland <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoppc4xx: Drop redundant device realization
Markus Armbruster [Tue, 9 Jun 2020 12:23:28 +0000 (14:23 +0200)]
ppc4xx: Drop redundant device realization

object_property_set_bool(OBJECT(dev), true, "realized", ...) right
after qdev_init_nofail(dev) does nothing, because qdev_init_nofail()
already realizes.  Drop.

Cc: BALATON Zoltan <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: BALATON Zoltan <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoMAINTAINERS: Make section PowerNV cover pci-host/pnv* as well
Markus Armbruster [Tue, 9 Jun 2020 12:23:27 +0000 (14:23 +0200)]
MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well

Cc: Cédric Le Goater <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: David Gibson <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agopnv/phb4: Delete unused "pnv-phb4-pec-stack" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:26 +0000 (14:23 +0200)]
pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices

The number of stacks is controlled by property "num-stacks".
pnv_pec_instance_init() creates the maximum supported number, because
the property has not been set then.  pnv_pec_realize() realizes only
the wanted number.  Works, although it can leave unrealized devices
hanging around in the QOM composition tree.  Affects machine powernv9.

Delete the unused devices by making pnv_pec_realize() unparent them.
Visible in "info qom-tree":

     /machine (powernv9-machine)
       /chip[0] (power9_v2.0-pnv-chip)
         [...]
         /pec[0] (pnv-phb4-pec)
           /stack[0] (pnv-phb4-pec-stack)
             [...]
    -      /stack[1] (pnv-phb4-pec-stack)
    -        /phb (pnv-phb4)
    -          /pcie-mmcfg-mmio[0] (qemu:memory-region)
    -          /root (pnv-phb4-root-port)
    -          /source (xive-source)
    -      /stack[2] (pnv-phb4-pec-stack)
    -        /phb (pnv-phb4)
    -          /pcie-mmcfg-mmio[0] (qemu:memory-region)
    -          /root (pnv-phb4-root-port)
    -          /source (xive-source)
           /xscom-pec-0.0-nest[0] (qemu:memory-region)
           /xscom-pec-0.0-pci[0] (qemu:memory-region)
         /pec[1] (pnv-phb4-pec)
           /stack[0] (pnv-phb4-pec-stack)
             [...]
           /stack[1] (pnv-phb4-pec-stack)
             [...]
    -      /stack[2] (pnv-phb4-pec-stack)
    -        /phb (pnv-phb4)
    -          /pcie-mmcfg-mmio[0] (qemu:memory-region)
    -          /root (pnv-phb4-root-port)
    -          /source (xive-source)
           /xscom-pec-0.1-nest[0] (qemu:memory-region)
           /xscom-pec-0.1-pci[0] (qemu:memory-region)
         /pec[2] (pnv-phb4-pec)
           /stack[0] (pnv-phb4-pec-stack)
             [...]
           /stack[1] (pnv-phb4-pec-stack)
             [...]
           /stack[2] (pnv-phb4-pec-stack)
             [...]

Cc: Cédric Le Goater <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agomacio: Delete unused "macio-gpio" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:25 +0000 (14:23 +0200)]
macio: Delete unused "macio-gpio" devices

These devices go with the "via-pmu" device, which is controlled by
property "has-pmu".  macio_newworld_init() creates it unconditionally,
because the property has not been set then.  macio_newworld_realize()
realizes it only when the property is true.  Works, although it can
leave an unrealized device hanging around in the QOM composition tree.
Affects machine mac99 with via=cuda (default).

Delete the unused device by making macio_newworld_realize() unparent
it.  Visible in "info qom-tree":

     /machine (mac99-machine)
       [...]
       /unattached (container)
         /device[9] (macio-newworld)
           [...]
           /escc-legacy-port[8] (qemu:memory-region)
           /escc-legacy-port[9] (qemu:memory-region)
           /escc-legacy[0] (qemu:memory-region)
    -      /gpio (macio-gpio)
    -        /gpio[0] (qemu:memory-region)
           /ide[0] (macio-ide)
             /ide.0 (IDE)
             /pmac-ide[0] (qemu:memory-region)

Cc: Mark Cave-Ayland <[email protected]>
Cc: David Gibson <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Mark Cave-Ayland <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agomacio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:24 +0000 (14:23 +0200)]
macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices

cuda_init() creates a "mos6522-cuda" device, but it's never realized.
Affects machines mac99 with via=cuda (default) and g3beige.

pmu_init() creates a "mos6522-pmu" device, but it's never realized.
Affects machine mac99 with via=pmu and via=pmu-adb,

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect
to realize it.

These two appear to work.  Nevertheless, it's a clear misuse of the
interface.  Even when it works today (more or less by chance), it can
break tomorrow.

Fix by realizing them in cuda_realize() and pmu_realize(),
respectively.

Fixes: 6dca62a0000f95e0b7020aa00d0ca9b2c421f341
Cc: Laurent Vivier <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agomac_via: Fix to realize "mos6522-q800-via*" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:23 +0000 (14:23 +0200)]
mac_via: Fix to realize "mos6522-q800-via*" devices

mac_via_realize() creates a "mos6522-q800-via1" and a
"mos6522-q800-via2" device, but neglects to realize them.  Affects
machine q800.

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect
to realize it.

These two appear to work.  Nevertheless, it's a clear misuse of the
interface.  Even when it works today (more or less by chance), it can
break tomorrow.

Fix by realizing them right away.

Fixes: 6dca62a0000f95e0b7020aa00d0ca9b2c421f341
Cc: Laurent Vivier <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Mark Cave-Ayland <[email protected]>
Message-Id: <20200609122339[email protected]>
Tested-by: Laurent Vivier <[email protected]>
Acked-by: Laurent Vivier <[email protected]>
4 years agoauxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave
Markus Armbruster [Tue, 9 Jun 2020 12:23:22 +0000 (14:23 +0200)]
auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave

We plug aux-to-i2c-bridge into the aux-bus, even though its
DeviceClass member bus_type is null, not TYPE_AUX_BUS.  Fix that by
deriving it from TYPE_AUX_SLAVE instead of TYPE_DEVICE.

Cc: KONRAD Frederic <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoarmv7m: Delete unused "ARM,bitband-memory" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:21 +0000 (14:23 +0200)]
armv7m: Delete unused "ARM,bitband-memory" devices

These devices are optional, and enabled by property "enable-bitband".
armv7m_instance_init() creates them unconditionally, because the
property has not been set then.  armv7m_realize() realizes them only
when the property is true.  Works, although it leaves unrealized
devices hanging around in the QOM composition tree.  Affects machines
microbit, mps2-an505, mps2-an521, musca-a, and musca-b1.

Delete the unused devices by making armv7m_realize() unparent them.
Visible in "info qom-tree"; here's the change for microbit:

     /machine (microbit-machine)
       /microbit.twi (microbit.i2c)
         /microbit.twi[0] (qemu:memory-region)
       /nrf51 (nrf51-soc)
         /armv6m (armv7m)
           /armv7m-container[0] (qemu:memory-region)
    -      /bitband[0] (ARM,bitband-memory)
    -        /bitband[0] (qemu:memory-region)
    -      /bitband[1] (ARM,bitband-memory)
    -        /bitband[0] (qemu:memory-region)
           /cpu (cortex-m0-arm-cpu)

Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoarm/aspeed: Rework NIC attachment
Cédric Le Goater [Tue, 9 Jun 2020 12:23:20 +0000 (14:23 +0200)]
arm/aspeed: Rework NIC attachment

The number of MACs supported by an Aspeed SoC is defined by "macs_num"
under the SoC model, that is two for the AST2400 and AST2500 and four
for the AST2600. The model initializes the maximum number of supported
MACs but the number of realized devices is capped by the number of
network device back-ends defined on the command line. This can leave
unrealized devices hanging around in the QOM composition tree.

To get virtual hardware that matches the physical hardware, you have
to pass exactly as many -nic options as there are MACs, and some of
them must be -nic none:

* Machines ast2500-evb, palmetto-bmc, romulus-bmc, sonorapass-bmc,
  swift-bmc, and witherspoon-bmc: two -nic, and the second one must be
  -nic none.

* Machine ast2600-evb: four -nic, the first one must be -nic none.

* Machine tacoma-bmc: four nic, the first two and the last one must be
  -nic none.

Modify the machine initialization to define which MACs are attached to
a network device back-end using a bit-field property "macs-mask" and
let the SoC realize all network devices.

The default setting of "macs-mask" is "use MAC0" only, which works for
all our AST2400 and AST2500 machines. The AST2600 machines have
different configurations. The AST2600 EVB machine activates MAC1, MAC2
and MAC3 and the Tacoma BMC machine activates MAC2.

Incompatible CLI change: -nic options now apply to *active* MACs:
MAC1, MAC2, MAC3 for ast2600-evb, MAC2 for tacoma-bmc, and MAC0 for
all the others.

The machines now always get all MACs as they should. Visible in "info
qom-tree", here's the change for tacoma-bmc:

     /machine (tacoma-bmc-machine)
       /peripheral (container)
       /peripheral-anon (container)
       /soc (ast2600-a1)
         [...]
         /ftgmac100[0] (ftgmac100)
           /ftgmac100[0] (qemu:memory-region)
         /ftgmac100[1] (ftgmac100)
    +      /ftgmac100[0] (qemu:memory-region)
         /ftgmac100[2] (ftgmac100)
    +      /ftgmac100[0] (qemu:memory-region)
         /ftgmac100[3] (ftgmac100)
    +      /ftgmac100[0] (qemu:memory-region)
         [...]
         /mii[0] (aspeed-mmi)
           /aspeed-mmi[0] (qemu:memory-region)
         /mii[1] (aspeed-mmi)
    +      /aspeed-mmi[0] (qemu:memory-region)
         /mii[2] (aspeed-mmi)
    +      /aspeed-mmi[0] (qemu:memory-region)
         /mii[3] (aspeed-mmi)
    +      /aspeed-mmi[0] (qemu:memory-region)

Also visible in "info qtree"; here's the change for tacoma-bmc:

       dev: ftgmac100, id ""
         gpio-out "sysbus-irq" 1
         aspeed = true
    -    mac = "52:54:00:12:34:56"
    -    netdev = "hub0port0"
    +    mac = "52:54:00:12:34:57"
    +    netdev = ""
         mmio 000000001e660000/0000000000002000
       dev: ftgmac100, id ""
    -    aspeed = false
    -    mac = "00:00:00:00:00:00"
    +    gpio-out "sysbus-irq" 1
    +    aspeed = true
    +    mac = "52:54:00:12:34:58"
         netdev = ""
    +    mmio 000000001e680000/0000000000002000
       dev: ftgmac100, id ""
    -    aspeed = false
    -    mac = "00:00:00:00:00:00"
    -    netdev = ""
    +    gpio-out "sysbus-irq" 1
    +    aspeed = true
    +    mac = "52:54:00:12:34:56"
    +    netdev = "hub0port0"
    +    mmio 000000001e670000/0000000000002000
       dev: ftgmac100, id ""
    -    aspeed = false
    -    mac = "00:00:00:00:00:00"
    +    gpio-out "sysbus-irq" 1
    +    aspeed = true
    +    mac = "52:54:00:12:34:59"
         netdev = ""
    +    mmio 000000001e690000/0000000000002000
       [...]
       dev: aspeed-mmi, id ""
         mmio 000000001e650000/0000000000000008
       dev: aspeed-mmi, id ""
    +    mmio 000000001e650008/0000000000000008
       dev: aspeed-mmi, id ""
    +    mmio 000000001e650010/0000000000000008
       dev: aspeed-mmi, id ""
    +    mmio 000000001e650018/0000000000000008

Inactive MACs will have no peer and QEMU may warn the user with :

    qemu-system-arm: warning: nic ftgmac100.0 has no peer
    qemu-system-arm: warning: nic ftgmac100.1 has no peer
    qemu-system-arm: warning: nic ftgmac100.3 has no peer

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
[Commit message expanded]
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoarm/aspeed: Compute the number of CPUs from the SoC definition
Cédric Le Goater [Tue, 9 Jun 2020 12:23:19 +0000 (14:23 +0200)]
arm/aspeed: Compute the number of CPUs from the SoC definition

Commit ece09beec457 ("aspeed: introduce a configurable number of CPU
per machine") was a convient change during bringup but the Aspeed SoCs
have a fixed number of CPUs : one for the AST2400 and AST2500, and two
for the AST2600.

When the number of CPUs configured with -smp is less than the SoC's
fixed number, the "unconfigured" CPUs are left unrealized. This can
happen for machines ast2600-evb and tacoma-bmc, where the SoC's fixed
number is 2. To get virtual hardware that matches the physical
hardware, you have to pass -smp cpus=2 (or its sugared form -smp 2).

We normally reject -smp cpus=N when N exceeds the machine's limit.
Except we ignore cpus=2 (and only cpus=2) with a warning for machines
ast2500-evb, palmetto-bmc, romulus-bmc, sonorapass-bmc, swift-bmc, and
witherspoon-bmc.

Remove the "num-cpu" property from the SoC state and use the fixed
number of CPUs defined in the SoC class instead. Compute the default,
min, max number of CPUs of the machine directly from the SoC class
definition.

Machines ast2600-evb and tacoma-bmc now always get their second CPU as
they should. Visible in "info qom-tree"; here's the change for
ast2600-evb:

     /machine (ast2600-evb-machine)
       /peripheral (container)
       /peripheral-anon (container)
       /soc (ast2600-a1)
         /a7mpcore (a15mpcore_priv)
           /a15mp-priv-container[0] (qemu:memory-region)
           /gic (arm_gic)
             /gic_cpu[0] (qemu:memory-region)
             /gic_cpu[1] (qemu:memory-region)
    +        /gic_cpu[2] (qemu:memory-region)
             /gic_dist[0] (qemu:memory-region)
             /gic_vcpu[0] (qemu:memory-region)
             /gic_viface[0] (qemu:memory-region)
             /gic_viface[1] (qemu:memory-region)
    +        /gic_viface[2] (qemu:memory-region)
             /unnamed-gpio-in[0] (irq)
             [...]
    +        /unnamed-gpio-in[160] (irq)
             [same for 161 to 190...]
    +        /unnamed-gpio-in[191] (irq)

Also visible in "info qtree"; here's the change for ast2600-evb:

     bus: main-system-bus
       type System
       dev: a15mpcore_priv, id ""
         gpio-in "" 128
    -    gpio-out "sysbus-irq" 5
    -    num-cpu = 1 (0x1)
    +    gpio-out "sysbus-irq" 10
    +    num-cpu = 2 (0x2)
         num-irq = 160 (0xa0)
         mmio 0000000040460000/0000000000008000
       dev: arm_gic, id ""
    -    gpio-in "" 160
    -    num-cpu = 1 (0x1)
    +    gpio-in "" 192
    +    num-cpu = 2 (0x2)
         num-irq = 160 (0xa0)
         revision = 2 (0x2)
         has-security-extensions = true
         has-virtualization-extensions = true
         num-priority-bits = 8 (0x8)
         mmio ffffffffffffffff/0000000000001000
         mmio ffffffffffffffff/0000000000002000
         mmio ffffffffffffffff/0000000000001000
         mmio ffffffffffffffff/0000000000002000
         mmio ffffffffffffffff/0000000000000100
    +    mmio ffffffffffffffff/0000000000000100
    +    mmio ffffffffffffffff/0000000000000200
         mmio ffffffffffffffff/0000000000000200

The other machines now reject -smp cpus=2 just like -smp cpus=3 and up.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
[Commit message expanded]
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agosd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device
Markus Armbruster [Tue, 9 Jun 2020 12:23:18 +0000 (14:23 +0200)]
sd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device

pxa2xx_mmci_init() creates a "pxa2xx-mmci" device, but neglects to
realize it.  Affects machines akita, borzoi, connex, mainstone, spitz,
terrier, tosa, verdex, and z2.

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect
to realize it.

This one appears to work.  Nevertheless, it's a clear misuse of the
interface.  Even when it works today (more or less by chance), it can
break tomorrow.

Fix by realizing it right away.  Visible in "info qom-tree"; here's
the change for akita:

     /machine (akita-machine)
       [...]
       /unattached (container)
         [...]
    +    /device[5] (pxa2xx-mmci)
    +      /pxa2xx-mmci[0] (qemu:memory-region)
    +      /sd-bus (pxa2xx-mmci-bus)
         [rest of device[*] renumbered...]

Fixes: 7a9468c92517e19037bfe2272f64f5dadaf9db15
Cc: Andrzej Zaborowski <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agodisplay/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge"
Markus Armbruster [Tue, 9 Jun 2020 12:23:17 +0000 (14:23 +0200)]
display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge"

xlnx_dp_init() creates these two devices, but they're never realized.
Affects machine xlnx-zcu102.

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect to
realize it.

These two appear to work.  Nevertheless, it's a clear misuse of the
interface.  Even when it works today (more or less by chance), it can
break tomorrow.

Fix by realizing them in xlnx_dp_realize().

Fixes: 58ac482a66de09a7590f705e53fc6a3fb8a055e8
Cc: KONRAD Frederic <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20200609122339[email protected]>

4 years agoarm/stm32f405: Fix realization of "stm32f2xx-adc" devices
Markus Armbruster [Tue, 9 Jun 2020 12:23:16 +0000 (14:23 +0200)]
arm/stm32f405: Fix realization of "stm32f2xx-adc" devices

stm32f405_soc_initfn() creates six such devices, but
stm32f405_soc_realize() realizes only one.  Affects machine
netduinoplus2.

In theory, a device becomes real only on realize.  In practice, the
transition from unreal to real is a fuzzy one.  The work to make a
device real can be spread between realize methods (fine),
instance_init methods (wrong), and board code wiring up the device
(fine as long as it effectively happens on realize).  Depending on
what exactly is done where, a device can work even when we neglect
to realize it.

The five unrealized devices appear to stay unreal: neither MMIO nor
IRQ get wired up.

Fix stm32f405_soc_realize() to realize and wire up all six.  Visible
in "info qtree":

     bus: main-system-bus
       type System
       dev: stm32f405-soc, id ""
         cpu-type = "cortex-m4-arm-cpu"
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio ffffffffffffffff/00000000000000ff
    +    mmio 0000000040012000/00000000000000ff
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio ffffffffffffffff/00000000000000ff
    +    mmio 0000000040012100/00000000000000ff
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio ffffffffffffffff/00000000000000ff
    +    mmio 0000000040012200/00000000000000ff
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio ffffffffffffffff/00000000000000ff
    +    mmio 0000000040012300/00000000000000ff
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio 0000000040012000/00000000000000ff
    +    mmio 0000000040012400/00000000000000ff
       dev: stm32f2xx-adc, id ""
         gpio-out "sysbus-irq" 1
    -    mmio ffffffffffffffff/00000000000000ff
    +    mmio 0000000040012500/00000000000000ff
       dev: armv7m, id ""

Fixes: 529fc5fd3e18ace8f739afd02dc0953354f39442
Cc: Alistair Francis <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200609122339[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
4 years agoqom: Make "info qom-tree" show children sorted
Markus Armbruster [Wed, 27 May 2020 08:47:54 +0000 (10:47 +0200)]
qom: Make "info qom-tree" show children sorted

"info qom-tree" prints children in unstable order.  This is a pain
when diffing output for different versions to find change.  Print it
sorted.

Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200527084754[email protected]>
Tested-by: Cédric Le Goater <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
4 years agoqom: Constify object_get_canonical_path{,_component}()'s parameter
Markus Armbruster [Wed, 27 May 2020 08:47:53 +0000 (10:47 +0200)]
qom: Constify object_get_canonical_path{,_component}()'s parameter

Suggested-by: Eric Blake <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <20200527084754[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
4 years agotranslations: Add Swedish language
Sebastian Rasmussen [Thu, 11 Jun 2020 11:45:23 +0000 (13:45 +0200)]
translations: Add Swedish language

This patch adds translation of QEMU to Swedish.

Signed-off-by: Sebastian Rasmussen <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Reviewed-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200611114523[email protected]>

4 years agoMAINTAINERS: Adjust sh4 maintainership
Aleksandar Markovic [Thu, 11 Jun 2020 09:53:16 +0000 (11:53 +0200)]
MAINTAINERS: Adjust sh4 maintainership

This patch transfers sh4 sections to Yoshinori Sato, who is
best positioned in the community to assume sh4 maintainership.
He is the maintainer of the related target rx as well, which
means that some synergy between the two targets can be expected
in future.

Further adjustments, reorganizations, and improvements of sh4
sections are left to the future maintainer to be devised and
executed, as he deems suitable.

Aurelien and Magnus are deleted as maintainers in some sections
of the MAINTAINERS file with this patch. However, they will not
be deleted from QEMU Hall of Fame, where their names will always
remained carved in stone as QEMU pioneers and granddaddies.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Aurelien Jarno <[email protected]>
Acked-by: Magnus Damm <[email protected]>
Acked-by: Yoshinori Sato <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Message-Id: <20200611095316[email protected]>

4 years agotarget/mips: msa: Split helpers for MULV.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:33 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for MULV.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for SUBV.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:32 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for SUBV.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:31 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:30 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for SUBS_U.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:29 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for SUBS_U.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for SUBS_S.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:28 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for SUBS_S.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DOTP_U.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:27 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DOTP_U.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DOTP_S.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:26 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DOTP_S.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DPSUB_U.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:25 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DPSUB_U.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DPSUB_S.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:24 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DPSUB_S.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DPADD_U.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:23 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DPADD_U.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for DPADD_S.<H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:22 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for DPADD_S.<H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for MSUBV.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:21 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for MSUBV.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: msa: Split helpers for MADDV.<B|H|W|D>
Aleksandar Markovic [Sat, 13 Jun 2020 15:21:20 +0000 (17:21 +0200)]
target/mips: msa: Split helpers for MADDV.<B|H|W|D>

Achieves clearer code and slightly better performance.

Reviewed-by: Aleksandar Rikalo <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200613152133[email protected]>

4 years agotarget/mips: Add comments for vendor-specific ASEs
Jiaxun Yang [Sun, 14 Jun 2020 08:00:47 +0000 (16:00 +0800)]
target/mips: Add comments for vendor-specific ASEs

Abbreviations of vendor-specific ASEs looks very similiar.
Add comments to explain the full name and vendors of these flags.

Signed-off-by: Jiaxun Yang <[email protected]>
Reviewed-by: Aleksandar Markovic <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200614080049[email protected]>

4 years agotarget/mips: Legalize Loongson insn flags
Jiaxun Yang [Sun, 14 Jun 2020 08:00:46 +0000 (16:00 +0800)]
target/mips: Legalize Loongson insn flags

To match the actual status of Loongson insn, we split flags
for LMMI and LEXT from INSN_LOONGSON2F.

As Loongson-2F only implemented interger part of LEXT, we'll
not enable LEXT for the processor, but instead we're still using
INSN_LOONGSON2F as switch flag of these instructions.

All multimedia instructions have been moved to LMMI flag. Loongson-2F
and Loongson-3A are sharing these instructions.

Signed-off-by: Jiaxun Yang <[email protected]>
Reviewed-by: Aleksandar Markovic <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Message-Id: <20200614080049[email protected]>

4 years agoconfigure: Let SLOF be initialized by ./scripts/git-submodule.sh
Philippe Mathieu-Daudé [Mon, 15 Jun 2020 07:49:19 +0000 (09:49 +0200)]
configure: Let SLOF be initialized by ./scripts/git-submodule.sh

The git-submodule.sh script is called by make and initialize the
submodules listed in the GIT_SUBMODULES variable generated by
./configure.

SLOF is required for building the s390-ccw firmware on s390x, since
it is using the libnet code from SLOF for network booting.

Add it to the GIT_SUBMODULES when building the s390-ccw firmware.

Reported-by: Mark Cave-Ayland <[email protected]>
Suggested-by: Thomas Huth <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200615074919[email protected]>
[thuth: Tweaked the commit message a little bit]
Signed-off-by: Thomas Huth <[email protected]>
4 years agotests/acceptance: Add boot tests for sh4 QEMU advent calendar image
Thomas Huth [Tue, 11 Feb 2020 08:59:41 +0000 (09:59 +0100)]
tests/acceptance: Add boot tests for sh4 QEMU advent calendar image

Now that we can select the second serial console in the acceptance tests
(see commit 746f244d9720 "Allow to use other serial consoles than default"),
we can also test the sh4 image from the QEMU advent calendar 2018.

Message-Id: <20200515164337[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agotests/qtest: Fix LGPL information in the file headers
Thomas Huth [Fri, 5 Jun 2020 10:02:42 +0000 (12:02 +0200)]
tests/qtest: Fix LGPL information in the file headers

It's either "GNU *Library* General Public License version 2" or "GNU
Lesser General Public License version *2.1*", but there was no "version
2.0" of the "Lesser" license. So assume that version 2.1 is meant here.

Message-Id: <20200605100645[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agofuzz: add oss-fuzz build-script
Alexander Bulekov [Fri, 12 Jun 2020 05:51:45 +0000 (01:51 -0400)]
fuzz: add oss-fuzz build-script

It is neater to keep this in the QEMU repo, since any change that
requires an update to the oss-fuzz build configuration, can make the
necessary changes in the same series.

Suggested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alexander Bulekov <[email protected]>
Reviewed-by: Darren Kenny <[email protected]>
Message-Id: <20200612055145[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agofuzz: Add support for logging QTest commands
Alexander Bulekov [Fri, 29 May 2020 22:14:50 +0000 (18:14 -0400)]
fuzz: Add support for logging QTest commands

Signed-off-by: Alexander Bulekov <[email protected]>
Message-Id: <20200529221450[email protected]>
Reviewed-by: Darren Kenny <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agofuzz: skip QTest serialization
Alexander Bulekov [Fri, 29 May 2020 22:14:49 +0000 (18:14 -0400)]
fuzz: skip QTest serialization

The QTest server usually parses ASCII commands from clients. Since we
fuzz within the QEMU process, skip the QTest serialization and server
for most QTest commands. Leave the option to use the ASCII protocol, to
generate readable traces for crash reproducers.

Inspired-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alexander Bulekov <[email protected]>
Message-Id: <20200529221450[email protected]>
Reviewed-by: Darren Kenny <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agobios-tables-test: Fix "-tpmdev: invalid option"
Eric Auger [Mon, 15 Jun 2020 13:50:51 +0000 (15:50 +0200)]
bios-tables-test: Fix "-tpmdev: invalid option"

When configure is run with "--disable-tpm", the bios-tables-test
q35/tis test fails with "-tpmdev: invalid option".

Skip the test if CONFIG_TPM is unset.

Signed-off-by: Eric Auger <[email protected]>
Reported-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200615135051[email protected]>
Tested-by: Stefan Berger <[email protected]>
Fixes: 5da7c35e25 ("bios-tables-test: Add Q35/TPM-TIS test")
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
4 years agoMerge remote-tracking branch 'remotes/berrange/tags/qcrypto-next-pull-request' into...
Peter Maydell [Mon, 15 Jun 2020 15:36:34 +0000 (16:36 +0100)]
Merge remote-tracking branch 'remotes/berrange/tags/qcrypto-next-pull-request' into staging

Misc crypto subsystem fixes

* Improve error message for large files when creating LUKS volumes
* Expand crypto hash benchmark coverage
* Misc code refactoring with no functional change

# gpg: Signature made Mon 15 Jun 2020 11:35:17 BST
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <[email protected]>" [full]
# gpg:                 aka "Daniel P. Berrange <[email protected]>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/qcrypto-next-pull-request:
  crypto: Remove use of GCRYPT_VERSION macro.
  test-crypto-secret: add 'secret_keyring' object tests.
  crypto/linux_keyring: add 'secret_keyring' secret object.
  crypto/secret: move main logic from 'secret' to 'secret_common'.
  crypto: add "none" random provider

Signed-off-by: Peter Maydell <[email protected]>
4 years agocrypto: Remove use of GCRYPT_VERSION macro.
Richard W.M. Jones [Wed, 27 May 2020 09:34:09 +0000 (10:34 +0100)]
crypto: Remove use of GCRYPT_VERSION macro.

According to the gcrypt documentation it's intended that
gcry_check_version() is called with the minimum version of gcrypt
needed by the program, not the version from the <gcrypt.h> header file
that happened to be installed when qemu was compiled.  Indeed the
gcrypt.h header says that you shouldn't use the GCRYPT_VERSION macro.

This causes the following failure:

  qemu-img: Unable to initialize gcrypt

if a slightly older version of libgcrypt is installed with a newer
qemu, even though the slightly older version works fine.  This can
happen with RPM packaging which uses symbol versioning to determine
automatically which libgcrypt is required by qemu, which caused the
following bug in RHEL 8:

  https://bugzilla.redhat.com/show_bug.cgi?id=1840485

qemu actually requires libgcrypt >= 1.5.0, so we might put the string
"1.5.0" here.  However since 1.5.0 was released in 2011, it hardly
seems we need to check that.  So I replaced GCRYPT_VERSION with NULL.
Perhaps in future if we move to requiring a newer version of gcrypt we
could put a literal string here.

Signed-off-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
4 years agotest-crypto-secret: add 'secret_keyring' object tests.
Alexey Krasikov [Mon, 25 May 2020 11:19:13 +0000 (14:19 +0300)]
test-crypto-secret: add 'secret_keyring' object tests.

Add tests:
  test_secret_keyring_good;
  test_secret_keyring_revoked_key;
  test_secret_keyring_expired_key;
  test_secret_keyring_bad_serial_key;
  test_secret_keyring_bad_key_access_right;

Added tests require libkeyutils. The absence of this library is not
critical, because these tests will be skipped in this case.

Signed-off-by: Alexey Krasikov <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
4 years agocrypto/linux_keyring: add 'secret_keyring' secret object.
Alexey Krasikov [Mon, 25 May 2020 11:19:12 +0000 (14:19 +0300)]
crypto/linux_keyring: add 'secret_keyring' secret object.

Add the ability for the secret object to obtain secret data from the
Linux in-kernel key managment and retention facility, as an extra option
to the existing ones: reading from a file or passing directly as a
string.

The secret is identified by the key serial number. The upper layers
need to instantiate the key and make sure the QEMU process has access
permissions to read it.

Signed-off-by: Alexey Krasikov <[email protected]>
 - Fixed up detection logic default behaviour in configure

Signed-off-by: Daniel P. Berrangé <[email protected]>
4 years agocrypto/secret: move main logic from 'secret' to 'secret_common'.
Alexey Krasikov [Mon, 25 May 2020 11:16:53 +0000 (14:16 +0300)]
crypto/secret: move main logic from 'secret' to 'secret_common'.

Create base class 'common secret'. Move common data and logic from
'secret' to 'common_secret' class. This allowed adding abstraction layer
for easier adding new 'secret' objects in future.
Convert 'secret' class to child from basic 'secret_common' with 'data'
and 'file' properties.

Signed-off-by: Alexey Krasikov <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
4 years agocrypto: add "none" random provider
Marek Marczykowski-Górecki [Wed, 20 May 2020 13:20:23 +0000 (15:20 +0200)]
crypto: add "none" random provider

In case of not using random-number needing feature, it makes sense to
skip RNG init too. This is especially helpful when QEMU is sandboxed in
Stubdomain under Xen, where there is very little entropy so initial
getrandom() call delays the startup several seconds. In that setup, no
random bytes are needed at all.

Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
4 years agoMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
Peter Maydell [Fri, 12 Jun 2020 22:06:22 +0000 (23:06 +0100)]
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* Miscellaneous fixes and feature enablement (many)
* SEV refactoring (David)
* Hyper-V initial support (Jon)
* i386 TCG fixes (x87 and SSE, Joseph)
* vmport cleanup and improvements (Philippe, Liran)
* Use-after-free with vCPU hot-unplug (Nengyuan)
* run-coverity-scan improvements (myself)
* Record/replay fixes (Pavel)
* -machine kernel_irqchip=split improvements for INTx (Peter)
* Code cleanups (Philippe)
* Crash and security fixes (PJP)
* HVF cleanups (Roman)

# gpg: Signature made Fri 12 Jun 2020 16:57:04 BST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Paolo Bonzini <[email protected]>" [full]
# gpg:                 aka "Paolo Bonzini <[email protected]>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (116 commits)
  target/i386: Remove obsolete TODO file
  stubs: move Xen stubs to accel/
  replay: fix replay shutdown for console mode
  exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h'
  hw/usb: Move device-specific declarations to new 'hcd-musb.h' header
  exec/memory: Remove unused MemoryRegionMmio type
  checkpatch: reversed logic with acpi test checks
  target/i386: sev: Unify SEVState and SevGuestState
  target/i386: sev: Remove redundant handle field
  target/i386: sev: Remove redundant policy field
  target/i386: sev: Remove redundant cbitpos and reduced_phys_bits fields
  target/i386: sev: Partial cleanup to sev_state global
  target/i386: sev: Embed SEVState in SevGuestState
  target/i386: sev: Rename QSevGuestInfo
  target/i386: sev: Move local structure definitions into .c file
  target/i386: sev: Remove unused QSevGuestInfoClass
  xen: fix build without pci passthrough
  i386: hvf: Drop HVFX86EmulatorState
  i386: hvf: Move mmio_buf into CPUX86State
  i386: hvf: Move lazy_flags into CPUX86State
  ...

Signed-off-by: Peter Maydell <[email protected]>
# Conflicts:
# hw/i386/acpi-build.c

4 years agotarget/i386: Remove obsolete TODO file
Thomas Huth [Thu, 11 Jun 2020 17:24:45 +0000 (19:24 +0200)]
target/i386: Remove obsolete TODO file

The last real change to this file is from 2012, so it is very likely
that this file is completely out-of-date and ignored today. Let's
simply remove it to avoid confusion if someone finds it by accident.

Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <20200611172445[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
4 years agostubs: move Xen stubs to accel/
Paolo Bonzini [Wed, 10 Jun 2020 16:14:21 +0000 (12:14 -0400)]
stubs: move Xen stubs to accel/

Keep them close to the other accelerator-dependent stubs, so as to remove
stubs that are not needed by tools.

Signed-off-by: Paolo Bonzini <[email protected]>
4 years agoreplay: fix replay shutdown for console mode
Pavel Dovgalyuk [Fri, 22 May 2020 06:45:54 +0000 (09:45 +0300)]
replay: fix replay shutdown for console mode

When QEMU is used without any graphical window,
QEMU execution is terminated with the signal (e.g., Ctrl-C).
Signal processing in QEMU does not include
qemu_system_shutdown_request call. That is why shutdown
event is not recorded by record/replay in this case.
This patch adds shutdown event to the end of the record log.
Now every replay will shutdown the machine at the end.

Signed-off-by: Pavel Dovgalyuk <[email protected]>
Message-Id: <159012995470.27967.18129611453659045726.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <[email protected]>
4 years agoexec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h'
Philippe Mathieu-Daudé [Mon, 1 Jun 2020 14:15:36 +0000 (16:15 +0200)]
exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h'

The CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs are legacy
remnant from before the conversion to MemoryRegions.
Since they are now only used in tusb6010.c and hcd-musb.c,
move them to "hw/usb/musb.h" and rename them appropriately.

Suggested-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20200601141536[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
4 years agohw/usb: Move device-specific declarations to new 'hcd-musb.h' header
Philippe Mathieu-Daudé [Mon, 1 Jun 2020 14:15:35 +0000 (16:15 +0200)]
hw/usb: Move device-specific declarations to new 'hcd-musb.h' header

Move the declarations for the MUSB-HDRC USB2.0 OTG compliant core
into a separate header.

Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20200601141536[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
4 years agoexec/memory: Remove unused MemoryRegionMmio type
Philippe Mathieu-Daudé [Mon, 1 Jun 2020 14:15:34 +0000 (16:15 +0200)]
exec/memory: Remove unused MemoryRegionMmio type

Since commit 62a0db942dec ('memory: Remove old_mmio accessors')
this structure is unused. Remove it.

Suggested-by: Peter Maydell <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20200601141536[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
4 years agocheckpatch: reversed logic with acpi test checks
Michael S. Tsirkin [Tue, 2 Jun 2020 05:36:17 +0000 (01:36 -0400)]
checkpatch: reversed logic with acpi test checks

Logic reversed: allowed list should just be ignored. Instead we
only take that into account :(

Fixes: e11b06a880ca ("checkpatch: ignore allowed diff list")
Signed-off-by: Michael S. Tsirkin <[email protected]>
Message-Id: <20200602053614[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Tested-by: Eric Auger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
This page took 0.12296 seconds and 4 git commands to generate.