[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0hp9a4z.fsf@mail.lhotse>
Date: Tue, 06 Feb 2024 21:09:48 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Amit Machhiwal <amachhiw@...ux.ibm.com>, linuxppc-dev@...ts.ozlabs.org,
kvm@...r.kernel.org, kvm-ppc@...r.kernel.org
Cc: Vaibhav Jain <vaibhav@...ux.ibm.com>, Nicholas Piggin
<npiggin@...il.com>, Jordan Niethe <jniethe5@...il.com>, Vaidyanathan
Srinivasan <svaidy@...ux.ibm.com>, "Aneesh Kumar K . V"
<aneesh.kumar@...nel.org>, "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, Amit Machhiwal
<amachhiw@...ux.ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] KVM: PPC: Book3S HV: Fix L2 guest reboot failure due
to empty 'arch_compat'
Hi Amit,
One comment below ...
Amit Machhiwal <amachhiw@...ux.ibm.com> writes:
> Currently, rebooting a pseries nested qemu-kvm guest (L2) results in
> below error as L1 qemu sends PVR value 'arch_compat' == 0 via
> ppc_set_compat ioctl. This triggers a condition failure in
> kvmppc_set_arch_compat() resulting in an EINVAL.
..
>
> diff --git a/arch/powerpc/kvm/book3s_hv_nestedv2.c b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> index 5378eb40b162..6042bdc70230 100644
> --- a/arch/powerpc/kvm/book3s_hv_nestedv2.c
> +++ b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> @@ -347,8 +348,26 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb,
> break;
> }
> case KVMPPC_GSID_LOGICAL_PVR:
> - rc = kvmppc_gse_put_u32(gsb, iden,
> - vcpu->arch.vcore->arch_compat);
> + /*
> + * Though 'arch_compat == 0' would mean the default
> + * compatibility, arch_compat, being a Guest Wide
> + * Element, cannot be filled with a value of 0 in GSB
> + * as this would result into a kernel trap.
> + * Hence, when `arch_compat == 0`, arch_compat should
> + * default to L1's PVR.
> + *
> + * Rework this when PowerVM supports a value of 0
> + * for arch_compat for KVM API v2.
> + */
Is there an actual plan that PowerVM will support this in future?
If so, how will a future kernel know that it's running on a version of
PowerVM that does support arch_compat == 0?
Similarly how will we know when it's OK to drop support for this
workaround?
cheers
Powered by blists - more mailing lists