On Dec31 03:45, kevinnma(马文霜) wrote:
> diff --git a/kvm-all.c b/kvm-all.c
> index 18cc6b4..f47e1b1 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1123,6 +1123,17 @@ static int kvm_irqchip_get_virq(KVMState *s)
>      int i, bit;
>      bool retry = true;
>  
> +    /*
> +     * PIC and IOAPIC share the first 15 GSI numbers,available GSI
> +     * numbers greater than IRQ route entries. If allocate GSI number
> +     * succeeds, a new route entry can be added, so total IRQ route
> +     * enties can exceed gsi_count, flush dynamic MSI entries when
> +     * IRQ route entries arrive gsi_count.
> +     */
> +    if (!s->direct_msi && s->irq_routes->nr == s->gsi_count) {
> +        kvm_flush_dynamic_msi_routes(s);
> +    }
> +
>  again:
>      /* Return the lowest unused GSI in the bitmap */
>      for (i = 0; i < max_words; i++) {

Any comments on this patch?

-- 
William

Attachment: signature.asc
Description: Digital signature

Reply via email to