qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 489886: linker-loader: Add new 'write pointer


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 489886: linker-loader: Add new 'write pointer' command
Date: Fri, 03 Mar 2017 04:45:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 489886d1181c4317bbadb49f008d387f6e1536dc
      
https://github.com/qemu/qemu/commit/489886d1181c4317bbadb49f008d387f6e1536dc
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/acpi/bios-linker-loader.c
    M include/hw/acpi/bios-linker-loader.h

  Log Message:
  -----------
  linker-loader: Add new 'write pointer' command

This is similar to the existing 'add pointer' functionality, but instead
of instructing the guest (BIOS or UEFI) to patch memory, it instructs
the guest to write the pointer back to QEMU via a writeable fw_cfg file.

Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 20f5d14dc9e88339f5a5b59fb8696562022e4462
      
https://github.com/qemu/qemu/commit/20f5d14dc9e88339f5a5b59fb8696562022e4462
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    A docs/specs/vmgenid.txt

  Log Message:
  -----------
  docs: VM Generation ID device description

This patch is based off an earlier version by
Gal Hammer (address@hidden)

Requirements section, ASCII diagrams and overall help
provided by Laszlo Ersek (address@hidden)

Signed-off-by: Gal Hammer <address@hidden>
Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c7809e6cd76dec99baf82100ff2041833df5146f
      
https://github.com/qemu/qemu/commit/c7809e6cd76dec99baf82100ff2041833df5146f
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/acpi/aml-build.c
    M include/hw/acpi/aml-build.h

  Log Message:
  -----------
  ACPI: Add vmgenid blob storage to the build tables

This allows them to be centrally initialized and destroyed

The "AcpiBuildTables.vmgenid" array will be used to construct the
"etc/vmgenid_guid" fw_cfg blob.

Its contents will be linked into fw_cfg after being built on the
pc_machine_done() -> acpi_setup() -> acpi_build() call path, and dropped
without use on the subsequent, guest triggered, acpi_build_update() ->
acpi_build() call path.

Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d03637bcfbc1ba0cf1f07568d379af6e80120474
      
https://github.com/qemu/qemu/commit/d03637bcfbc1ba0cf1f07568d379af6e80120474
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M default-configs/i386-softmmu.mak
    M default-configs/x86_64-softmmu.mak
    M hw/acpi/Makefile.objs
    A hw/acpi/vmgenid.c
    M hw/i386/acpi-build.c
    M include/hw/acpi/acpi_dev_interface.h
    A include/hw/acpi/vmgenid.h

  Log Message:
  -----------
  ACPI: Add Virtual Machine Generation ID support

This implements the VM Generation ID feature by passing a 128-bit
GUID to the guest via a fw_cfg blob.
Any time the GUID changes, an ACPI notify event is sent to the guest

The user interface is a simple device with one parameter:
 - guid (string, must be "auto" or in UUID format
   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 39164c136cbab57385e15297423fe85ef386c76f
      
https://github.com/qemu/qemu/commit/39164c136cbab57385e15297423fe85ef386c76f
  Author: Igor Mammedov <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hmp-commands-info.hx
    M hmp.c
    M hmp.h
    M hw/acpi/vmgenid.c
    M qapi-schema.json
    M stubs/Makefile.objs
    A stubs/vmgenid.c

  Log Message:
  -----------
  qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands

Add commands to query Virtual Machine Generation ID counter.

QMP command example:
    { "execute": "query-vm-generation-id" }

HMP command example:
    info vm-generation-id

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 3248f1b4e077798133a38f79316f2ba447f2a9f1
      
https://github.com/qemu/qemu/commit/3248f1b4e077798133a38f79316f2ba447f2a9f1
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M MAINTAINERS
    M tests/Makefile.include
    A tests/acpi-utils.c
    A tests/acpi-utils.h
    M tests/bios-tables-test.c

  Log Message:
  -----------
  tests: Move reusable ACPI code into a utility file

Also usable by upcoming VM Generation ID tests

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


  Commit: 42697d88de6bdf44c6eb51d1ee508abf0a59bccb
      
https://github.com/qemu/qemu/commit/42697d88de6bdf44c6eb51d1ee508abf0a59bccb
  Author: Ben Warren <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add VM Generation ID entries

Signed-off-by: Ben Warren <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>


  Commit: dd3dd4ba7b949662d2c67a4c041549b3d79c4b0e
      
https://github.com/qemu/qemu/commit/dd3dd4ba7b949662d2c67a4c041549b3d79c4b0e
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: check for vring setup in virtio_queue_empty

If the vring has not been set up, there is nothing in the virtqueue.
virtio_queue_host_notifier_aio_poll calls virtio_queue_empty even in
this case; we have to filter it out just like virtio_queue_notify_aio_vq.

Reported-by: Gerd Hoffmann <address@hidden>
Tested-by: Alex Williamson <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Tested-by: Cornelia Huck <address@hidden>


  Commit: 34c6bf22a8d9b60c513df151aa0a791ef53bf81d
      
https://github.com/qemu/qemu/commit/34c6bf22a8d9b60c513df151aa0a791ef53bf81d
  Author: Cornelia Huck <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: guard vring access when setting notification

Switching to vring caches exposed an existing bug in
virtio_queue_set_notification(): We can't access vring structures
if they have not been set up yet. This may happen, for example,
for virtio-blk devices with multiple queues: The code will try to
switch notifiers for every queue, but the guest may have only set up
a subset of them.

Fix this by guarding access to the vring memory by checking for
vring.desc. The first aio poll will iron out any remaining
inconsistencies for later-configured queues (buggy legacy drivers).

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


  Commit: 3cdf847329a9911780372e6d8239839446d09d9f
      
https://github.com/qemu/qemu/commit/3cdf847329a9911780372e6d8239839446d09d9f
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: invalidate memory in vring_set_avail_event()

Remember to invalidate the avail event field so the memory pages are
marked dirty.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Eric Auger <address@hidden>


  Commit: 874adf45dbfbae2810423527d777ba37bc5ca974
      
https://github.com/qemu/qemu/commit/874adf45dbfbae2810423527d777ba37bc5ca974
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: add missing region cache init in virtio_load()

Commit 97cd965c070152bc626c7507df9fb356bbe1cd81 ("virtio: use
VRingMemoryRegionCaches for avail and used rings") switched to a memory
region cache to avoid repeated map/unmap operations.

The virtio_load() process is a little tricky because vring addresses are
serialized in two separate places.  VIRTIO 1.0 devices serialize desc
and then a subsection with used and avail.  Legacy devices only
serialize desc.

Live migration of VIRTIO 1.0 devices fails on the destination host with:

  VQ 0 size 0x80 < last_avail_idx 0x12f8 - used_idx 0x0
  Failed to load virtio-blk:virtio
  error while loading state for instance 0x0 of device '0000:00:04.0/virtio-blk'

This happens because the memory region cache is only initialized after
desc is loaded and not after the used and avail subsection is loaded.
If the guest chose memory addresses that don't match the legacy ring
layout then the wrong guest memory location is accessed.

Wait until all ring addresses are known before trying to initialize the
region cache.  Also clarify the incomplete comment about VIRTIO-1 ring
address subsection.

Cc: Dr. David Alan Gilbert <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Tested-by: Eric Auger <address@hidden>


  Commit: 96a8821d21411f10d77ea994af369c6e5c35a2cc
      
https://github.com/qemu/qemu/commit/96a8821d21411f10d77ea994af369c6e5c35a2cc
  Author: Jason Wang <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/virtio/virtio-pci.c

  Log Message:
  -----------
  virtio: unbreak virtio-pci with IOMMU after caching ring translations

Commit c611c76417f5 ("virtio: add MemoryListener to cache ring
translations") registers a memory listener to dma_as. This may not
work when IOMMU is enabled: dma_as(bus_master_as) were initialized in
pcibus_machine_done() after virtio_realize(). This will cause a
segfault. Fixing this by using pci_device_iommu_address_space()
instead to make sure address space were initialized at this time.

With this fix, IOMMU device were required to be initialized before any
virtio-pci devices.

Fixes: c611c76417f5 ("virtio: add MemoryListener to cache ring translations")
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: b3c782db2004eaba2da24ba0880b55852c1d8e0b
      
https://github.com/qemu/qemu/commit/b3c782db2004eaba2da24ba0880b55852c1d8e0b
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: simplify _OSC

Our _OSC method has a bunch of unused code loading data
into external CTRL and SUPP fields which are then never
used. Drop this in favor of a single local variable.

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


  Commit: 5cb206b58d1ad6bd2ca1b2276af0b262c617e5fb
      
https://github.com/qemu/qemu/commit/5cb206b58d1ad6bd2ca1b2276af0b262c617e5fb
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M tests/acpi-test-data/q35/DSDT
    M tests/acpi-test-data/q35/DSDT.bridge
    M tests/acpi-test-data/q35/DSDT.cphp
    M tests/acpi-test-data/q35/DSDT.ipmibt
    M tests/acpi-test-data/q35/DSDT.memhp

  Log Message:
  -----------
  tests/acpi: update DSDT after last patch

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


  Commit: 077dd74239a99f6c1e77c5c1aa24cfc7f58cd20c
      
https://github.com/qemu/qemu/commit/077dd74239a99f6c1e77c5c1aa24cfc7f58cd20c
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2017-03-02 (Thu, 02 Mar 2017)

  Changed paths:
    M dtc
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  hw/pxb-pcie: fix PCI Express hotplug support

Add the missing osc method for pxb-pcie devices as APCI spec recommends,
see 6.2.9.1 OSC Implementation Example for PCI Host Bridge Devices, ACPI 3.0a:

    It is recommended that a machine with multiple host bridge devices
    should report the same capabilities for all host bridges, and also
    negotiate control of the features described in the Control Field in
    the same way for all host bridges.

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


  Commit: 9a81b792cc498321671a93973a9d57e28438038c
      
https://github.com/qemu/qemu/commit/9a81b792cc498321671a93973a9d57e28438038c
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-03 (Fri, 03 Mar 2017)

  Changed paths:
    M MAINTAINERS
    M default-configs/i386-softmmu.mak
    M default-configs/x86_64-softmmu.mak
    A docs/specs/vmgenid.txt
    M dtc
    M hmp-commands-info.hx
    M hmp.c
    M hmp.h
    M hw/acpi/Makefile.objs
    M hw/acpi/aml-build.c
    M hw/acpi/bios-linker-loader.c
    A hw/acpi/vmgenid.c
    M hw/i386/acpi-build.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M include/hw/acpi/acpi_dev_interface.h
    M include/hw/acpi/aml-build.h
    M include/hw/acpi/bios-linker-loader.h
    A include/hw/acpi/vmgenid.h
    M qapi-schema.json
    M stubs/Makefile.objs
    A stubs/vmgenid.c
    M tests/Makefile.include
    M tests/acpi-test-data/q35/DSDT
    M tests/acpi-test-data/q35/DSDT.bridge
    M tests/acpi-test-data/q35/DSDT.cphp
    M tests/acpi-test-data/q35/DSDT.ipmibt
    M tests/acpi-test-data/q35/DSDT.memhp
    A tests/acpi-utils.c
    A tests/acpi-utils.h
    M tests/bios-tables-test.c

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

virtio, pc: fixes, features

virtio support for region caches broke a bunch of stuff - fixing most of
it though it's not ideal.  Still pondering the right way to fix it.
New: VM gen ID and hotplug for PXB.

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

# gpg: Signature made Thu 02 Mar 2017 06:19:17 GMT
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# 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:
  hw/pxb-pcie: fix PCI Express hotplug support
  tests/acpi: update DSDT after last patch
  acpi: simplify _OSC
  virtio: unbreak virtio-pci with IOMMU after caching ring translations
  virtio: add missing region cache init in virtio_load()
  virtio: invalidate memory in vring_set_avail_event()
  virtio: guard vring access when setting notification
  virtio: check for vring setup in virtio_queue_empty
  MAINTAINERS: Add VM Generation ID entries
  tests: Move reusable ACPI code into a utility file
  qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands
  ACPI: Add Virtual Machine Generation ID support
  ACPI: Add vmgenid blob storage to the build tables
  docs: VM Generation ID device description
  linker-loader: Add new 'write pointer' command

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


Compare: https://github.com/qemu/qemu/compare/54639aed97bc...9a81b792cc49

reply via email to

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