public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <tabba@google.com>
Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	james.morse@arm.com, catalin.marinas@arm.com,
	alexandru.elisei@arm.com, oliver.upton@linux.dev,
	suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org,
	reijiw@google.com, ricarkol@google.com, dmatlack@google.com,
	qperret@google.com, bgardon@google.com, gshan@redhat.com,
	peterx@redhat.com, seanjc@google.com
Subject: Re: [PATCH] KVM: arm64: Reload PTE after invoking walker callback on preorder traversal
Date: Mon, 22 May 2023 11:58:05 +0100	[thread overview]
Message-ID: <868rdgljk2.wl-maz@kernel.org> (raw)
In-Reply-To: <86a5xwljzt.wl-maz@kernel.org>

On Mon, 22 May 2023 11:48:38 +0100,
Marc Zyngier <maz@kernel.org> wrote:
> 
> > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
> > index 3d61bd3e591d..120c49d52ca0 100644
> > --- a/arch/arm64/kvm/hyp/pgtable.c
> > +++ b/arch/arm64/kvm/hyp/pgtable.c
> > @@ -207,14 +207,26 @@ static inline int __kvm_pgtable_visit(struct kvm_pgtable_walk_data *data,
> >  		.flags	= flags,
> >  	};
> >  	int ret = 0;
> > +	bool reload = false;
> >  	kvm_pteref_t childp;
> >  	bool table = kvm_pte_table(ctx.old, level);
> >  
> > -	if (table && (ctx.flags & KVM_PGTABLE_WALK_TABLE_PRE))
> > +	if (table && (ctx.flags & KVM_PGTABLE_WALK_TABLE_PRE)) {
> >  		ret = kvm_pgtable_visitor_cb(data, &ctx, KVM_PGTABLE_WALK_TABLE_PRE);
> > +		reload = true;
> > +	}
> >  
> >  	if (!table && (ctx.flags & KVM_PGTABLE_WALK_LEAF)) {
> >  		ret = kvm_pgtable_visitor_cb(data, &ctx, KVM_PGTABLE_WALK_LEAF);
> > +		reload = true;
> > +	}
> 
> From these two clauses, it is clear that reload is always the value of
> (ctx.flags & KVM_PGTABLE_WALK_LEAF). That'd simplify the patch a bit.

OK, it should be obvious by now that I cannot read, because TABLE_PRE and
LEAF are very different things.

Sorry about the noise. I'll fix the trailer thing and stay quiet for
the rest of the day...

	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-05-22 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 10:32 [PATCH] KVM: arm64: Reload PTE after invoking walker callback on preorder traversal Fuad Tabba
2023-05-22 10:48 ` Marc Zyngier
2023-05-22 10:58   ` Marc Zyngier [this message]
2023-05-22 10:59     ` Fuad Tabba
2023-05-24 12:49 ` 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=868rdgljk2.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alexandru.elisei@arm.com \
    --cc=bgardon@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dmatlack@google.com \
    --cc=gshan@redhat.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=peterx@redhat.com \
    --cc=qperret@google.com \
    --cc=reijiw@google.com \
    --cc=ricarkol@google.com \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@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