x86: fix hvm_migrate_irq assertion
PATCH 1/1 x86: fix hvm_migrate_irq assertion
782cf8ba46 ("pass-through: adjust pIRQ migration") added an assertion to hvm_migrate_irq.
PVH Dom0 is broken because it doesn't have dpci allocated. Add an is_hardware_domain check to the assertion.
--- xen/arch/x86/hvm/hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/hvm.c +2 -1
@@ -464,7 +464,8 @@ void hvm_migrate_timers(struct vcpu *v)void hvm_migrate_pirq (struct hvm_pirq_dpci *pirq_dpci,const struct vcpu *v) { -ASSERT (iommu_enabled &&hvm_domain_irq (v->domain)->dpci); +ASSERT (iommu_enabled && + (is_hardware_domain (v->domain) ||hvm_domain_irq (v->domain)->dpci)); if ( (pirq_dpci->flags & HVM_IRQ_DPCI_MACH_MSI) &&/* Needn't migrate pirq if this pirq is delivered to guest directly.*/
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 12.11.18 at 15:04, <[email protected]> wrote:
782cf8ba46("pass-through: adjust pIRQ migration") added an assertion tohvm_migrate_irq.PVH Dom0 is broken because it doesn't have dpci allocated. Add an
is_hardware_domaincheck to the assertion.Signed-off-by Wei Liu <[email protected]>
I'm sorry for the breakage.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 12.11.18 at 15:04, <[email protected]> wrote:
782cf8ba46("pass-through: adjust pIRQ migration") added an assertion tohvm_migrate_irq.
Quoted 9 lines
Quoted 4 lines
PVH Dom0 is broken because it doesn't have dpci allocated. Add an
is_hardware_domaincheck to the assertion.Signed-off-by Wei Liu <[email protected]>Reviewed-by Jan Beulich <[email protected]>I'm sorry for the breakage.
No worries. I should have noticed this while reviewing your patch, so I don't blame you.
Wei.
Quoted 3 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Wei Liu
782cf8ba46("pass-through: adjust pIRQ migration") added an assertion tohvm_migrate_irq.PVH Dom0 is broken because it doesn't have dpci allocated. Add an
is_hardware_domaincheck to the assertion.Signed-off-by Wei Liu <[email protected]>
Quoted 9 lines
--- xen/arch/x86/hvm/hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/arch/x86/hvm/hvm.c +0
-0
xen/arch/x86/hvm/hvm.c void hvm_migrate_timers(struct vcpu *v) · line 468
Quoted 6 lines
xen/arch/x86/hvm/hvm.c +2
-1@@ -464,7 +464,8 @@ void hvm_migrate_timers(struct vcpu *v)void hvm_migrate_pirq (struct hvm_pirq_dpci *pirq_dpci,const struct vcpu *v) { -ASSERT (iommu_enabled &&hvm_domain_irq (v->domain)->dpci); +ASSERT (iommu_enabled && + (is_hardware_domain (v->domain) ||hvm_domain_irq (v->domain)->dpci));
Albeit I would just remove the hvm_domain_irq(v->domain)->dpci part of the assert, AFAICT the function doesn't use it at all.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel