public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Quentin Perret <qperret@google.com>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com,
	suzuki.poulose@arm.com, yuzenghui@huawei.com,
	catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH v2 8/9] KVM: arm64: Stage-2 huge mappings for np-guests
Date: Thu, 3 Apr 2025 14:21:07 +0000	[thread overview]
Message-ID: <Z-6ZU7DWkxnVIbff@google.com> (raw)
In-Reply-To: <20250306110038.3733649-9-vdonnefort@google.com>

On Thursday 06 Mar 2025 at 11:00:37 (+0000), Vincent Donnefort wrote:
> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> index 1f55b0c7b11d..3143f3b52c93 100644
> --- a/arch/arm64/kvm/mmu.c
> +++ b/arch/arm64/kvm/mmu.c
> @@ -1525,7 +1525,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>  	 * logging_active is guaranteed to never be true for VM_PFNMAP
>  	 * memslots.
>  	 */
> -	if (logging_active || is_protected_kvm_enabled()) {
> +	if (logging_active) {
>  		force_pte = true;
>  		vma_shift = PAGE_SHIFT;
>  	} else {
> @@ -1535,7 +1535,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>  	switch (vma_shift) {
>  #ifndef __PAGETABLE_PMD_FOLDED
>  	case PUD_SHIFT:
> -		if (fault_supports_stage2_huge_mapping(memslot, hva, PUD_SIZE))
> +		if (is_protected_kvm_enabled() ||
> +		    fault_supports_stage2_huge_mapping(memslot, hva, PUD_SIZE))

Should this be

		if (!is_protected_kvm_enabled() &&
		    fault_supports_stage2_huge_mapping(memslot, hva, PUD_SIZE))

instead?

Thanks,
Quentin

  reply	other threads:[~2025-04-03 14:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 11:00 [PATCH v2 0/9] Stage-2 huge mappings for pKVM np-guests Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 1/9] KVM: arm64: Handle huge mappings for np-guest CMOs Vincent Donnefort
2025-04-03 14:24   ` Quentin Perret
2025-03-06 11:00 ` [PATCH v2 2/9] KVM: arm64: Add a range to __pkvm_host_share_guest() Vincent Donnefort
2025-04-03 15:27   ` Quentin Perret
2025-04-04 16:47     ` Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 3/9] KVM: arm64: Add a range to __pkvm_host_unshare_guest() Vincent Donnefort
2025-04-03 15:31   ` Quentin Perret
2025-04-04 17:05     ` Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 4/9] KVM: arm64: Add a range to __pkvm_host_wrprotect_guest() Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 5/9] KVM: arm64: Add a range to __pkvm_host_test_clear_young_guest() Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 6/9] KVM: arm64: Convert pkvm_mappings to interval tree Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 7/9] KVM: arm64: Add a range to pkvm_mappings Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 8/9] KVM: arm64: Stage-2 huge mappings for np-guests Vincent Donnefort
2025-04-03 14:21   ` Quentin Perret [this message]
2025-04-04 17:08     ` Vincent Donnefort
2025-03-06 11:00 ` [PATCH v2 9/9] KVM: arm64: np-guest CMOs with PMD_SIZE fixmap Vincent Donnefort

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=Z-6ZU7DWkxnVIbff@google.com \
    --to=qperret@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=vdonnefort@google.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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