[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.14 2/2] x86/passthrough: introduce a flag for GSIs not requiring an EOI or unmask


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 10 Jun 2020 13:37:15 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, paul@xxxxxxx
  • Delivery-date: Wed, 10 Jun 2020 12:37:39 +0000
  • Ironport-sdr: g8wAK7A0sl8aOHTGZITnPC8/NtfSJXfBK+PTIi2S3+cxJ58PJirh0F4mIAUQqOZoRTPzwcnFkV Mi5YPSOk/WGsZ0VK7wS1ZrogzNCYHJA4xOPpwH/8tOexwgPze4kFEiIjsFuSa5eath6dDhm+kz MP5LZpib0QiqrCORSMJ+qjg2fTu6b3SHTA39v+2z6UddXDrGvzHpFd+eRZJII7iehgb07PXXYw YMddoKVBvlYoZTkvsIKEOhyBHQ6a+7H/lbCm9qmz1UDUurRclVFJ0Ywg7sUwLO9ixiS2OanIM/ eH0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/06/2020 12:51, Roger Pau Monne wrote:
> @@ -920,6 +927,11 @@ static void hvm_dirq_assist(struct domain *d, struct 
> hvm_pirq_dpci *pirq_dpci)
>          if ( pirq_dpci->flags & HVM_IRQ_DPCI_IDENTITY_GSI )
>          {
>              hvm_gsi_assert(d, pirq->pirq);
> +            if ( pirq_dpci->flags & HVM_IRQ_DPCI_NO_EOI )
> +            {
> +                spin_unlock(&d->event_lock);
> +                return;
> +            }

Urgh.  Could I possibly talk you into fixing hvm_dirq_assist() to have a
"goto out;" and a single unlock path ?  (How far are you expecting this
to be backported?)

I'm also totally unconvinced that the atomic test_and_clear() needs to
be done with the event lock held (it should either be non-atomic, or the
locking should be inside the if() condition), but that is probably not a
can of worms wanting opening right now...

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.