diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-29 11:57:01 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-29 11:57:01 +0100 |
commit | cbe81c6331d875750720c021492ca74e312f9cb2 (patch) | |
tree | d0cb64e14d8b326b3057eec82efb4baffbed93e5 /include | |
parent | aa2aac51f0f888b9a4a4fd461d5816ad84a1c448 (diff) | |
parent | f077f889121c89612eaf0f21e94b97aa110a6910 (diff) |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, pci, virtio: cleanups, fixes
a bunch of bugfixes and a couple of cleanups
making these easier and/or making debugging easier
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 29 Jul 2016 04:11:01 BST
# gpg: using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# 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: (41 commits)
mptsas: Fix a migration compatible issue
vhost: do not update last avail idx on get_vring_base() failure
vhost: add vhost_net_set_backend()
vhost-user: add error report in vhost_user_write()
tests: fix vhost-user-test leak
tests: plug some leaks in virtio-net-test
vhost-user: wait until backend init is completed
char: add and use tcp_chr_wait_connected
char: add chr_wait_connected callback
vhost: add assert() to check runtime behaviour
vhost-net: vhost_migration_done is vhost-user specific
Revert "vhost-net: do not crash if backend is not present"
vhost-user: add get_vhost_net() assertions
vhost-user: keep vhost_net after a disconnection
vhost-user: check vhost_user_{read,write}() return value
vhost-user: check qemu_chr_fe_set_msgfds() return value
vhost-user: call set_msgfds unconditionally
qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected
vhost: use error_report() instead of fprintf(stderr,...)
vhost: add missing VHOST_OPS_DEBUG
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/compat.h | 12 | ||||
-rw-r--r-- | include/hw/pci/pci.h | 3 | ||||
-rw-r--r-- | include/hw/virtio/vhost.h | 4 | ||||
-rw-r--r-- | include/sysemu/char.h | 8 |
4 files changed, 27 insertions, 0 deletions
diff --git a/include/hw/compat.h b/include/hw/compat.h index 9914e7a59e..7ee7299c36 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -6,6 +6,14 @@ .driver = "virtio-mmio",\ .property = "format_transport_address",\ .value = "off",\ + },{\ + .driver = "virtio-pci",\ + .property = "disable-modern",\ + .value = "on",\ + },{\ + .driver = "virtio-pci",\ + .property = "disable-legacy",\ + .value = "off",\ }, #define HW_COMPAT_2_5 \ @@ -80,6 +88,10 @@ .driver = "virtio-rng-pci",\ .property = "any_layout",\ .value = "off",\ + },{\ + .driver = TYPE_PCI_DEVICE,\ + .property = "x-pcie-lnksta-dllla",\ + .value = "off",\ }, #define HW_COMPAT_2_2 \ diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 74d797d1cf..929ec2fb07 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -174,6 +174,9 @@ enum { /* PCI Express capability - Power Controller Present */ #define QEMU_PCIE_SLTCAP_PCP_BITNR 7 QEMU_PCIE_SLTCAP_PCP = (1 << QEMU_PCIE_SLTCAP_PCP_BITNR), + /* Link active status in endpoint capability is always set */ +#define QEMU_PCIE_LNKSTA_DLLLA_BITNR 8 + QEMU_PCIE_LNKSTA_DLLLA = (1 << QEMU_PCIE_LNKSTA_DLLLA_BITNR), }; #define TYPE_PCI_DEVICE "pci-device" diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 2106ed8c0d..e433089ea9 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -86,4 +86,8 @@ uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bits, void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits, uint64_t features); bool vhost_has_free_slot(void); + +int vhost_net_set_backend(struct vhost_dev *hdev, + struct vhost_vring_file *file); + #endif diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 0ea9eacc40..ee7e55468f 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -70,6 +70,7 @@ struct CharDriverState { int (*get_msgfds)(struct CharDriverState *s, int* fds, int num); int (*set_msgfds)(struct CharDriverState *s, int *fds, int num); int (*chr_add_client)(struct CharDriverState *chr, int fd); + int (*chr_wait_connected)(struct CharDriverState *chr, Error **errp); IOEventHandler *chr_event; IOCanReadHandler *chr_can_read; IOReadHandler *chr_read; @@ -159,6 +160,13 @@ void qemu_chr_disconnect(CharDriverState *chr); void qemu_chr_cleanup(void); /** + * @qemu_chr_wait_connected: + * + * Wait for characted backend to be connected. + */ +int qemu_chr_wait_connected(CharDriverState *chr, Error **errp); + +/** * @qemu_chr_new_noreplay: * * Create a new character backend from a URI. |