From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Amit Machhiwal <amachhiw@linux.ibm.com>
Cc: Amit Machhiwal <amachhiw@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Vaibhav Jain <vaibhav@linux.ibm.com>,
Harsh Prateek Bora <harshpb@linux.ibm.com>,
Anushree Mathur <anushree.mathur@linux.ibm.com>,
Gautam Menghani <gautam@linux.ibm.com>,
Mukesh Kumar Chaurasiya <mkchauras@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Thomas Huth <thuth@redhat.com>,
kvm@vger.kernel.org, stable@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] KVM: PPC: Book3S HV: Validate arch_compat against host compatibility mode
Date: Tue, 16 Jun 2026 17:38:37 +0530 [thread overview]
Message-ID: <a4suelh6.ritesh.list@gmail.com> (raw)
In-Reply-To: <20260616161011.835c90f0-38-amachhiw@linux.ibm.com>
Amit Machhiwal <amachhiw@linux.ibm.com> writes:
>> > diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
>> > index 3449dd2b577d..7472b9522f71 100644
>> > --- a/arch/powerpc/include/asm/reg.h
>> > +++ b/arch/powerpc/include/asm/reg.h
>> > @@ -1356,6 +1356,7 @@
>> > #define PVR_ARCH_300 0x0f000005
>> > #define PVR_ARCH_31 0x0f000006
>> > #define PVR_ARCH_31_P11 0x0f000007
>> > +#define PVR_ARCH_INVALID 0xffffffff
>>
>> Logical processor version is defined as part of the PAPR spec. We should
>> ensure that this invalid PVR is also documented in the PAPR spec.
>>
>> If you have already taken care of that, then please confirm and feel free to add:
>
> Regarding the PAPR specification documentation: The PAPR spec documents
> the valid Processor Version Register (PVR) values for each processor
> generation (POWER8, POWER9, POWER10, POWER11, etc.). However, the
> PVR_ARCH_INVALID value (0xffffffff) introduced in this patch series is a
> KVM implementation detail used internally to mark invalid compatibility
> mode requests - it's not an architectural value that would be defined in
> PAPR itself.
>
> The validation logic and the use of PVR_ARCH_INVALID as a sentinel value
> are documented in the kernel code and commit message.
>
But that still worries me on what if PAPR wants to re-use this value for
some other purpose in future.
BTW, thinking more about it, if we purely want this to be in kernel only,
can we instead add, something like:
bool kpvr_compat; /* Does kernel supports this PVR */
rather than re-using & overloading arch_compat which has values that
comes from PAPR spec?
Thoughts?
-ritesh
next prev parent reply other threads:[~2026-06-16 12:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 5:33 [PATCH v3] KVM: PPC: Book3S HV: Validate arch_compat against host compatibility mode Amit Machhiwal
2026-06-16 9:47 ` Ritesh Harjani
2026-06-16 10:54 ` Amit Machhiwal
2026-06-16 12:08 ` Ritesh Harjani [this message]
2026-06-16 12:59 ` Amit Machhiwal
2026-06-16 13:09 ` Ritesh Harjani
2026-06-16 13:37 ` Amit Machhiwal
2026-06-16 10:19 ` Anushree Mathur
2026-06-16 12:22 ` Gautam Menghani
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=a4suelh6.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=amachhiw@linux.ibm.com \
--cc=anushree.mathur@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=gautam@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mkchauras@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thuth@redhat.com \
--cc=vaibhav@linux.ibm.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.