qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] dba04c: acpi: accept byte and word access to


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] dba04c: acpi: accept byte and word access to core ACPI reg...
Date: Thu, 23 Jul 2020 11:01:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dba04c3488c4699f5afe96f66e448b1d447cf3fb
      
https://github.com/qemu/qemu/commit/dba04c3488c4699f5afe96f66e448b1d447cf3fb
  Author: Michael Tokarev <mjt@tls.msk.ru>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M hw/acpi/core.c

  Log Message:
  -----------
  acpi: accept byte and word access to core ACPI registers

All ISA registers should be accessible as bytes, words or dwords
(if wide enough).  Fix the access constraints for acpi-pm-evt,
acpi-pm-tmr & acpi-cnt registers.

Fixes: 5d971f9e67 (memory: Revert "memory: accept mismatching sizes in 
memory_region_access_valid")
Fixes: afafe4bbe0 (apci: switch cnt to memory api)
Fixes: 77d58b1e47 (apci: switch timer to memory api)
Fixes: b5a7c024d2 (apci: switch evt to memory api)
Buglink: 
https://lore.kernel.org/xen-devel/20200630170913.123646-1-anthony.perard@citrix.com/T/
Buglink: https://bugs.debian.org/964793
BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247
BugLink: https://bugs.launchpad.net/bugs/1886318
Reported-By: Simon John <git@the-jedi.co.uk>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <20200720160627.15491-1-mjt@msgid.tls.msk.ru>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: cf4e3d000e438d04077a56c401b41f3336a2a09d
      
https://github.com/qemu/qemu/commit/cf4e3d000e438d04077a56c401b41f3336a2a09d
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M hw/s390x/virtio-ccw-crypto.c
    M hw/s390x/virtio-ccw-rng.c
    M hw/virtio/virtio-crypto-pci.c
    M hw/virtio/virtio-rng-pci.c

  Log Message:
  -----------
  virtio: Drop broken and superfluous object_property_set_link()

virtio_crypto_pci_realize() and copies the value of vcrypto->vdev's
property "cryptodev" to vcrypto's property:

    object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng),
                             NULL);

Since it does so only after realize, this always fails, but the error
is ignored.

It's actually superfluous: vcrypto's property is an alias of
vcrypto->vdev's property, created by virtio_instance_init_common().

Drop the call.

Same for virtio_ccw_crypto_realize(), virtio_rng_pci_realize(),
virtio_ccw_rng_realize().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200721121153.1128844-1-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 20a4da0f23078deeff5ea6d1e12f47d968d7c3c9
      
https://github.com/qemu/qemu/commit/20a4da0f23078deeff5ea6d1e12f47d968d7c3c9
  Author: Alexander Duyck <alexander.h.duyck@linux.intel.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

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

  Log Message:
  -----------
  virtio-balloon: Prevent guest from starting a report when we didn't request 
one

Based on code review it appears possible for the driver to force the device
out of a stopped state when hinting by repeating the last ID it was
provided.

Prevent this by only allowing a transition to the start state when we are
in the requested state. This way the driver is only allowed to send one
descriptor that will transition the device into the start state. All others
will leave it in the stop state once it has finished.

Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200720175115.21935.99563.stgit@localhost.localdomain>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1a83e0b9c492a0eaeacd6fbb858fc81d04ab9c3e
      
https://github.com/qemu/qemu/commit/1a83e0b9c492a0eaeacd6fbb858fc81d04ab9c3e
  Author: Alexander Duyck <alexander.h.duyck@linux.intel.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

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

  Log Message:
  -----------
  virtio-balloon: Add locking to prevent possible race when starting hinting

There is already locking in place when we are stopping free page hinting
but there is not similar protections in place when we start. I can only
assume this was overlooked as in most cases the page hinting should not be
occurring when we are starting the hinting, however there is still a chance
we could be processing hints by the time we get back around to restarting
the hinting so we are better off making sure to protect the state with the
mutex lock rather than just updating the value with no protections.

Based on feedback from Peter Maydell this issue had also been spotted by
Coverity: CID 1430269

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200720175122.21935.78013.stgit@localhost.localdomain>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3219b42f025d4d7a9c463235e9f937ab38067de3
      
https://github.com/qemu/qemu/commit/3219b42f025d4d7a9c463235e9f937ab38067de3
  Author: Alexander Duyck <alexander.h.duyck@linux.intel.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M hw/virtio/virtio-balloon.c
    M include/hw/virtio/virtio-balloon.h

  Log Message:
  -----------
  virtio-balloon: Replace free page hinting references to 'report' with 'hint'

Recently a feature named Free Page Reporting was added to the virtio
balloon. In order to avoid any confusion we should drop the use of the word
'report' when referring to Free Page Hinting. So what this patch does is go
through and replace all instances of 'report' with 'hint" when we are
referring to free page hinting.

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200720175128.21935.93927.stgit@localhost.localdomain>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7c78bdd7a3d0086179331f10d1f6f8cdac34731a
      
https://github.com/qemu/qemu/commit/7c78bdd7a3d0086179331f10d1f6f8cdac34731a
  Author: Cornelia Huck <cohuck@redhat.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M hw/virtio/virtio.c
    M include/hw/virtio/virtio.h

  Log Message:
  -----------
  virtio: list legacy-capable devices

Several types of virtio devices had already been around before the
virtio standard was specified. These devices support virtio in legacy
(and transitional) mode.

Devices that have been added in the virtio standard are considered
non-transitional (i.e. with no support for legacy virtio).

Provide a helper function so virtio transports can figure that out
easily.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200707105446.677966-2-cohuck@redhat.com>
Cc: qemu-stable@nongnu.org
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 9b3a35ec8236933ab958a4c3ad883163f1ca66e7
      
https://github.com/qemu/qemu/commit/9b3a35ec8236933ab958a4c3ad883163f1ca66e7
  Author: Cornelia Huck <cohuck@redhat.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

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

  Log Message:
  -----------
  virtio: verify that legacy support is not accidentally on

If a virtio device does not have legacy support, make sure that
it is actually off, and bail out if not.

For virtio-pci, this means that any device without legacy support
that has been specified to modern-only (or that has been forced
to it) will work.

For virtio-ccw, this duplicates the check that is currently done
prior to realization for any device that explicitly specified no
support for legacy.

This catches devices that have not been fenced properly.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200707105446.677966-3-cohuck@redhat.com>
Cc: qemu-stable@nongnu.org
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a4544c45e109ceee87ee8c19baff28be3890d788
      
https://github.com/qemu/qemu/commit/a4544c45e109ceee87ee8c19baff28be3890d788
  Author: Liu Yi L <yi.l.liu@intel.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h

  Log Message:
  -----------
  intel_iommu: Use correct shift for 256 bits qi descriptor

In chapter 10.4.23 of VT-d spec 3.0, Descriptor Width bit was introduced
in VTD_IQA_REG. Software could set this bit to tell VT-d the QI descriptor
from software would be 256 bits. Accordingly, the VTD_IQH_QH_SHIFT should
be 5 when descriptor size is 256 bits.

This patch adds the DW bit check when deciding the shift used to update
VTD_IQH_REG.

Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Message-Id: <1593850035-35483-1-git-send-email-yi.l.liu@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ccec7e9603f446fe75c6c563ba335c00cfda6a06
      
https://github.com/qemu/qemu/commit/ccec7e9603f446fe75c6c563ba335c00cfda6a06
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

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

  Log Message:
  -----------
  virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks.

There is an issue when callback may be called with invalid vdev.
It happens on unplug when vdev already deleted and VirtIOPciProxy is not.
So now, callbacks accept proxy device, and vdev retrieved from it.
Technically memio callbacks should be removed during the flatview update,
but memoryregions remain til PCI device(and it's address space) completely 
deleted.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1716352

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20200706112123.971087-1-andrew@daynix.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8ffa52c20d5693d454f65f2024a1494edfea65d4
      
https://github.com/qemu/qemu/commit/8ffa52c20d5693d454f65f2024a1494edfea65d4
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M hw/acpi/core.c
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h
    M hw/s390x/virtio-ccw-crypto.c
    M hw/s390x/virtio-ccw-rng.c
    M hw/s390x/virtio-ccw.c
    M hw/virtio/virtio-balloon.c
    M hw/virtio/virtio-crypto-pci.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-rng-pci.c
    M hw/virtio/virtio.c
    M include/hw/virtio/virtio-balloon.h
    M include/hw/virtio/virtio.h

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

acpi,virtio,pc: bugfixes

Fix bug in ACPI which were tripping up guests.
Fix a use-after-free with hotplug of virtio devices.
Block ability to create legacy devices which shouldn't have been
there in the first place.
Fix migration error handling with balloon.
Drop some dead code in virtio.
vtd emulation fixup.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Wed 22 Jul 2020 13:07:26 BST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [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:
  virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks.
  intel_iommu: Use correct shift for 256 bits qi descriptor
  virtio: verify that legacy support is not accidentally on
  virtio: list legacy-capable devices
  virtio-balloon: Replace free page hinting references to 'report' with 'hint'
  virtio-balloon: Add locking to prevent possible race when starting hinting
  virtio-balloon: Prevent guest from starting a report when we didn't request 
one
  virtio: Drop broken and superfluous object_property_set_link()
  acpi: accept byte and word access to core ACPI registers

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


Compare: https://github.com/qemu/qemu/compare/53ce7b47b5bf...8ffa52c20d56



reply via email to

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