[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 15/48] ivshmem: initialize max_peer to -1
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v5 15/48] ivshmem: initialize max_peer to -1 |
Date: |
Fri, 2 Oct 2015 21:09:18 +0200 |
From: Marc-André Lureau <address@hidden>
There is no peer when device is initialized, do not let doorbell for
inexisting peer 0.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
---
hw/misc/ivshmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 374ecff..0716deb 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -532,8 +532,6 @@ static void ivshmem_read(void *opaque, const uint8_t *buf,
int size)
if (incoming_posn == -1) {
void * map_ptr;
- s->max_peer = 0;
-
if (check_shm_size(s, incoming_fd, &err) == -1) {
error_report_err(err);
close(incoming_fd);
@@ -723,6 +721,8 @@ static void pci_ivshmem_realize(PCIDevice *dev, Error
**errp)
PCI_BASE_ADDRESS_MEM_PREFETCH;
Error *local_err = NULL;
+ s->max_peer = -1;
+
if (s->sizearg == NULL) {
s->ivshmem_size = 4 << 20; /* 4 MB default */
} else {
--
2.4.3
- [Qemu-devel] [PATCH v5 37/48] contrib: remove unnecessary strdup(), (continued)
- [Qemu-devel] [PATCH v5 37/48] contrib: remove unnecessary strdup(), marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 42/48] ivshmem: do not keep shm_fd open, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 38/48] msix: implement pba write (but read-only), marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 45/48] ivshmem: remove EventfdEntry.vector, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 48/48] ivshmem: use little-endian int64_t for the protocol, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 04/48] ivshmem: fix number of bytes to push to fifo, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 07/48] ivshmem: remove superflous ivshmem_attr field, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 05/48] ivshmem: factor out the incoming fifo handling, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 09/48] ivshmem: more qdev conversion, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 10/48] ivshmem: remove last exit(1), marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 15/48] ivshmem: initialize max_peer to -1,
marcandre . lureau <=
- [Qemu-devel] [PATCH v5 21/48] ivshmem: use common return, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 44/48] ivshmem: add hostmem backend, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 32/48] ivshmem-client: check the number of vectors, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 47/48] ivshmem: use kvm irqfd for msi notifications, marcandre . lureau, 2015/10/08
- [Qemu-devel] [PATCH v5 43/48] ivshmem: use qemu_strtosz(), marcandre . lureau, 2015/10/08