All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: James Morse <james.morse@arm.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	Quentin Perret <qperret@google.com>,
	Will Deacon <will@kernel.org>, Reiji Watanabe <reijiw@google.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH 3/5] KVM: arm64: Only return attributes from stage2_update_leaf_attrs()
Date: Tue, 07 Feb 2023 14:56:49 +0000	[thread overview]
Message-ID: <86r0v1zfpq.wl-maz@kernel.org> (raw)
In-Reply-To: <Y9w0ZYVXRgpTKuFD@google.com>

On Thu, 02 Feb 2023 22:08:37 +0000,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> On Wed, Jan 11, 2023 at 05:21:13PM +0000, Oliver Upton wrote:
> > Hey Marc,
> > 
> > On Wed, Jan 11, 2023 at 08:52:25AM +0000, Marc Zyngier wrote:
> > > [+ Suzuki and Zenghui who are missing from the Cc list]
> > 
> > Doh! Just switched over to working out of a new git tree and didn't move
> > over my cc-cmd. Apologies to you two.
> > 
> > > On Wed, 11 Jan 2023 00:02:58 +0000,
> > > Oliver Upton <oliver.upton@linux.dev> wrote:
> > > > 
> > > > Returning a single PTE from stage2_update_leaf_attrs() doesn't make a
> > > > great deal of sense given that the function could be used to apply a
> > > > change to a range of PTEs. Instead, return a bitwise OR of attributes
> > > > from all the visited PTEs.
> > > 
> > > I find this amalgamation of attributes quite confusing, and I have a
> > > hard time attaching semantics to the resulting collection of bits.
> > > 
> > > It also means that you cannot reason about a particular attribute
> > > being 0 if any of the neighbour PTEs has this bit set.
> > 
> > Very true. What I had really wanted to do was make a walker that allows
> > software to check the state of specific attribute bit(s) within a range
> > of memory instead of returning all of them. I decided against it because
> > it would put more churn on other callers or require a new walker
> > entirely.
> > 
> > Anyway, I can go about that change to make this a bit easier to reason
> > about. Thoughts?
> 
> LOL, I thought I hadn't replied which is why I didn't hear anything
> back. Ball is in your court, Marc, any thoughts?

Huh, I clearly missed that email. Sorry about the delay.

Having a separate walker doesn't strike me as unreasonable. This
clearly is something different from the existing walkers, and it is
bound to be very little code anyway.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: James Morse <james.morse@arm.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	Quentin Perret <qperret@google.com>,
	Will Deacon <will@kernel.org>, Reiji Watanabe <reijiw@google.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH 3/5] KVM: arm64: Only return attributes from stage2_update_leaf_attrs()
Date: Tue, 07 Feb 2023 14:56:49 +0000	[thread overview]
Message-ID: <86r0v1zfpq.wl-maz@kernel.org> (raw)
In-Reply-To: <Y9w0ZYVXRgpTKuFD@google.com>

On Thu, 02 Feb 2023 22:08:37 +0000,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> On Wed, Jan 11, 2023 at 05:21:13PM +0000, Oliver Upton wrote:
> > Hey Marc,
> > 
> > On Wed, Jan 11, 2023 at 08:52:25AM +0000, Marc Zyngier wrote:
> > > [+ Suzuki and Zenghui who are missing from the Cc list]
> > 
> > Doh! Just switched over to working out of a new git tree and didn't move
> > over my cc-cmd. Apologies to you two.
> > 
> > > On Wed, 11 Jan 2023 00:02:58 +0000,
> > > Oliver Upton <oliver.upton@linux.dev> wrote:
> > > > 
> > > > Returning a single PTE from stage2_update_leaf_attrs() doesn't make a
> > > > great deal of sense given that the function could be used to apply a
> > > > change to a range of PTEs. Instead, return a bitwise OR of attributes
> > > > from all the visited PTEs.
> > > 
> > > I find this amalgamation of attributes quite confusing, and I have a
> > > hard time attaching semantics to the resulting collection of bits.
> > > 
> > > It also means that you cannot reason about a particular attribute
> > > being 0 if any of the neighbour PTEs has this bit set.
> > 
> > Very true. What I had really wanted to do was make a walker that allows
> > software to check the state of specific attribute bit(s) within a range
> > of memory instead of returning all of them. I decided against it because
> > it would put more churn on other callers or require a new walker
> > entirely.
> > 
> > Anyway, I can go about that change to make this a bit easier to reason
> > about. Thoughts?
> 
> LOL, I thought I hadn't replied which is why I didn't hear anything
> back. Ball is in your court, Marc, any thoughts?

Huh, I clearly missed that email. Sorry about the delay.

Having a separate walker doesn't strike me as unreasonable. This
clearly is something different from the existing walkers, and it is
bound to be very little code anyway.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
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-07 14:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  0:02 [PATCH 0/5] KVM: arm64: Handle unaligned memslots in kvm_(test_)_age_gfn() Oliver Upton
2023-01-11  0:02 ` Oliver Upton
2023-01-11  0:02 ` [PATCH 1/5] KVM: arm64: Hoist S2 PTE definitions into kvm_pgtable.h Oliver Upton
2023-01-11  0:02   ` Oliver Upton
2023-01-11  0:02 ` [PATCH 2/5] KVM: arm64: Add a mask for all leaf PTE attributes Oliver Upton
2023-01-11  0:02   ` Oliver Upton
2023-01-11  0:02 ` [PATCH 3/5] KVM: arm64: Only return attributes from stage2_update_leaf_attrs() Oliver Upton
2023-01-11  0:02   ` Oliver Upton
2023-01-11  8:52   ` Marc Zyngier
2023-01-11  8:52     ` Marc Zyngier
2023-01-11 17:21     ` Oliver Upton
2023-01-11 17:21       ` Oliver Upton
2023-02-02 22:08       ` Oliver Upton
2023-02-02 22:08         ` Oliver Upton
2023-02-07 14:56         ` Marc Zyngier [this message]
2023-02-07 14:56           ` Marc Zyngier
2023-01-11  0:02 ` [PATCH 4/5] KVM: arm64: Correctly handle page aging notifiers for unaligned memlsot Oliver Upton
2023-01-11  0:02   ` Oliver Upton
2023-01-12 15:44   ` Marc Zyngier
2023-01-12 15:44     ` Marc Zyngier
2023-01-11  0:03 ` [PATCH 5/5] KVM: arm64: Consistently use KVM's types/helpers in kvm_age_gfn() Oliver Upton
2023-01-11  0: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=86r0v1zfpq.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=qperret@google.com \
    --cc=reijiw@google.com \
    --cc=suzuki.poulose@arm.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 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.