[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 14/23] X86/vvtd: decode interrupt attribute from IRTE
From: Chao Gao <chao.gao@xxxxxxxxx> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx> --- xen/arch/x86/hvm/vvtd.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vvtd.c b/xen/arch/x86/hvm/vvtd.c index c5df77d..0c49294 100644 --- a/xen/arch/x86/hvm/vvtd.c +++ b/xen/arch/x86/hvm/vvtd.c @@ -568,6 +568,25 @@ static int vvtd_handle_irq_request(struct domain *d, return -EFAULT; } +static int vvtd_get_irq_info(struct domain *d, + struct irq_remapping_request *irq, + struct irq_remapping_info *info) +{ + int ret; + struct iremap_entry irte; + struct vvtd *vvtd = domain_vvtd(d); + + ret = vvtd_get_entry(vvtd, irq, &irte, 0); + if ( ret ) + return -ret; + + info->vector = irte.remap.vector; + info->dest = irte_dest(vvtd, &irte); + info->dest_mode = irte.remap.dm; + info->delivery_mode = irte.remap.dlm; + return 0; +} + static void vvtd_reset(struct vvtd *vvtd, uint64_t capability) { uint64_t cap, ecap; @@ -667,5 +686,6 @@ struct viommu_ops vvtd_hvm_vmx_ops = { .query_caps = vvtd_query_caps, .create = vvtd_create, .destroy = vvtd_destroy, - .handle_irq_request = vvtd_handle_irq_request + .handle_irq_request = vvtd_handle_irq_request, + .get_irq_info = vvtd_get_irq_info }; -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |