mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
virtio, pci fixes, enhancements
Almost exclusively bugfixes, though in this case, we are adding functionality to the pxb in order to make OVMF work on it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJVjVb/AAoJECgfDbjSjVRpeaEH/2bwK7BGgczEQ7fhzIEaQSQq SV7aychNZvUFASXLV6aVmQCdYixZxlI9KDn0pMRYntUcjxRRB48U3N5Sy4km46Pw LLN3vxGzHazlE7AJ5c+WVDf0e2k7v3CpZ/TKXzPHmvZXIuBfjKXtKzBgyQYxGkmL JgRrRSHDrsbvfmhI4uHMpCTYs/WeY1cuA1IzvimBjmvVP5kkko4NoX+HEWmGJ6WK 13fQuV+Cvz7Yk40HRpPAM0QPV2etGCj+dU7xgF9BWnn9mzbGC5iy8EUClyGil/af k3i/bCxs6IgpQ76LaezJtGPtn1jbohrO4qRqlatUAJCwgCYMCkxkIk+Pr4A3x4c= =6WvB -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging virtio, pci fixes, enhancements Almost exclusively bugfixes, though in this case, we are adding functionality to the pxb in order to make OVMF work on it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri Jun 26 14:43:27 2015 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: Fix glib_subprocess test hw/pci-bridge: format special OFW unit address for PXB host hw/core: explicit OFW unit address callback for SysBusDeviceClass hw/pci-bridge: disable SHPC in PXB hw/pci-bridge: introduce "shpc" property hw/pci: introduce shpc_present() helper function hw/pci-bridge: add macro for "msi" property hw/pci-bridge: add macro for "chassis_nr" property hw/pci-bridge: expose _test parameter in SHPC_VMSTATE() migration: introduce VMSTATE_BUFFER_UNSAFE_INFO_TEST() add pci-bridge-seat pc: cleanup and convert TMP ACPI device description to AML API MAINTAINERS: add ACPI entry vhost: correctly pass error to caller in vhost_dev_enable_notifiers() balloon: add a feature bit to let Guest OS deflate balloon on oom qdev: fix OVERFLOW_BEFORE_WIDEN virito-pci: fix OVERRUN problem Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
dc1e1350f8
24 changed files with 263 additions and 370 deletions
|
@ -999,7 +999,7 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
|
|||
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev)));
|
||||
VirtioBusState *vbus = VIRTIO_BUS(qbus);
|
||||
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus);
|
||||
int i, r;
|
||||
int i, r, e;
|
||||
if (!k->set_host_notifier) {
|
||||
fprintf(stderr, "binding does not support host notifiers\n");
|
||||
r = -ENOSYS;
|
||||
|
@ -1017,12 +1017,12 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
|
|||
return 0;
|
||||
fail_vq:
|
||||
while (--i >= 0) {
|
||||
r = k->set_host_notifier(qbus->parent, hdev->vq_index + i, false);
|
||||
if (r < 0) {
|
||||
e = k->set_host_notifier(qbus->parent, hdev->vq_index + i, false);
|
||||
if (e < 0) {
|
||||
fprintf(stderr, "vhost VQ %d notifier cleanup error: %d\n", i, -r);
|
||||
fflush(stderr);
|
||||
}
|
||||
assert (r >= 0);
|
||||
assert (e >= 0);
|
||||
}
|
||||
fail:
|
||||
return r;
|
||||
|
|
|
@ -312,6 +312,8 @@ static void virtio_balloon_set_config(VirtIODevice *vdev,
|
|||
|
||||
static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f)
|
||||
{
|
||||
VirtIOBalloon *dev = VIRTIO_BALLOON(vdev);
|
||||
f |= dev->host_features;
|
||||
virtio_add_feature(&f, VIRTIO_BALLOON_F_STATS_VQ);
|
||||
return f;
|
||||
}
|
||||
|
@ -423,6 +425,8 @@ static void virtio_balloon_instance_init(Object *obj)
|
|||
}
|
||||
|
||||
static Property virtio_balloon_properties[] = {
|
||||
DEFINE_PROP_BIT("deflate-on-oom", VirtIOBalloon, host_features,
|
||||
VIRTIO_BALLOON_F_DEFLATE_ON_OOM, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
|
|
@ -977,7 +977,7 @@ static uint64_t virtio_pci_common_read(void *opaque, hwaddr addr,
|
|||
val = proxy->gfselect;
|
||||
break;
|
||||
case VIRTIO_PCI_COMMON_GF:
|
||||
if (proxy->gfselect <= ARRAY_SIZE(proxy->guest_features)) {
|
||||
if (proxy->gfselect < ARRAY_SIZE(proxy->guest_features)) {
|
||||
val = proxy->guest_features[proxy->gfselect];
|
||||
}
|
||||
break;
|
||||
|
@ -1052,7 +1052,7 @@ static void virtio_pci_common_write(void *opaque, hwaddr addr,
|
|||
proxy->gfselect = val;
|
||||
break;
|
||||
case VIRTIO_PCI_COMMON_GF:
|
||||
if (proxy->gfselect <= ARRAY_SIZE(proxy->guest_features)) {
|
||||
if (proxy->gfselect < ARRAY_SIZE(proxy->guest_features)) {
|
||||
proxy->guest_features[proxy->gfselect] = val;
|
||||
virtio_set_features(vdev,
|
||||
(((uint64_t)proxy->guest_features[1]) << 32) |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue