All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii.anisov@gmail.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: "sstabellini@kernel.org" <sstabellini@kernel.org>,
	Andrii Anisov <Andrii_Anisov@epam.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@gmail.com>,
	Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>,
	Julien Grall <julien.grall@arm.com>
Subject: Re: [PATCH 1/4] xen/arm: gic: Ensure we have an ISB between ack and do_IRQ()
Date: Fri, 23 Nov 2018 15:04:38 +0200	[thread overview]
Message-ID: <d69c131b-9ff0-6fbe-6c6d-0e46d334bbbb@gmail.com> (raw)
In-Reply-To: <20181123121819.1b1c7655@donnerap.cambridge.arm.com>



On 23.11.18 14:18, Andre Przywara wrote:
> Fundamentally there is a semantic difference between edge and level
> triggered IRQs:
> When the guest has handled an *edge* IRQ (EOIed so the LR's state goes
> to 0), this is done and dusted, and Xen doesn't need to care
> about this anymore until the next IRQ occurs.
> 
> For level triggered IRQs, even though the guest has handled it, we need
> to resample the (potentially virtual) IRQ line, as it may come up or
> down at the *device*'s discretion: the interrupt reason might have gone
> away (GPIO condition no longer true), even before we were able to
> inject it, or there might be another interrupt reason not yet handled
> (incoming serial character while serving a transmit interrupt). Also
> typically it's up to the interrupt handler to confirm handling the
> interrupt, either explicitly by clearing an interrupt bit in some
> status register or implicitly, for instance by draining a FIFO, say on
> a serial device. So even though from the (V)GIC's point of view the
> interrupt has been processed (EOIed), it might still be pending.
> 
> My intimate "old Xen VGIC" knowledge has been swapped out from my brain
> meanwhile, but IIRC Xen treats every IRQ as if it would be an edge IRQ.
> Which works if the guest's interrupt handler behaves correctly. Most
> IRQ handlers have a loop to iterate over all possible interrupt
> reasons and process them, so the line goes indeed down before they EOI
> the IRQ.
Thank you for the explanation. I'll read it carefully.


-- 
Sincerely,
Andrii Anisov.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-11-23 13:04 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 18:17 [PATCH 0/4] xen/arm: GIC fixes and improvement Julien Grall
2018-10-23 18:17 ` [PATCH 1/4] xen/arm: gic: Ensure we have an ISB between ack and do_IRQ() Julien Grall
2018-10-24  9:38   ` Andrii Anisov
2018-10-24 14:41     ` Julien Grall
2018-10-25 14:11       ` Andrii Anisov
2018-10-25 14:22         ` Julien Grall
2018-10-25 17:45           ` Andrii Anisov
2018-10-26 12:49         ` Andrii Anisov
2018-10-26 21:55           ` Julien Grall
2018-10-27 12:14             ` Andrii Anisov
2018-10-28 11:46               ` Julien Grall
2018-10-29 10:06               ` Andrii Anisov
2018-10-29 13:36                 ` Julien Grall
2018-10-29 16:16                   ` Andrii Anisov
2018-10-29 16:22                     ` Julien Grall
2018-10-30  8:07                       ` Andrii Anisov
2018-11-09 14:42                   ` Andrii Anisov
2018-11-09 17:47                     ` Julien Grall
2018-11-19 15:54                     ` Andrii Anisov
2018-11-19 16:42                       ` Julien Grall
2018-11-20 18:10                         ` Andrii Anisov
2018-11-20 18:47                           ` Julien Grall
2018-11-22 16:51                             ` Andrii Anisov
2018-11-22 17:22                               ` Julien Grall
2018-11-23 10:09                                 ` Andrii Anisov
2018-11-23 12:18                                   ` Andre Przywara
2018-11-23 13:04                                     ` Andrii Anisov [this message]
2018-11-30 19:52                                     ` Andrii Anisov
2018-12-03 13:46                                       ` Andre Przywara
2018-12-03 13:53                                         ` Juergen Gross
2018-12-03 14:36                                           ` Andrii Anisov
2018-12-04 17:16                                             ` Julien Grall
2018-12-03 15:28                                         ` Andrii Anisov
2018-11-28  0:30                                 ` Stefano Stabellini
2018-11-22 18:04                               ` Andre Przywara
2018-11-23 12:58                                 ` Andrii Anisov
2018-11-23 13:27                                   ` Julien Grall
2018-11-27 13:30                                     ` Andrii Anisov
2018-11-27 15:13                                       ` Julien Grall
2018-12-03 12:08                                         ` Andrii Anisov
2018-12-03 12:17                                           ` Julien Grall
2018-12-03 12:58                                             ` Andrii Anisov
2018-12-03 13:10                                               ` Julien Grall
2018-10-25 17:46   ` Andrii Anisov
2018-11-09 23:02   ` Stefano Stabellini
2018-10-23 18:17 ` [PATCH 2/4] xen/arm: gic: Ensure ordering between read of INTACK and shared data Julien Grall
2018-10-24 15:40   ` Andrii Anisov
2018-11-09 23:02   ` Stefano Stabellini
2018-10-23 18:17 ` [PATCH 3/4] xen/arm: gic: Remove duplicated comment in do_sgi Julien Grall
2018-10-24 10:26   ` Andrii Anisov
2018-11-09 23:03   ` Stefano Stabellini
2018-10-23 18:17 ` [PATCH 4/4] xen/arm: gic: Relax barrier when sending an SGI Julien Grall
2018-10-24 13:32   ` Andrii Anisov
2018-10-24 14:46     ` Julien Grall
2018-10-24 15:40       ` Andrii Anisov
2018-10-24 15:44         ` Julien Grall
2018-11-09 23:14   ` Stefano Stabellini
2018-11-12 12:15     ` Julien Grall
  -- strict thread matches above, loose matches on Subject: below --
2018-10-29 16:46 [PATCH 1/4] xen/arm: gic: Ensure we have an ISB between ack and do_IRQ() Andrii Anisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d69c131b-9ff0-6fbe-6c6d-0e46d334bbbb@gmail.com \
    --to=andrii.anisov@gmail.com \
    --cc=Andrii_Anisov@epam.com \
    --cc=Oleksandr_Tyshchenko@epam.com \
    --cc=andre.przywara@arm.com \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.