[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v12 7/7] passthrough/io: Fall back to remapping interrupt when we can't use VT-d PI
The current logic of using VT-d pi is when guest configurates the pirq's destination vcpu to a single vcpu, the according IRTE is updated to posted format. If the destination of the pirq is multiple vcpus, we will stay in posted format. Obviously, we should fall back to remapping interrupt when guest wrongly configurate destination of pirq or makes it have multi-destination vcpus. Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx> --- v11: - move the code (one line) that allow the parameter 'vcpu' of pi_update_irte() can be NULL to Patch [2/6]. v10: - Newly added xen/drivers/passthrough/io.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index 3e0a10e..3503fad 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -413,15 +413,8 @@ int pt_irq_create_bind( /* Use interrupt posting if it is supported. */ if ( iommu_intpost ) - { - if ( vcpu ) - pi_update_irte(&vcpu->arch.hvm_vmx.pi_desc, info, - pirq_dpci->gmsi.gvec); - else - dprintk(XENLOG_G_INFO, - "%pv: deliver interrupt in remapping mode,gvec:%02x\n", - vcpu, pirq_dpci->gmsi.gvec); - } + pi_update_irte(&vcpu->arch.hvm_vmx.pi_desc, info, + pirq_dpci->gmsi.gvec); break; } -- 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 |