From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: kvm-ppc@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
David Gibson <david@gibson.dropbear.id.au>,
kvm@vger.kernel.org,
Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/3] KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU identifier
Date: Mon, 20 May 2019 11:23:43 +0200 [thread overview]
Message-ID: <20190520112343.7e724abb@bahia.lan> (raw)
In-Reply-To: <20190520071514.9308-4-clg@kaod.org>
On Mon, 20 May 2019 09:15:14 +0200
Cédric Le Goater <clg@kaod.org> wrote:
> When a vCPU is connected to the KVM device, it is done using its vCPU
> identifier in the guest. Fix the enforced limit on the vCPU identifier
> by taking into account the SMT mode.
>
Reviewed-by: Greg Kurz <groug@kaod.org>
> Reported-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> Tested-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> arch/powerpc/kvm/book3s_xive_native.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3s_xive_native.c
> index 3fdea6bf4e97..25b6b0e2d02a 100644
> --- a/arch/powerpc/kvm/book3s_xive_native.c
> +++ b/arch/powerpc/kvm/book3s_xive_native.c
> @@ -109,7 +109,7 @@ int kvmppc_xive_native_connect_vcpu(struct kvm_device *dev,
> return -EPERM;
> if (vcpu->arch.irq_type != KVMPPC_IRQ_DEFAULT)
> return -EBUSY;
> - if (server_num >= KVM_MAX_VCPUS) {
> + if (server_num >= (KVM_MAX_VCPUS * vcpu->kvm->arch.emul_smt_mode)) {
> pr_devel("Out of bounds !\n");
> return -EINVAL;
> }
next prev parent reply other threads:[~2019-05-20 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 7:15 [PATCH 0/3] KVM: PPC: Book3S HV: XIVE: assorted fixes on vCPU and RAM limits Cédric Le Goater
2019-05-20 7:15 ` [PATCH 1/3] KVM: PPC: Book3S HV: XIVE: clear file mapping when device is released Cédric Le Goater
2019-05-20 7:15 ` [PATCH 2/3] KVM: PPC: Book3S HV: XIVE: do not test the EQ flag validity when resetting Cédric Le Goater
2019-05-20 8:06 ` Greg Kurz
2019-05-20 7:15 ` [PATCH 3/3] KVM: PPC: Book3S HV: XIVE: fix the enforced limit on the vCPU identifier Cédric Le Goater
2019-05-20 9:23 ` Greg Kurz [this message]
2019-05-22 23:30 ` [PATCH 0/3] KVM: PPC: Book3S HV: XIVE: assorted fixes on vCPU and RAM limits David Gibson
2019-05-23 6:01 ` Greg Kurz
2019-05-23 6:27 ` David Gibson
2019-05-23 12:44 ` Greg Kurz
2019-05-23 6:06 ` Cédric Le Goater
2019-05-31 6:33 ` Paul Mackerras
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=20190520112343.7e724abb@bahia.lan \
--to=groug@kaod.org \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.org \
--cc=sathnaga@linux.vnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox