From: James Morse <james.morse@arm.com>
To: Gavin Shan <gshan@redhat.com>, kvmarm@lists.cs.columbia.edu
Cc: maz@kernel.org, will@kernel.org, shan.gavin@gmail.com,
pbonzini@redhat.com
Subject: Re: [PATCH 3/6] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode
Date: Fri, 23 Oct 2020 17:54:47 +0100 [thread overview]
Message-ID: <43da773d-a218-ffb4-5648-19cc771c55e8@arm.com> (raw)
In-Reply-To: <20200818011319.91777-4-gshan@redhat.com>
Hi Gavin,
On 18/08/2020 02:13, Gavin Shan wrote:
> This renames user_mem_abort() to kvm_handle_user_mem_abort(), and
> then exports it. The function will be used in asynchronous page fault
> to populate a page table entry once the corresponding page is populated
> from the backup device (e.g. swap partition):
>
> * Parameter @fault_status is replace by @esr.
> * Parameter @prefault is added
>
> As the @esr is passed as parameter, not fetched from vCPU struct. This
> also introduces the necessasry helpers in esr.h, to manupulate the @esr.
(Nit: necessary, manipulate)
> The helpers defined in kvm_emulate.h reuses the newly added helper. This
> shouldn't cause functional changes.
user_mem_abort() is deep in the the guts of KVM's arch code. I don't think this should be
exported. It must be called on the vcpu thread. It must be called under the VMs srcu
lock. There are also tricky interactions with whether the vcpu is loaded on this cpu or not...
I think it would be much simpler to always let the guest take the stage2-fault a second
time. This keeps the property that pages are only populate in response to a stage2 fault.
If the guest behaves, it will only schedule a task that accesses the page once its available.
Thanks,
James
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2020-10-23 16:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 1:13 [PATCH 0/6] Support Asynchronous Page Fault Gavin Shan
2020-08-18 1:13 ` [PATCH 1/6] arm64: Probe for the presence of KVM hypervisor services during boot Gavin Shan
2020-08-18 1:13 ` [PATCH 2/6] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC Gavin Shan
2020-08-18 1:13 ` [PATCH 3/6] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode Gavin Shan
2020-10-23 16:54 ` James Morse [this message]
2020-11-02 5:30 ` Gavin Shan
2020-08-18 1:13 ` [PATCH 4/6] arm64/kvm: Support async page fault Gavin Shan
2020-10-23 17:01 ` James Morse
2020-11-02 7:19 ` Gavin Shan
2020-08-18 1:13 ` [PATCH 5/6] drivers/acpi: Import ACPI APF table Gavin Shan
2020-10-23 16:55 ` James Morse
2020-08-18 1:13 ` [PATCH 6/6] arm64/kernel: Support async page fault Gavin Shan
2020-10-23 16:54 ` [PATCH 0/6] Support Asynchronous Page Fault James Morse
2020-10-31 14:18 ` Paolo Bonzini
2020-11-02 5:23 ` Gavin Shan
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=43da773d-a218-ffb4-5648-19cc771c55e8@arm.com \
--to=james.morse@arm.com \
--cc=gshan@redhat.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox