From: Eric Auger <eric.auger@linaro.org>
To: Marc Zyngier <marc.zyngier@arm.com>,
Christoffer Dall <christoffer.dall@linaro.org>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v2 6/8] arm/arm64: KVM: Add forwarded physical interrupts documentation
Date: Tue, 8 Sep 2015 09:44:46 +0200 [thread overview]
Message-ID: <55EE91EE.5070204@linaro.org> (raw)
In-Reply-To: <55EDCE52.1040006@arm.com>
Hi Marc,
On 09/07/2015 07:50 PM, Marc Zyngier wrote:
> On 07/09/15 17:45, Eric Auger wrote:
>> Hi Christoffer,
>> On 09/04/2015 09:40 PM, Christoffer Dall wrote:
>>> Forwarded physical interrupts on arm/arm64 is a tricky concept and the
>>> way we deal with them is not apparently easy to understand by reading
>>> various specs.
>>>
>>> Therefore, add a proper documentation file explaining the flow and
>>> rationale of the behavior of the vgic.
>>>
>>> Some of this text was contributed by Marc Zyngier and edited by me.
>>> Omissions and errors are all mine.
>>>
>>> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
>>> ---
>>> Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt | 181 +++++++++++++++++++++
>>> 1 file changed, 181 insertions(+)
>>> create mode 100644 Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>>
>>> diff --git a/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>> new file mode 100644
>>> index 0000000..24b6f28
>>> --- /dev/null
>>> +++ b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>> @@ -0,0 +1,181 @@
>>> +KVM/ARM VGIC Forwarded Physical Interrupts
>>> +==========================================
>
> [...]
>
>>> +1. KVM runs the VCPU
>>> +2. The guest programs the time to fire in T+100
>>> +4. At T+100 the timer fires and a physical IRQ causes the VM to exit
>>> +5. With interrupts disabled on the CPU, KVM looks at the timer state
>>> + and injects a forwarded physical interrupt because it concludes the
>>> + timer has expired.
>> I don't get how we can trap without the virtual timer PPI handler being
>> entered on host side. Please can you elaborate on this?
>
> On VM exit, we disable the virtual timer (see the code in
> hyp.S::save_timer_state where we clear the enable bit). We still perform
> the exit, but the cause for exit is now gone, and the handler will never
> fire.
OK thanks for the clarification
Eric
>
> Thanks,
>
> M.
>
WARNING: multiple messages have this Message-ID (diff)
From: eric.auger@linaro.org (Eric Auger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 6/8] arm/arm64: KVM: Add forwarded physical interrupts documentation
Date: Tue, 8 Sep 2015 09:44:46 +0200 [thread overview]
Message-ID: <55EE91EE.5070204@linaro.org> (raw)
In-Reply-To: <55EDCE52.1040006@arm.com>
Hi Marc,
On 09/07/2015 07:50 PM, Marc Zyngier wrote:
> On 07/09/15 17:45, Eric Auger wrote:
>> Hi Christoffer,
>> On 09/04/2015 09:40 PM, Christoffer Dall wrote:
>>> Forwarded physical interrupts on arm/arm64 is a tricky concept and the
>>> way we deal with them is not apparently easy to understand by reading
>>> various specs.
>>>
>>> Therefore, add a proper documentation file explaining the flow and
>>> rationale of the behavior of the vgic.
>>>
>>> Some of this text was contributed by Marc Zyngier and edited by me.
>>> Omissions and errors are all mine.
>>>
>>> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
>>> ---
>>> Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt | 181 +++++++++++++++++++++
>>> 1 file changed, 181 insertions(+)
>>> create mode 100644 Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>>
>>> diff --git a/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>> new file mode 100644
>>> index 0000000..24b6f28
>>> --- /dev/null
>>> +++ b/Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt
>>> @@ -0,0 +1,181 @@
>>> +KVM/ARM VGIC Forwarded Physical Interrupts
>>> +==========================================
>
> [...]
>
>>> +1. KVM runs the VCPU
>>> +2. The guest programs the time to fire in T+100
>>> +4. At T+100 the timer fires and a physical IRQ causes the VM to exit
>>> +5. With interrupts disabled on the CPU, KVM looks at the timer state
>>> + and injects a forwarded physical interrupt because it concludes the
>>> + timer has expired.
>> I don't get how we can trap without the virtual timer PPI handler being
>> entered on host side. Please can you elaborate on this?
>
> On VM exit, we disable the virtual timer (see the code in
> hyp.S::save_timer_state where we clear the enable bit). We still perform
> the exit, but the cause for exit is now gone, and the handler will never
> fire.
OK thanks for the clarification
Eric
>
> Thanks,
>
> M.
>
next prev parent reply other threads:[~2015-09-08 7:44 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 19:40 [PATCH v2 0/8] Rework architected timer and forwarded IRQs handling Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 1/8] KVM: Add kvm_arch_vcpu_{un}blocking callbacks Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 2/8] arm/arm64: KVM: arch_timer: Only schedule soft timer on vcpu_block Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-07 15:01 ` Eric Auger
2015-09-07 15:01 ` Eric Auger
2015-09-13 15:56 ` Christoffer Dall
2015-09-13 15:56 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 3/8] arm/arm64: KVM: vgic: Factor out level irq processing on guest exit Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-07 15:32 ` Eric Auger
2015-09-07 15:32 ` Eric Auger
2015-09-14 11:31 ` Christoffer Dall
2015-09-14 11:31 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 4/8] arm/arm64: KVM: Implement GICD_ICFGR as RO for PPIs Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 5/8] arm/arm64: KVM: Use appropriate define in VGIC reset code Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 6/8] arm/arm64: KVM: Add forwarded physical interrupts documentation Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-07 11:25 ` Andre Przywara
2015-09-07 11:25 ` Andre Przywara
2015-09-08 8:43 ` Eric Auger
2015-09-08 8:43 ` Eric Auger
2015-09-08 16:57 ` Andre Przywara
2015-09-08 16:57 ` Andre Przywara
2015-09-09 8:49 ` Christoffer Dall
2015-09-09 8:49 ` Christoffer Dall
2015-09-09 8:57 ` Eric Auger
2015-09-09 8:57 ` Eric Auger
2015-09-11 11:21 ` Andre Przywara
2015-09-11 11:21 ` Andre Przywara
2015-09-14 11:42 ` Christoffer Dall
2015-09-14 11:42 ` Christoffer Dall
2015-09-15 15:16 ` Andre Przywara
2015-09-15 15:16 ` Andre Przywara
2015-09-15 19:09 ` Christoffer Dall
2015-09-15 19:09 ` Christoffer Dall
2015-09-08 14:18 ` Christoffer Dall
2015-09-08 14:18 ` Christoffer Dall
2015-09-07 16:45 ` Eric Auger
2015-09-07 16:45 ` Eric Auger
2015-09-07 17:50 ` Marc Zyngier
2015-09-07 17:50 ` Marc Zyngier
2015-09-08 7:44 ` Eric Auger [this message]
2015-09-08 7:44 ` Eric Auger
2015-09-14 11:46 ` Christoffer Dall
2015-09-14 11:46 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 7/8] arm/arm64: KVM: Rework the arch timer to use level-triggered semantics Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
2015-09-14 9:29 ` Eric Auger
2015-09-14 9:29 ` Eric Auger
2015-09-14 11:48 ` Christoffer Dall
2015-09-14 11:48 ` Christoffer Dall
2015-09-14 15:51 ` Andre Przywara
2015-09-14 15:51 ` Andre Przywara
2015-09-23 17:44 ` Andre Przywara
2015-09-23 17:44 ` Andre Przywara
2015-09-29 14:30 ` Christoffer Dall
2015-09-29 14:30 ` Christoffer Dall
2015-09-04 19:40 ` [PATCH v2 8/8] arm/arm64: KVM: Support edge-triggered forwarded interrupts Christoffer Dall
2015-09-04 19:40 ` Christoffer Dall
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=55EE91EE.5070204@linaro.org \
--to=eric.auger@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
/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.