From 30e17b04eafb176e18f7228769923ba8119a5a45 Mon Sep 17 00:00:00 2001 From: Levente Kurusa Date: Sat, 13 Sep 2014 11:29:54 +0200 Subject: [PATCH 3/4] ivshmem: add IVFEATURES register The guest might want to know about what features are enabled. Let them know by exposing the features bitmask in a new secondary register. Signed-off-by: Levente Kurusa --- hw/misc/ivshmem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index f6e626c..e1b534b 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -32,6 +32,7 @@ #define PCI_VENDOR_ID_IVSHMEM PCI_VENDOR_ID_REDHAT_QUMRANET #define PCI_DEVICE_ID_IVSHMEM 0x1110 +/* ivshmem features */ #define IVSHMEM_IOEVENTFD 0 #define IVSHMEM_MSI 1 @@ -119,6 +120,7 @@ enum ivshmem_registers { enum ivshmem_secondary_registers { IRQSTATUS = 0, IVSHMVER = 4, + IVFEATURES = 8, /* Rest is reserved */ }; @@ -273,6 +275,9 @@ static uint64_t ivshmem_secondreg_read(void *opaque, hwaddr addr, case IVSHMVER: ret = IVSHMEM_CURRENT_VERSION; break; + case IVFEATURES: + ret = s->features; + break; } return ret; -- 1.8.3.1