All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Ryan Roberts <ryan.roberts@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	Catalin Marinas <catalin.marinas@arm.com>,
	kvmarm@lists.linux.dev, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2
Date: Wed, 22 Feb 2023 20:42:37 +0000	[thread overview]
Message-ID: <Y/Z+PfF4Dv/1hi9R@linux.dev> (raw)
In-Reply-To: <e16ec8cd-3b00-0b64-8a44-7cf8f34c771a@arm.com>

Hi Ryan,

On Mon, Feb 20, 2023 at 02:17:30PM +0000, Ryan Roberts wrote:
> Hi Oliver,
> 
> Apologies for having gone quiet on this. I came back to this work today only to
> notice that you sent the below response on the 20th Dec but it did not get
> picked up by my mail client somehow (although I'm sure it was operator error). I
> just spotted it on lore.kernel.org.

Huh, sounds like the arm mail server is not a fan of me... Alex reported
my messages arriving in spam as well. I'll let you decide what that
means about what I have to say :)

> I'm planning to post a second version soon-ish, with all your comments
> addressed. I think everything except the below is pretty clear and straight forward.

Great!

> On 20/12/2022 18:28, Oliver Upton wrote:
> > Ryan, you say that it is possible for hardware to support LPA2 for a
> > single stage of translation. Are you basing that statement on something
> > in the Arm ARM or the fact that there are two different enumerations
> > for stage-1 and stage-2?
> 
> Its based on there being 2 separate enumerations. I've dug into this with our
> architecture folks; while it is clearly possible that the HW (or L0 hyp) to
> present an ID register that says one stage supports LPA2 and the other doesn't,
> the real intention behind having the 2 fields separated out is for an L0 hyp to
> be able to limit the stage2 granule sizes that it advertises to guest
> hypervisors. There are no anticipated use cases where HW or L0 hypervisor might
> want to advertise support for LPA2 in one stage and not the other.

Yep, this is exactly what I was getting at. My impression of the stage-2
enumerations was that they solely exist for choking down the supported
granule size, I was quite surprised to see LPA2 show up in both fields
independently.

> So on that basis, it sounds to me like we should just test for LPA2 support in
> both stages and require both to be supported. That simplifies things
> significantly - I can just use a static key to globally flip between pte
> formats, and a bunch of the noisy refactoring disappears.

Whoever wants to take advantage of split support is welcome to share
their use case and upstream the patches. Otherwise, I think the simpler
approach to enlightening KVM of LPA2 reduces friction on actually
getting the initial enablement done.

-- 
Thanks,
Oliver

WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oliver.upton@linux.dev>
To: Ryan Roberts <ryan.roberts@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	Catalin Marinas <catalin.marinas@arm.com>,
	kvmarm@lists.linux.dev, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2
Date: Wed, 22 Feb 2023 20:42:37 +0000	[thread overview]
Message-ID: <Y/Z+PfF4Dv/1hi9R@linux.dev> (raw)
In-Reply-To: <e16ec8cd-3b00-0b64-8a44-7cf8f34c771a@arm.com>

Hi Ryan,

On Mon, Feb 20, 2023 at 02:17:30PM +0000, Ryan Roberts wrote:
> Hi Oliver,
> 
> Apologies for having gone quiet on this. I came back to this work today only to
> notice that you sent the below response on the 20th Dec but it did not get
> picked up by my mail client somehow (although I'm sure it was operator error). I
> just spotted it on lore.kernel.org.

Huh, sounds like the arm mail server is not a fan of me... Alex reported
my messages arriving in spam as well. I'll let you decide what that
means about what I have to say :)

> I'm planning to post a second version soon-ish, with all your comments
> addressed. I think everything except the below is pretty clear and straight forward.

Great!

> On 20/12/2022 18:28, Oliver Upton wrote:
> > Ryan, you say that it is possible for hardware to support LPA2 for a
> > single stage of translation. Are you basing that statement on something
> > in the Arm ARM or the fact that there are two different enumerations
> > for stage-1 and stage-2?
> 
> Its based on there being 2 separate enumerations. I've dug into this with our
> architecture folks; while it is clearly possible that the HW (or L0 hyp) to
> present an ID register that says one stage supports LPA2 and the other doesn't,
> the real intention behind having the 2 fields separated out is for an L0 hyp to
> be able to limit the stage2 granule sizes that it advertises to guest
> hypervisors. There are no anticipated use cases where HW or L0 hypervisor might
> want to advertise support for LPA2 in one stage and not the other.

Yep, this is exactly what I was getting at. My impression of the stage-2
enumerations was that they solely exist for choking down the supported
granule size, I was quite surprised to see LPA2 show up in both fields
independently.

> So on that basis, it sounds to me like we should just test for LPA2 support in
> both stages and require both to be supported. That simplifies things
> significantly - I can just use a static key to globally flip between pte
> formats, and a bunch of the noisy refactoring disappears.

Whoever wants to take advantage of split support is welcome to share
their use case and upstream the patches. Otherwise, I think the simpler
approach to enlightening KVM of LPA2 reduces friction on actually
getting the initial enablement done.

-- 
Thanks,
Oliver

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-22 20:42 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 13:59 [PATCH v1 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2 Ryan Roberts
2022-12-06 13:59 ` Ryan Roberts
2022-12-06 13:59 ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 01/12] arm64/mm: Add FEAT_LPA2 specific ID_AA64MMFR0.TGRAN[2] Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-14 19:16   ` Oliver Upton
2022-12-14 19:16     ` Oliver Upton
2022-12-14 19:16     ` Oliver Upton
2022-12-15  0:53     ` Oliver Upton
2022-12-15  0:53       ` Oliver Upton
2022-12-15  0:53       ` Oliver Upton
2022-12-06 13:59 ` [PATCH v1 02/12] arm64/mm: Update tlb invalidation routines for FEAT_LPA2 Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 03/12] KVM: arm64: Add new (V)TCR_EL2 field definitions " Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 04/12] KVM: arm64: Plumbing to enable multiple pgtable formats Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 05/12] KVM: arm64: Maintain page-table format info in struct kvm_pgtable Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-19 19:45   ` Oliver Upton
2022-12-19 19:45     ` Oliver Upton
2022-12-19 19:45     ` Oliver Upton
2022-12-06 13:59 ` [PATCH v1 06/12] KVM: arm64: Use LPA2 page-tables for stage2 if HW supports it Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 07/12] KVM: arm64: Use LPA2 page-tables for hyp stage1 " Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 08/12] KVM: arm64: Insert PS field at TCR_EL2 assembly time Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 09/12] KVM: arm64: Convert translation level parameter to s8 Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 10/12] KVM: arm64: Rework logic to en/decode VTCR_EL2.{SL0, SL2} fields Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-20  0:06   ` Oliver Upton
2022-12-20  0:06     ` Oliver Upton
2022-12-20  0:06     ` Oliver Upton
2022-12-20  9:01     ` Ryan Roberts
2022-12-20  9:01       ` Ryan Roberts
2022-12-20  9:01       ` Ryan Roberts
2022-12-20 18:08       ` Oliver Upton
2022-12-20 18:08         ` Oliver Upton
2022-12-20 18:08         ` Oliver Upton
2022-12-06 13:59 ` [PATCH v1 11/12] KVM: arm64: Support upto 5 levels of translation in kvm_pgtable Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59 ` [PATCH v1 12/12] KVM: arm64: Allow guests with >48-bit IPA size on FEAT_LPA2 systems Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-06 13:59   ` Ryan Roberts
2022-12-15  0:52 ` [PATCH v1 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2 Oliver Upton
2022-12-15  0:52   ` Oliver Upton
2022-12-15  0:52   ` Oliver Upton
2022-12-15  9:33   ` Ryan Roberts
2022-12-15  9:33     ` Ryan Roberts
2022-12-15  9:33     ` Ryan Roberts
2022-12-15 18:12     ` Oliver Upton
2022-12-15 18:12       ` Oliver Upton
2022-12-15 18:12       ` Oliver Upton
2022-12-20 18:28       ` Oliver Upton
2022-12-20 18:28         ` Oliver Upton
2022-12-20 18:28         ` Oliver Upton
2023-02-20 14:17         ` Ryan Roberts
2023-02-20 14:17           ` Ryan Roberts
2023-02-22 20:42           ` Oliver Upton [this message]
2023-02-22 20:42             ` Oliver Upton
2023-02-23  9:53             ` Catalin Marinas
2023-02-23  9:53               ` Catalin Marinas
2022-12-15  9:35   ` Marc Zyngier
2022-12-15  9:35     ` Marc Zyngier
2022-12-15  9:35     ` Marc Zyngier
  -- strict thread matches above, loose matches on Subject: below --
2022-12-06 12:06 Ryan Roberts
2022-12-06 12:06 ` Ryan Roberts
2022-12-06 12:06 ` Ryan Roberts
2022-12-06 13:40 ` Marc Zyngier
2022-12-06 13:40   ` Marc Zyngier
2022-12-06 13:40   ` Marc Zyngier

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=Y/Z+PfF4Dv/1hi9R@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=ryan.roberts@arm.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.