[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/39] ivshmem: initialize max_peer to -1
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 13/39] ivshmem: initialize max_peer to -1 |
Date: |
Fri, 26 Jun 2015 16:49:19 +0200 |
There is no peer when device is initialized, do not accept doorbell for
peer 0.
Signed-off-by: Marc-André Lureau <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 9776e4e..2c78dee 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 02/39] msix: add VMSTATE_MSIX_TEST, (continued)
- [Qemu-devel] [PATCH 02/39] msix: add VMSTATE_MSIX_TEST, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 04/39] ivshmem: fix number of bytes to push to fifo, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 05/39] ivshmem: factor out the incoming fifo handling, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 03/39] ivhsmem: read do not accept more than sizeof(long), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 07/39] ivshmem: remove superflous ivshmem_attr field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 08/39] ivshmem: remove useless doorbell field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 06/39] ivshmem: remove unnecessary dup(), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 09/39] ivshmem: more qdev conversion, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 10/39] ivshmem: remove last exit(1), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 11/39] ivshmem: increase_dynamic_storage() improvements, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 13/39] ivshmem: initialize max_peer to -1,
Marc-André Lureau <=
- [Qemu-devel] [PATCH 12/39] ivshmem: remove useless ivshmem_update_irq() val argument, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 14/39] ivshmem: remove max_peer field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 15/39] ivshmem: improve debug messages, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 16/39] ivshmem: improve error, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 17/39] ivshmem: print error on invalid peer id, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 18/39] ivshmem: add a warning if eventfd value is 0, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 19/39] ivshmem: beautify a bit the code, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 20/39] ivshmem: use common return, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 22/39] ivshmem: migrate with VMStateDescription, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 21/39] ivshmem: use common is_power_of_2(), Marc-André Lureau, 2015/06/26