aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-23 13:38:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-23 13:38:21 +0100
commit8ffa52c20d5693d454f65f2024a1494edfea65d4 (patch)
tree7b5f89665820ae2c3969342044a3ca7841062b04 /include/hw
parent53ce7b47b5bf47db067b81c18c786ed7b792d031 (diff)
parentccec7e9603f446fe75c6c563ba335c00cfda6a06 (diff)
downloadqemu-arm-8ffa52c20d5693d454f65f2024a1494edfea65d4.tar.gz
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>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/virtio/virtio-balloon.h20
-rw-r--r--include/hw/virtio/virtio.h2
2 files changed, 12 insertions, 10 deletions
diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h
index d49fef00ce..28fd2b3960 100644
--- a/include/hw/virtio/virtio-balloon.h
+++ b/include/hw/virtio/virtio-balloon.h
@@ -23,7 +23,7 @@
#define VIRTIO_BALLOON(obj) \
OBJECT_CHECK(VirtIOBalloon, (obj), TYPE_VIRTIO_BALLOON)
-#define VIRTIO_BALLOON_FREE_PAGE_REPORT_CMD_ID_MIN 0x80000000
+#define VIRTIO_BALLOON_FREE_PAGE_HINT_CMD_ID_MIN 0x80000000
typedef struct virtio_balloon_stat VirtIOBalloonStat;
@@ -33,20 +33,20 @@ typedef struct virtio_balloon_stat_modern {
uint64_t val;
} VirtIOBalloonStatModern;
-enum virtio_balloon_free_page_report_status {
- FREE_PAGE_REPORT_S_STOP = 0,
- FREE_PAGE_REPORT_S_REQUESTED = 1,
- FREE_PAGE_REPORT_S_START = 2,
- FREE_PAGE_REPORT_S_DONE = 3,
+enum virtio_balloon_free_page_hint_status {
+ FREE_PAGE_HINT_S_STOP = 0,
+ FREE_PAGE_HINT_S_REQUESTED = 1,
+ FREE_PAGE_HINT_S_START = 2,
+ FREE_PAGE_HINT_S_DONE = 3,
};
typedef struct VirtIOBalloon {
VirtIODevice parent_obj;
VirtQueue *ivq, *dvq, *svq, *free_page_vq, *reporting_vq;
- uint32_t free_page_report_status;
+ uint32_t free_page_hint_status;
uint32_t num_pages;
uint32_t actual;
- uint32_t free_page_report_cmd_id;
+ uint32_t free_page_hint_cmd_id;
uint64_t stats[VIRTIO_BALLOON_S_NR];
VirtQueueElement *stats_vq_elem;
size_t stats_vq_offset;
@@ -55,7 +55,7 @@ typedef struct VirtIOBalloon {
QEMUBH *free_page_bh;
/*
* Lock to synchronize threads to access the free page reporting related
- * fields (e.g. free_page_report_status).
+ * fields (e.g. free_page_hint_status).
*/
QemuMutex free_page_lock;
QemuCond free_page_cond;
@@ -64,7 +64,7 @@ typedef struct VirtIOBalloon {
* stopped.
*/
bool block_iothread;
- NotifierWithReturn free_page_report_notify;
+ NotifierWithReturn free_page_hint_notify;
int64_t stats_last_update;
int64_t stats_poll_interval;
uint32_t host_features;
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index b69d517496..198ffc7626 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -396,4 +396,6 @@ static inline bool virtio_device_disabled(VirtIODevice *vdev)
return unlikely(vdev->disabled || vdev->broken);
}
+bool virtio_legacy_allowed(VirtIODevice *vdev);
+
#endif