qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 104a7f: xen: Fix xen-legacy-backend qdev type


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 104a7f: xen: Fix xen-legacy-backend qdev types
Date: Sat, 11 Jul 2020 07:15:26 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 104a7f4e1355493175b0ad6f49c524ee449c16f7
      
https://github.com/qemu/qemu/commit/104a7f4e1355493175b0ad6f49c524ee449c16f7
  Author: Jason Andryuk <jandryuk@gmail.com>
  Date:   2020-07-10 (Fri, 10 Jul 2020)

  Changed paths:
    M hw/xen/xen-legacy-backend.c

  Log Message:
  -----------
  xen: Fix xen-legacy-backend qdev types

xen-sysdev is a TYPE_SYS_BUS_DEVICE.  bus_type should not be changed so
that it can plug into the System bus.  Otherwise this assert triggers:
qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion
`dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)'
failed.

TYPE_XENBACKEND attaches to TYPE_XENSYSBUS, so its class_init needs to
be set accordingly to attach the qdev.  Otherwise the following assert
triggers:
qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion
`dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)'
failed.

TYPE_XENBACKEND is not a subclass of XEN_XENSYSDEV, so it's parent
is just TYPE_DEVICE.  Change that.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Paul Durrant <pdurrant@amazon.com>
Fixes: 81cb05732efb ("qdev: Assert devices are plugged into a bus that can take 
them")
Message-Id: <20200624121939.10282-1-jandryuk@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>


  Commit: dd29b5c30cd2a13f8c12376a8de84cb090c338bf
      
https://github.com/qemu/qemu/commit/dd29b5c30cd2a13f8c12376a8de84cb090c338bf
  Author: Paul Durrant <pdurrant@amazon.com>
  Date:   2020-07-10 (Fri, 10 Jul 2020)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/i386/pc_sysfw.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  xen: cleanup unrealized flash devices

The generic pc_machine_initfn() calls pc_system_flash_create() which creates
'system.flash0' and 'system.flash1' devices. These devices are then realized
by pc_system_flash_map() which is called from pc_system_firmware_init() which
itself is called via pc_memory_init(). The latter however is not called when
xen_enable() is true and hence the following assertion fails:

qemu-system-i386: hw/core/qdev.c:439: qdev_assert_realized_properly:
Assertion `dev->realized' failed

These flash devices are unneeded when using Xen so this patch avoids the
assertion by simply removing them using pc_system_flash_cleanup_unused().

Reported-by: Jason Andryuk <jandryuk@gmail.com>
Fixes: ebc29e1beab0 ("pc: Support firmware configuration with -blockdev")
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200624121841.17971-3-paul@xen.org>
Fixes: dfe8c79c4468 ("qdev: Assert onboard devices all get realized properly")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>


  Commit: 827937158b72ce2265841ff528bba3c44a1bfbc8
      
https://github.com/qemu/qemu/commit/827937158b72ce2265841ff528bba3c44a1bfbc8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-07-11 (Sat, 11 Jul 2020)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/i386/pc_sysfw.c
    M hw/xen/xen-legacy-backend.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200710' into 
staging

xen patches

Fixes following harden checks in qdev.

# gpg: Signature made Fri 10 Jul 2020 14:05:46 BST
# gpg:                using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF
# gpg:                issuer "anthony.perard@citrix.com"
# gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" 
[marginal]
# gpg:                 aka "Anthony PERARD <anthony.perard@citrix.com>" 
[marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 5379 2F71 024C 600F 778A  7161 D8D5 7199 DF83 42C8
#      Subkey fingerprint: F80C 0063 08E2 2CFD 8A92  E798 0CF5 572F D7FB 55AF

* remotes/aperard/tags/pull-xen-20200710:
  xen: cleanup unrealized flash devices
  xen: Fix xen-legacy-backend qdev types

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/0fb7ea45157d...827937158b72



reply via email to

[Prev in Thread] Current Thread [Next in Thread]