From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
shan.gavin@gmail.com, will@kernel.org,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFCv2 9/9] arm64: Support async page fault
Date: Sun, 31 May 2020 13:44:40 +0100 [thread overview]
Message-ID: <4337cca152df47c93d96e092189a0e36@kernel.org> (raw)
In-Reply-To: <d0bfb944-b50a-608a-7dcc-5a409cdc4524@redhat.com>
On 2020-05-29 12:11, Paolo Bonzini wrote:
> On 29/05/20 11:41, Marc Zyngier wrote:
>>>>
>>>>
>>>> For x86 the advantage is that the processor can take care of raising
>>>> the
>>>> stage2 page fault in the guest, so it's faster.
>>>>
>>> I think there might be too much overhead if the page can be populated
>>> quickly by host. For example, it's fast to populate the pages if
>>> swapin
>>> isn't involved.
>
> Those would still be handled by the host. Only those that are not
> present in the host (which you can see through the MMU notifier) would
> be routed to the guest. You can do things differently between "not
> present fault because the page table does not exist" and "not present
> fault because the page is missing in the host".
>
>>> If I'm correct enough, it seems arm64 doesn't have similar mechanism,
>>> routing stage2 page fault to guest.
>>
>> Indeed, this isn't a thing on arm64. Exception caused by a S2 fault
>> are
>> always routed to EL2.
>
> Is there an ARM-approved way to reuse the S2 fault syndromes to detect
> async page faults?
It would mean being able to set an ESR_EL2 register value into ESR_EL1,
and there is nothing in the architecture that would allow that, with
the exception of nested virt: a VHE guest hypervisor running at EL1
must be able to observe S2 faults for its own S2, as synthesized by
the host hypervisor.
The trouble is that:
- there is so far no commercially available CPU supporting NV
- even if you could get hold of such a machine, there is no
guarantee that such "EL2 syndrome at EL1" is valid outside of
the nested context
- this doesn't solve the issue for non-NV CPUs anyway
> (By the way, another "modern" use for async page faults is for postcopy
> live migration).
Right. That's definitely a more interesting version of "swap-in".
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gavin Shan <gshan@redhat.com>,
catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
shan.gavin@gmail.com, will@kernel.org,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFCv2 9/9] arm64: Support async page fault
Date: Sun, 31 May 2020 13:44:40 +0100 [thread overview]
Message-ID: <4337cca152df47c93d96e092189a0e36@kernel.org> (raw)
In-Reply-To: <d0bfb944-b50a-608a-7dcc-5a409cdc4524@redhat.com>
On 2020-05-29 12:11, Paolo Bonzini wrote:
> On 29/05/20 11:41, Marc Zyngier wrote:
>>>>
>>>>
>>>> For x86 the advantage is that the processor can take care of raising
>>>> the
>>>> stage2 page fault in the guest, so it's faster.
>>>>
>>> I think there might be too much overhead if the page can be populated
>>> quickly by host. For example, it's fast to populate the pages if
>>> swapin
>>> isn't involved.
>
> Those would still be handled by the host. Only those that are not
> present in the host (which you can see through the MMU notifier) would
> be routed to the guest. You can do things differently between "not
> present fault because the page table does not exist" and "not present
> fault because the page is missing in the host".
>
>>> If I'm correct enough, it seems arm64 doesn't have similar mechanism,
>>> routing stage2 page fault to guest.
>>
>> Indeed, this isn't a thing on arm64. Exception caused by a S2 fault
>> are
>> always routed to EL2.
>
> Is there an ARM-approved way to reuse the S2 fault syndromes to detect
> async page faults?
It would mean being able to set an ESR_EL2 register value into ESR_EL1,
and there is nothing in the architecture that would allow that, with
the exception of nested virt: a VHE guest hypervisor running at EL1
must be able to observe S2 faults for its own S2, as synthesized by
the host hypervisor.
The trouble is that:
- there is so far no commercially available CPU supporting NV
- even if you could get hold of such a machine, there is no
guarantee that such "EL2 syndrome at EL1" is valid outside of
the nested context
- this doesn't solve the issue for non-NV CPUs anyway
> (By the way, another "modern" use for async page faults is for postcopy
> live migration).
Right. That's definitely a more interesting version of "swap-in".
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gavin Shan <gshan@redhat.com>,
kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org,
shan.gavin@gmail.com, catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFCv2 9/9] arm64: Support async page fault
Date: Sun, 31 May 2020 13:44:40 +0100 [thread overview]
Message-ID: <4337cca152df47c93d96e092189a0e36@kernel.org> (raw)
In-Reply-To: <d0bfb944-b50a-608a-7dcc-5a409cdc4524@redhat.com>
On 2020-05-29 12:11, Paolo Bonzini wrote:
> On 29/05/20 11:41, Marc Zyngier wrote:
>>>>
>>>>
>>>> For x86 the advantage is that the processor can take care of raising
>>>> the
>>>> stage2 page fault in the guest, so it's faster.
>>>>
>>> I think there might be too much overhead if the page can be populated
>>> quickly by host. For example, it's fast to populate the pages if
>>> swapin
>>> isn't involved.
>
> Those would still be handled by the host. Only those that are not
> present in the host (which you can see through the MMU notifier) would
> be routed to the guest. You can do things differently between "not
> present fault because the page table does not exist" and "not present
> fault because the page is missing in the host".
>
>>> If I'm correct enough, it seems arm64 doesn't have similar mechanism,
>>> routing stage2 page fault to guest.
>>
>> Indeed, this isn't a thing on arm64. Exception caused by a S2 fault
>> are
>> always routed to EL2.
>
> Is there an ARM-approved way to reuse the S2 fault syndromes to detect
> async page faults?
It would mean being able to set an ESR_EL2 register value into ESR_EL1,
and there is nothing in the architecture that would allow that, with
the exception of nested virt: a VHE guest hypervisor running at EL1
must be able to observe S2 faults for its own S2, as synthesized by
the host hypervisor.
The trouble is that:
- there is so far no commercially available CPU supporting NV
- even if you could get hold of such a machine, there is no
guarantee that such "EL2 syndrome at EL1" is valid outside of
the nested context
- this doesn't solve the issue for non-NV CPUs anyway
> (By the way, another "modern" use for async page faults is for postcopy
> live migration).
Right. That's definitely a more interesting version of "swap-in".
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2020-05-31 12:44 UTC|newest]
Thread overview: 123+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 3:29 [PATCH RFCv2 0/9] kvm/arm64: Support Async Page Fault Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 1/9] arm64: Probe for the presence of KVM hypervisor services during boot Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 3/9] kvm/arm64: Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 10:42 ` Mark Rutland
2020-05-26 10:42 ` Mark Rutland
2020-05-26 10:42 ` Mark Rutland
2020-05-27 2:43 ` Gavin Shan
2020-05-27 2:43 ` Gavin Shan
2020-05-27 2:43 ` Gavin Shan
2020-05-27 7:20 ` Marc Zyngier
2020-05-27 7:20 ` Marc Zyngier
2020-05-27 7:20 ` Marc Zyngier
2020-05-28 6:34 ` Gavin Shan
2020-05-28 6:34 ` Gavin Shan
2020-05-28 6:34 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 4/9] kvm/arm64: Detach ESR operator from vCPU struct Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 10:51 ` Mark Rutland
2020-05-26 10:51 ` Mark Rutland
2020-05-26 10:51 ` Mark Rutland
2020-05-27 2:55 ` Gavin Shan
2020-05-27 2:55 ` Gavin Shan
2020-05-27 2:55 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 5/9] kvm/arm64: Replace hsr with esr Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 10:45 ` Mark Rutland
2020-05-26 10:45 ` Mark Rutland
2020-05-26 10:45 ` Mark Rutland
2020-05-27 2:56 ` Gavin Shan
2020-05-27 2:56 ` Gavin Shan
2020-05-27 2:56 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 6/9] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 10:58 ` Mark Rutland
2020-05-26 10:58 ` Mark Rutland
2020-05-26 10:58 ` Mark Rutland
2020-05-27 3:01 ` Gavin Shan
2020-05-27 3:01 ` Gavin Shan
2020-05-27 3:01 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 7/9] kvm/arm64: Support async page fault Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 12:34 ` Mark Rutland
2020-05-26 12:34 ` Mark Rutland
2020-05-26 12:34 ` Mark Rutland
2020-05-27 4:05 ` Gavin Shan
2020-05-27 4:05 ` Gavin Shan
2020-05-27 4:05 ` Gavin Shan
2020-05-27 7:37 ` Marc Zyngier
2020-05-27 7:37 ` Marc Zyngier
2020-05-27 7:37 ` Marc Zyngier
2020-05-28 6:32 ` Gavin Shan
2020-05-28 6:32 ` Gavin Shan
2020-05-28 6:32 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 8/9] kernel/sched: Add cpu_rq_is_locked() Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` [PATCH RFCv2 9/9] arm64: Support async page fault Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-08 3:29 ` Gavin Shan
2020-05-26 12:56 ` Mark Rutland
2020-05-26 12:56 ` Mark Rutland
2020-05-26 12:56 ` Mark Rutland
2020-05-27 6:48 ` Paolo Bonzini
2020-05-27 6:48 ` Paolo Bonzini
2020-05-27 6:48 ` Paolo Bonzini
2020-05-28 6:14 ` Gavin Shan
2020-05-28 6:14 ` Gavin Shan
2020-05-28 6:14 ` Gavin Shan
2020-05-28 7:03 ` Marc Zyngier
2020-05-28 7:03 ` Marc Zyngier
2020-05-28 7:03 ` Marc Zyngier
2020-05-28 10:53 ` Paolo Bonzini
2020-05-28 10:53 ` Paolo Bonzini
2020-05-28 10:53 ` Paolo Bonzini
2020-05-28 10:48 ` Paolo Bonzini
2020-05-28 10:48 ` Paolo Bonzini
2020-05-28 10:48 ` Paolo Bonzini
2020-05-28 23:02 ` Gavin Shan
2020-05-28 23:02 ` Gavin Shan
2020-05-28 23:02 ` Gavin Shan
2020-05-29 9:41 ` Marc Zyngier
2020-05-29 9:41 ` Marc Zyngier
2020-05-29 9:41 ` Marc Zyngier
2020-05-29 11:11 ` Paolo Bonzini
2020-05-29 11:11 ` Paolo Bonzini
2020-05-29 11:11 ` Paolo Bonzini
2020-05-31 12:44 ` Marc Zyngier [this message]
2020-05-31 12:44 ` Marc Zyngier
2020-05-31 12:44 ` Marc Zyngier
2020-06-01 9:21 ` Paolo Bonzini
2020-06-01 9:21 ` Paolo Bonzini
2020-06-01 9:21 ` Paolo Bonzini
2020-06-02 5:44 ` Gavin Shan
2020-06-02 5:44 ` Gavin Shan
2020-06-02 5:44 ` Gavin Shan
2020-05-25 23:39 ` [PATCH RFCv2 0/9] kvm/arm64: Support Async Page Fault Gavin Shan
2020-05-25 23:39 ` Gavin Shan
2020-05-25 23:39 ` Gavin Shan
2020-05-26 13:09 ` Mark Rutland
2020-05-26 13:09 ` Mark Rutland
2020-05-26 13:09 ` Mark Rutland
2020-05-27 2:39 ` Gavin Shan
2020-05-27 2:39 ` Gavin Shan
2020-05-27 2:39 ` Gavin Shan
2020-05-27 7:48 ` Marc Zyngier
2020-05-27 7:48 ` Marc Zyngier
2020-05-27 7:48 ` Marc Zyngier
2020-05-27 16:10 ` Paolo Bonzini
2020-05-27 16:10 ` Paolo Bonzini
2020-05-27 16:10 ` Paolo Bonzini
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=4337cca152df47c93d96e092189a0e36@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=shan.gavin@gmail.com \
--cc=will@kernel.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.