From: Oliver Upton <oliver.upton@linux.dev>
To: Anish Moorthy <amoorthy@google.com>
Cc: seanjc@google.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev,
jthoughton@google.com, rananta@google.com
Subject: Re: [PATCH 2/3] KVM: arm64: Declare support for KVM_CAP_MEMORY_FAULT_INFO
Date: Mon, 5 Aug 2024 22:51:28 +0000 [thread overview]
Message-ID: <ZrFXcHnhXUcjof1U@linux.dev> (raw)
In-Reply-To: <20240802224031.154064-3-amoorthy@google.com>
On Fri, Aug 02, 2024 at 10:40:30PM +0000, Anish Moorthy wrote:
> Although arm64 doesn't currently use memory fault exits anywhere,
> it's still valid to advertise the capability: and a subsequent commit
> will add KVM_EXIT_MEMORY_FAULTs to the stage-2 fault handler
>
> Signed-off-by: Anish Moorthy <amoorthy@google.com>
> ---
> Documentation/virt/kvm/api.rst | 2 +-
> arch/arm64/kvm/arm.c | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 8e5dad80b337..49c504b12688 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -8128,7 +8128,7 @@ unavailable to host or other VMs.
> 7.34 KVM_CAP_MEMORY_FAULT_INFO
> ------------------------------
<nitpick>
The wording of the cap documentation isn't as relaxed as I'd
anticipated. Perhaps:
The presence of this capability indicates that KVM_RUN *may* fill
kvm_run.memory_fault if ...
IOW, userspace is not guaranteed that the structure is filled for every
'memory fault'.
> -:Architectures: x86
> +:Architectures: x86, arm64
nitpick: alphabetize
> :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
>
> The presence of this capability indicates that KVM_RUN will fill
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index a7ca776b51ec..4121b5a43b9c 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -335,6 +335,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> case KVM_CAP_ARM_SYSTEM_SUSPEND:
> case KVM_CAP_IRQFD_RESAMPLE:
> case KVM_CAP_COUNTER_OFFSET:
> + case KVM_CAP_MEMORY_FAULT_INFO:
> r = 1;
> break;
Please just squash this into the following patch. Introducing the
capability without the implied functionality doesn't make a lot of
sense.
--
Thanks,
Oliver
next prev parent reply other threads:[~2024-08-05 22:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 22:40 [PATCH 0/3] Set up KVM_EXIT_MEMORY_FAULTs when arm64/x86 stage-2 fault handlers fail Anish Moorthy
2024-08-02 22:40 ` [PATCH 1/3] KVM: x86: Do a KVM_MEMORY_FAULT EXIT when stage-2 fault handler EFAULTs Anish Moorthy
2024-08-02 22:40 ` [PATCH 2/3] KVM: arm64: Declare support for KVM_CAP_MEMORY_FAULT_INFO Anish Moorthy
2024-08-05 22:51 ` Oliver Upton [this message]
2024-08-06 18:14 ` Anish Moorthy
2024-08-06 19:44 ` Oliver Upton
2024-08-07 14:15 ` Sean Christopherson
2024-08-09 17:57 ` Oliver Upton
2024-08-02 22:40 ` [PATCH 3/3] KVM: arm64: Do a KVM_EXIT_MEMORY_FAULT when stage-2 fault handler EFAULTs Anish Moorthy
2024-08-05 23:02 ` Oliver Upton
2024-08-06 18:44 ` Anish Moorthy
2024-08-06 20:03 ` Oliver Upton
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=ZrFXcHnhXUcjof1U@linux.dev \
--to=oliver.upton@linux.dev \
--cc=amoorthy@google.com \
--cc=jthoughton@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=rananta@google.com \
--cc=seanjc@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox