qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f13a94: hw/acpi: Consolidate build_mcfg to pc


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] f13a94: hw/acpi: Consolidate build_mcfg to pci.c
Date: Thu, 06 Jun 2019 06:08:36 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f13a944ca6d50efa1dc4cca3a31262b677a2a715
      
https://github.com/qemu/qemu/commit/f13a944ca6d50efa1dc4cca3a31262b677a2a715
  Author: Wei Yang <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M default-configs/i386-softmmu.mak
    M hw/acpi/Kconfig
    M hw/acpi/Makefile.objs
    A hw/acpi/pci.c
    M hw/arm/Kconfig
    M hw/arm/virt-acpi-build.c
    M hw/i386/acpi-build.c
    M include/hw/acpi/pci.h

  Log Message:
  -----------
  hw/acpi: Consolidate build_mcfg to pci.c

Now we have two identical build_mcfg functions.

Consolidate them in acpi/pci.c.

Signed-off-by: Wei Yang <address@hidden>

v4:
  * ACPI_PCI depends on both ACPI and PCI
  * rebase on latest master, adjust arm Kconfig
v3:
  * adjust changelog based on Igor's suggestion
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: e4610781635404d494120c19bade8dad6f00f0b3
      
https://github.com/qemu/qemu/commit/e4610781635404d494120c19bade8dad6f00f0b3
  Author: Wei Yang <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/acpi/pci.c
    M include/hw/acpi/acpi-defs.h

  Log Message:
  -----------
  acpi: pci: use build_append_foo() API to construct MCFG

build_append_foo() API doesn't need explicit endianness conversions
which eliminates a source of errors and it makes build_mcfg() look like
declarative definition of MCFG table in ACPI spec, which makes it easy
to review.

Signed-off-by: Wei Yang <address@hidden>
Suggested-by: Igor Mammedov <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>

v3:
   * add some comment on the Configuration Space base address allocation
     structure
v2:
   * miss the reserved[8] of MCFG in last version, add it back
   * drop SOBs and make sure bios-tables-test all OK
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2f57db8a2781787a0a31d3a9ce4a286fc45a42b3
      
https://github.com/qemu/qemu/commit/2f57db8a2781787a0a31d3a9ce4a286fc45a42b3
  Author: David Gibson <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/pci/pci.c
    M hw/pci/pci_host.c
    M hw/ppc/spapr_pci.c
    M include/hw/pci/pci.h
    M include/hw/pci/pci_bus.h

  Log Message:
  -----------
  pcie: Simplify pci_adjust_config_limit()

Since c2077e2c "pci: Adjust PCI config limit based on bus topology",
pci_adjust_config_limit() has been used in the config space read and write
paths to only permit access to extended config space on buses which permit
it.  Specifically it prevents access on devices below a vanilla-PCI bus via
some combination of bridges, even if both the host bridge and the device
itself are PCI-E.

It accomplishes this with a somewhat complex call up the chain of bridges
to see if any of them prohibit extended config space access.  This is
overly complex, since we can always know if the bus will support such
access at the point it is constructed.

This patch simplifies the test by using a flag in the PCIBus instance
indicating whether extended configuration space is accessible.  It is
false for vanilla PCI buses.  For PCI-E buses, it is true for root
buses and equal to the parent bus's's capability otherwise.

For the special case of sPAPR's paravirtualized PCI root bus, which
acts mostly like vanilla PCI, but does allow extended config space
access, we override the default value of the flag from the host bridge
code.

This should cause no behavioural change.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 91f4c995f26795dbb6d1b09392a6448e389ed029
      
https://github.com/qemu/qemu/commit/91f4c995f26795dbb6d1b09392a6448e389ed029
  Author: David Gibson <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/pci-bridge/dec.c
    M hw/pci-bridge/i82801b11.c
    M hw/pci-bridge/pci_bridge_dev.c
    M hw/pci-bridge/pcie_pci_bridge.c
    M hw/pci-bridge/pcie_root_port.c
    M hw/pci-bridge/simba.c
    M hw/pci-bridge/xio3130_downstream.c
    M hw/pci-bridge/xio3130_upstream.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Make is_bridge a bool

The is_bridge field in PCIDevice acts as a bool, but is declared as an int.
Declare it as a bool for clarity, and change everything that writes it to
use true/false instead of 0/1 to match.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2ad778b8c2175cb16f731d1e789e151a691172ce
      
https://github.com/qemu/qemu/commit/2ad778b8c2175cb16f731d1e789e151a691172ce
  Author: David Gibson <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: Fold pci_get_bus_devfn() into its sole caller

The only remaining caller of pci_get_bus_devfn() is pci_nic_init_nofail(),
itself an old compatibility function.  Fold the two together to avoid
re-using the stale interface.

While we're there replace the explicit fprintf()s with error_report().

Signed-off-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 3fdbd1d70159157f6223f545cd462580254b7e5c
      
https://github.com/qemu/qemu/commit/3fdbd1d70159157f6223f545cd462580254b7e5c
  Author: Igor Mammedov <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M qemu-options.hx

  Log Message:
  -----------
  docs: smbios: remove family=x from type2 entry description

'family' option is not part of type 2 table and if user tries to use it
as such QEMU will error out with an unknow option error.
Drop it from docs lest it confuse users.

Fixes: b155eb1d04 ("smbios: document cmdline options for smbios type 2-4, 17 
structures")
Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c39eb88da17616f8cdb3260c3b701609dc5c790c
      
https://github.com/qemu/qemu/commit/c39eb88da17616f8cdb3260c3b701609dc5c790c
  Author: Jie Wang <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: remove the dead code

remove the dead code

Signed-off-by: Jie Wang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 31618958cc48d8c51e7e256285b467c1c56af3b9
      
https://github.com/qemu/qemu/commit/31618958cc48d8c51e7e256285b467c1c56af3b9
  Author: Jie Wang <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix incorrect print type

fix incorrect print type in vhost_virtqueue_stop

Signed-off-by: Jie Wang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: 386cff49ebd1748b0319c88e5282236f9e56b81b
      
https://github.com/qemu/qemu/commit/386cff49ebd1748b0319c88e5282236f9e56b81b
  Author: Jie Wang <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    M hw/scsi/vhost-user-scsi.c

  Log Message:
  -----------
  vhost: fix memory leak in vhost_user_scsi_realize

fix memory leak in vhost_user_scsi_realize

Signed-off-by: Jie Wang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: ab50f22309a17c772c51931940596e707c200739
      
https://github.com/qemu/qemu/commit/ab50f22309a17c772c51931940596e707c200739
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2019-05-29 (Wed, 29 May 2019)

  Changed paths:
    A tests/bios-tables-test-allowed-diff.h
    M tests/bios-tables-test.c

  Log Message:
  -----------
  bios-tables-test: add diff allowed list

Expected table change is then handled like this:
1. add table to diff allowed list
2. change generating code (can be combined with 1)
3. maintainer runs a script to update expected +
   blows away allowed diff list

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c6d369fd78c654fa618e382b39da850393b8a0da
      
https://github.com/qemu/qemu/commit/c6d369fd78c654fa618e382b39da850393b8a0da
  Author: Nir Weiner <address@hidden>
  Date:   2019-06-02 (Sun, 02 Jun 2019)

  Changed paths:
    M hw/scsi/vhost-scsi.c

  Log Message:
  -----------
  vhost-scsi: The vhost backend should be stopped when the VM is not running

vhost-scsi doesn’t takes into account whether the VM is running or not in
order to decide if it should start/stop vhost backend.
This would lead to vhost backend still being active when VM's RunState
suddenly change to stopped.

An example of when this issue is encountered is when Live-Migration Pre-Copy
phase completes. As in this case, VM state will be changed to stopped (while
vhost backend is still active), which will result in
virtio_vmstate_change() -> virtio_set_status() -> vhost_scsi_set_status()
executed but vhost_scsi_set_status() will just return without stopping
vhost backend.

To handle this, change code to consider that vhost processing should be
stopped when VM is not running. Similar to how it is done in vhost-vsock
device at vhost_vsock_set_status().

Fixes: 5e9be92d7752 ("vhost-scsi: new device supporting the tcm_vhost Linux 
kernel module”)
Reviewed-by: Bijan Mottahedeh <address@hidden>
Reviewed-by: Liran Alon <address@hidden>
Signed-off-by: Nir Weiner <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 4ea57425584798ccde1da6343cbfbb22497f2e4e
      
https://github.com/qemu/qemu/commit/4ea57425584798ccde1da6343cbfbb22497f2e4e
  Author: Nir Weiner <address@hidden>
  Date:   2019-06-02 (Sun, 02 Jun 2019)

  Changed paths:
    M hw/scsi/vhost-scsi.c

  Log Message:
  -----------
  vhost-scsi: Add VMState descriptor

As preparation of enabling migration of vhost-scsi device,
define it’s VMState. Note, we keep the convention of
verifying in the pre_save() method that the vhost backend
must be stopped before attempting to save the device
state. Similar to how it is done for vhost-vsock.

Reviewed-by: Bijan Mottahedeh <address@hidden>
Reviewed-by: Liran Alon <address@hidden>
Signed-off-by: Nir Weiner <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: b3e89c941a85f8ed74def2e817859fef5269659a
      
https://github.com/qemu/qemu/commit/b3e89c941a85f8ed74def2e817859fef5269659a
  Author: Liran Alon <address@hidden>
  Date:   2019-06-02 (Sun, 02 Jun 2019)

  Changed paths:
    M hw/scsi/vhost-scsi.c
    M include/hw/virtio/vhost-scsi-common.h

  Log Message:
  -----------
  vhost-scsi: Allow user to enable migration

In order to perform a valid migration of a vhost-scsi device,
the following requirements must be met:
(1) The virtio-scsi device state needs to be saved & loaded.
(2) The vhost backend must be stopped before virtio-scsi device state
is saved:
  (2.1) Sync vhost backend state to virtio-scsi device state.
  (2.2) No further I/O requests are made by vhost backend to target
        SCSI device.
  (2.3) No further guest memory access takes place after VM is stopped.
(3) Requests in-flight to target SCSI device are completed before
    migration handover.
(4) Target SCSI device state needs to be saved & loaded into the
    destination host target SCSI device.

Previous commit ("vhost-scsi: Add VMState descriptor")
add support to save & load the device state using VMState.
This meets requirement (1).

When VM is stopped by migration thread (On Pre-Copy complete), the
following code path is executed:
migration_completion() -> vm_stop_force_state() -> vm_stop() ->
do_vm_stop().

do_vm_stop() calls first pause_all_vcpus() which pause all guest
vCPUs and then call vm_state_notify().
In case of vhost-scsi device, this will lead to the following code path
to be executed:
vm_state_notify() -> virtio_vmstate_change() ->
virtio_set_status() -> vhost_scsi_set_status() -> vhost_scsi_stop().
vhost_scsi_stop() then calls vhost_scsi_clear_endpoint() and
vhost_scsi_common_stop().

vhost_scsi_clear_endpoint() sends VHOST_SCSI_CLEAR_ENDPOINT ioctl to
vhost backend which will reach kernel's vhost_scsi_clear_endpoint()
which process all pending I/O requests and wait for them to complete
(vhost_scsi_flush()). This meets requirement (3).

vhost_scsi_common_stop() will stop the vhost backend.
As part of this stop, dirty-bitmap is synced and vhost backend state is
synced with virtio-scsi device state. As at this point guest vCPUs are
already paused, this meets requirement (2).

At this point we are left with requirement (4) which is target SCSI
device specific and therefore cannot be done by QEMU. Which is the main
reason why vhost-scsi adds a migration blocker.
However, as this can be handled either by an external orchestrator or
by using shared-storage (i.e. iSCSI), there is no reason to limit the
orchestrator from being able to explictly specify it wish to enable
migration even when VM have a vhost-scsi device.

Considering all the above, this commit allows orchestrator to explictly
specify that it is responsbile for taking care of requirement (4) and
therefore vhost-scsi should not add a migration blocker.

Reviewed-by: Nir Weiner <address@hidden>
Reviewed-by: Bijan Mottahedeh <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: df7cafdeb68b6572fa81d2be9a1910547c4dfafc
      
https://github.com/qemu/qemu/commit/df7cafdeb68b6572fa81d2be9a1910547c4dfafc
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2019-06-03 (Mon, 03 Jun 2019)

  Changed paths:
    M tests/bios-tables-test.c

  Log Message:
  -----------
  bios-tables-test: list all tables that differ

Fail after comparing all tables: this way
user gets the full list of tables that need
to be updated or whitelisted.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 200dbf3789486554cda5f34fffb0bb7218ea6b49
      
https://github.com/qemu/qemu/commit/200dbf3789486554cda5f34fffb0bb7218ea6b49
  Author: Igor Mammedov <address@hidden>
  Date:   2019-06-03 (Mon, 03 Jun 2019)

  Changed paths:
    A tests/data/acpi/virt/APIC
    A tests/data/acpi/virt/DSDT
    A tests/data/acpi/virt/FACP
    A tests/data/acpi/virt/GTDT
    A tests/data/acpi/virt/MCFG
    A tests/data/acpi/virt/SPCR

  Log Message:
  -----------
  tests: add expected ACPI tables for arm/virt board

Signed-off-by: Igor Mammedov <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: ab6b6a7777449905a70f7e80790719779e7f3313
      
https://github.com/qemu/qemu/commit/ab6b6a7777449905a70f7e80790719779e7f3313
  Author: Igor Mammedov <address@hidden>
  Date:   2019-06-03 (Mon, 03 Jun 2019)

  Changed paths:
    M tests/Makefile.include
    M tests/bios-tables-test.c
    M tests/data/acpi/rebuild-expected-aml.sh

  Log Message:
  -----------
  tests: acpi: add simple arm/virt testcase

adds simple arm/virt test case that starts guest with
bios-tables-test.aarch64.iso.qcow2 boot image which
initializes UefiTestSupport* structure in RAM once
guest is booted.

 * see commit: tests: acpi: add acpi_find_rsdp_address_uefi() helper

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 7f36f0930ffec11a551844c0452dbce33f80a525
      
https://github.com/qemu/qemu/commit/7f36f0930ffec11a551844c0452dbce33f80a525
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2019-06-05 (Wed, 05 Jun 2019)

  Changed paths:
    M tests/bios-tables-test.c

  Log Message:
  -----------
  bios-tables-test: ignore identical binaries

when binary of the tables is identical, there is no need to run iasl
to check that they are functionally equivalent.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 347a6f44e90bf0ffff1e23b8fb919c780abb80b8
      
https://github.com/qemu/qemu/commit/347a6f44e90bf0ffff1e23b8fb919c780abb80b8
  Author: Peter Maydell <address@hidden>
  Date:   2019-06-06 (Thu, 06 Jun 2019)

  Changed paths:
    M default-configs/i386-softmmu.mak
    M hw/acpi/Kconfig
    M hw/acpi/Makefile.objs
    A hw/acpi/pci.c
    M hw/arm/Kconfig
    M hw/arm/virt-acpi-build.c
    M hw/i386/acpi-build.c
    M hw/pci-bridge/dec.c
    M hw/pci-bridge/i82801b11.c
    M hw/pci-bridge/pci_bridge_dev.c
    M hw/pci-bridge/pcie_pci_bridge.c
    M hw/pci-bridge/pcie_root_port.c
    M hw/pci-bridge/simba.c
    M hw/pci-bridge/xio3130_downstream.c
    M hw/pci-bridge/xio3130_upstream.c
    M hw/pci/pci.c
    M hw/pci/pci_host.c
    M hw/ppc/spapr_pci.c
    M hw/scsi/vhost-scsi.c
    M hw/scsi/vhost-user-scsi.c
    M hw/virtio/vhost.c
    M include/hw/acpi/acpi-defs.h
    M include/hw/acpi/pci.h
    M include/hw/pci/pci.h
    M include/hw/pci/pci_bus.h
    M include/hw/virtio/vhost-scsi-common.h
    M qemu-options.hx
    M tests/Makefile.include
    A tests/bios-tables-test-allowed-diff.h
    M tests/bios-tables-test.c
    M tests/data/acpi/rebuild-expected-aml.sh
    A tests/data/acpi/virt/APIC
    A tests/data/acpi/virt/DSDT
    A tests/data/acpi/virt/FACP
    A tests/data/acpi/virt/GTDT
    A tests/data/acpi/virt/MCFG
    A tests/data/acpi/virt/SPCR

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio, pci, pc: cleanups, features

stricter rules for acpi tables: we now fail
on any difference that isn't whitelisted.

vhost-scsi migration.

some cleanups all over the place

Signed-off-by: Michael S. Tsirkin <address@hidden>

# gpg: Signature made Wed 05 Jun 2019 20:55:04 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>" [full]
# gpg:                 aka "Michael S. Tsirkin <address@hidden>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  bios-tables-test: ignore identical binaries
  tests: acpi: add simple arm/virt testcase
  tests: add expected ACPI tables for arm/virt board
  bios-tables-test: list all tables that differ
  vhost-scsi: Allow user to enable migration
  vhost-scsi: Add VMState descriptor
  vhost-scsi: The vhost backend should be stopped when the VM is not running
  bios-tables-test: add diff allowed list
  vhost: fix memory leak in vhost_user_scsi_realize
  vhost: fix incorrect print type
  vhost: remove the dead code
  docs: smbios: remove family=x from type2 entry description
  pci: Fold pci_get_bus_devfn() into its sole caller
  pci: Make is_bridge a bool
  pcie: Simplify pci_adjust_config_limit()
  acpi: pci: use build_append_foo() API to construct MCFG
  hw/acpi: Consolidate build_mcfg to pci.c

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/7ad5f33b7d61...347a6f44e90b



reply via email to

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