aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen_pt.h
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2017-08-24 16:07:03 +0100
committerStefano Stabellini <sstabellini@kernel.org>2017-09-20 19:05:27 -0700
commita8036336609d2e184fc3543a4c439c0ba7d7f3a2 (patch)
tree7d7d312ebc27ee49c12cc0411ac22e4034c74db4 /hw/xen/xen_pt.h
parenta3fd781f653db4dc76635715207c9029208634bd (diff)
downloadqemu-a8036336609d2e184fc3543a4c439c0ba7d7f3a2.zip
qemu-a8036336609d2e184fc3543a4c439c0ba7d7f3a2.tar.gz
qemu-a8036336609d2e184fc3543a4c439c0ba7d7f3a2.tar.bz2
xen/pt: allow QEMU to request MSI unmasking at bind time
When a MSI interrupt is bound to a guest using xc_domain_update_msi_irq (XEN_DOMCTL_bind_pt_irq) the interrupt is left masked by default. This causes problems with guests that first configure interrupts and clean the per-entry MSIX table mask bit and afterwards enable MSIX globally. In such scenario the Xen internal msixtbl handlers would not detect the unmasking of MSIX entries because vectors are not yet registered since MSIX is not enabled, and vectors would be left masked. Introduce a new flag in the gflags field to signal Xen whether a MSI interrupt should be unmasked after being bound. This also requires to track the mask register for MSI interrupts, so QEMU can also notify to Xen whether the MSI interrupt should be bound masked or unmasked Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Reported-by: Andreas Kinzler <hfp@posteo.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/xen/xen_pt.h')
-rw-r--r--hw/xen/xen_pt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h
index 191d9ca..aa39a9a 100644
--- a/hw/xen/xen_pt.h
+++ b/hw/xen/xen_pt.h
@@ -180,6 +180,7 @@ typedef struct XenPTMSI {
uint32_t addr_hi; /* guest message upper address */
uint16_t data; /* guest message data */
uint32_t ctrl_offset; /* saved control offset */
+ uint32_t mask; /* guest mask bits */
int pirq; /* guest pirq corresponding */
bool initialized; /* when guest MSI is initialized */
bool mapped; /* when pirq is mapped */