virtio: regression fixes
3 small patches to make sure we don't ship regressions. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmbEdw8PHG1zdEByZWRo YXQuY29tAAoJECgfDbjSjVRp0dsIAKTzhmBR3IviFQVo223RgcDfthxoKejTB5tv EhGVUi4ddrViIIHsKFZ0pTHXnRcwHpPRokg6GrbqNhrAM6K7ptP8pkEK1DDkbGtq HaeceK55nNZ/wM1O5xHpRLVc2WtxmBrliDTFHGB2HjURO/kpjoHqWbE6Sn4GILc1 EYU2T3Wn1UFgj+H4L7yF4SzmQSmyzq+7Tml6Z2GzpsatdwCoFQz2nA28piCnRMCq lusMo2YdE6js9JS/h+zMqgKValuCyuU7S7ZbSO2dvYQwt/hgk07BegBrdsAENNh6 0IWRHrojwAg+4U6ULzbrBG6/hW2A8Q5065D8Nf9Bjy4eAU7QSbU= =K6xx -----END PGP SIGNATURE----- Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging virtio: regression fixes 3 small patches to make sure we don't ship regressions. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmbEdw8PHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRp0dsIAKTzhmBR3IviFQVo223RgcDfthxoKejTB5tv # EhGVUi4ddrViIIHsKFZ0pTHXnRcwHpPRokg6GrbqNhrAM6K7ptP8pkEK1DDkbGtq # HaeceK55nNZ/wM1O5xHpRLVc2WtxmBrliDTFHGB2HjURO/kpjoHqWbE6Sn4GILc1 # EYU2T3Wn1UFgj+H4L7yF4SzmQSmyzq+7Tml6Z2GzpsatdwCoFQz2nA28piCnRMCq # lusMo2YdE6js9JS/h+zMqgKValuCyuU7S7ZbSO2dvYQwt/hgk07BegBrdsAENNh6 # 0IWRHrojwAg+4U6ULzbrBG6/hW2A8Q5065D8Nf9Bjy4eAU7QSbU= # =K6xx # -----END PGP SIGNATURE----- # gpg: Signature made Tue 20 Aug 2024 08:59:27 PM AEST # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [undefined] # gpg: WARNING: The key's User ID is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # 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 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: virtio-pci: Fix the use of an uninitialized irqfd hw/audio/virtio-snd: fix invalid param check vhost: Add VIRTIO_NET_F_RSC_EXT to vhost feature bits Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
commit
9eb5bfbe33
@ -282,12 +282,12 @@ uint32_t virtio_snd_set_pcm_params(VirtIOSound *s,
|
||||
error_report("Number of channels is not supported.");
|
||||
return cpu_to_le32(VIRTIO_SND_S_NOT_SUPP);
|
||||
}
|
||||
if (BIT(params->format) > sizeof(supported_formats) ||
|
||||
if (params->format >= sizeof(supported_formats) * BITS_PER_BYTE ||
|
||||
!(supported_formats & BIT(params->format))) {
|
||||
error_report("Stream format is not supported.");
|
||||
return cpu_to_le32(VIRTIO_SND_S_NOT_SUPP);
|
||||
}
|
||||
if (BIT(params->rate) > sizeof(supported_rates) ||
|
||||
if (params->rate >= sizeof(supported_rates) * BITS_PER_BYTE ||
|
||||
!(supported_rates & BIT(params->rate))) {
|
||||
error_report("Stream rate is not supported.");
|
||||
return cpu_to_le32(VIRTIO_SND_S_NOT_SUPP);
|
||||
|
@ -50,6 +50,7 @@ static const int kernel_feature_bits[] = {
|
||||
VIRTIO_F_RING_RESET,
|
||||
VIRTIO_F_IN_ORDER,
|
||||
VIRTIO_F_NOTIFICATION_DATA,
|
||||
VIRTIO_NET_F_RSC_EXT,
|
||||
VIRTIO_NET_F_HASH_REPORT,
|
||||
VHOST_INVALID_FEATURE_BIT
|
||||
};
|
||||
@ -81,6 +82,7 @@ static const int user_feature_bits[] = {
|
||||
VIRTIO_F_RING_RESET,
|
||||
VIRTIO_F_IN_ORDER,
|
||||
VIRTIO_NET_F_RSS,
|
||||
VIRTIO_NET_F_RSC_EXT,
|
||||
VIRTIO_NET_F_HASH_REPORT,
|
||||
VIRTIO_NET_F_GUEST_USO4,
|
||||
VIRTIO_NET_F_GUEST_USO6,
|
||||
|
@ -866,6 +866,9 @@ static int virtio_pci_get_notifier(VirtIOPCIProxy *proxy, int queue_no,
|
||||
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
|
||||
VirtQueue *vq;
|
||||
|
||||
if (!proxy->vector_irqfd && vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)
|
||||
return -1;
|
||||
|
||||
if (queue_no == VIRTIO_CONFIG_IRQ_IDX) {
|
||||
*n = virtio_config_get_guest_notifier(vdev);
|
||||
*vector = vdev->config_vector;
|
||||
|
@ -88,6 +88,7 @@ const int vdpa_feature_bits[] = {
|
||||
VIRTIO_NET_F_MQ,
|
||||
VIRTIO_NET_F_MRG_RXBUF,
|
||||
VIRTIO_NET_F_MTU,
|
||||
VIRTIO_NET_F_RSC_EXT,
|
||||
VIRTIO_NET_F_RSS,
|
||||
VIRTIO_NET_F_STATUS,
|
||||
VIRTIO_RING_F_EVENT_IDX,
|
||||
|
Loading…
Reference in New Issue
Block a user