Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1014596pxb; Thu, 9 Sep 2021 18:02:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpUB/nGcR2t/WAwiR8qNwcEjbRecT3I/fj+NQUkD2LK0Y3lWbTUFEGO4TyCttQDAJueMzk X-Received: by 2002:a05:6402:cab:: with SMTP id cn11mr6252521edb.293.1631235759969; Thu, 09 Sep 2021 18:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235759; cv=none; d=google.com; s=arc-20160816; b=zusGX7SNiUtvCixf8+/j33fAMberUc2gTJwEmjuxAKDfG2HEM6pbgmHvqBJ67fzd1B 3/G2y53qi8saxcJXlH8b6o9YMGqCk5W+mSs05O4XJTjsnHVB4UyxCMbBTsFmoXX7/WIj /XqGear6mpvYLRRRS0TRmM72DDabt7LOWoOuIbS9t4C50uhoXb0Bdny9gGg1OCPCWsaR pZssKKEU1QwLzDapcEunPHphAR8JWA/aZupTwduxf/vsuZN3Spwj4vfh85MULvFoph4Q +/KiH63xNknTv7rOseY/7ycRQXf+DWuObDEfKIWtBooGj1CxBj4bR16PSptFsOn50YWf kHyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a0ArujJUHf0YausSAVTCHHPyFQalfpqLflxjnrDlJps=; b=epzM/5uQr5CkzOuYk+cJDYnRGUGIN/cfqanV31KZomLiJCZV5RLNfFl8IxN6c5Oyx/ LgKhjC8cH36MmQPpRja787PjDh59d7Vji+lMKKZdUptA5Bw+WchqEc3ZLakO/5LbX7tl i0KilBT5K9qo1SaNtCYGrsRdN4Hr52KOXIWeWgqErqdOarZG0e5Bf9rhJlyoB7LKVdqH Oh5umIL3eAcXS4auwGS3ups1akh5lsxRpRteyfPGAENXafPSokNWBDM7VVnm43Wkhdip RiZkplwJQriUW54WVF3bOKC2T30gjY5A0g5o6xAyPOZITafL6pIh1qY/l/7vbSB2il46 t/xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g7v/Ys1m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt5si4004397ejc.247.2021.09.09.18.02.15; Thu, 09 Sep 2021 18:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g7v/Ys1m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232616AbhIJBAh (ORCPT + 99 others); Thu, 9 Sep 2021 21:00:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:48904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234480AbhIJAX2 (ORCPT ); Thu, 9 Sep 2021 20:23:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3262C610A3; Fri, 10 Sep 2021 00:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233338; bh=ntTVX/VG1xsWVQRH3GIMSs5Y7Qxh0tYso/66ecFKUoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g7v/Ys1meHuVS6FZDzRLIbT98vjdpqOdpm/rksTcOtsJBC/Si63Gl6336VO51npmO oJLb2qlo9E8AQrQKW4w+x7xMNilCv4fu5osS8+6L9kCJZt/Nh12+ISm16nhSnK+mU6 pSAVeZqkNxDUvxHEXlvwQXmDlxUr10dF4EJVDoyi1XtSwIc+ypLtWt4iqljhPuF+ZQ tlgBo95ewQ5I1Rs5KivyzhtfSi/AjjboalkSDbDmH/y+t7Xx1+Kma3y/FlwOWYlhFY +KkPXxDT8jqfYQaVVedxGrHsvuypoQc9B45tlbTtT60aqRa4IcxKty5miZuNX3exH/ XPzE6/ozCsWkw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicholas Piggin , Alexey Kardashevskiy , Michael Ellerman , Sasha Levin , kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 26/37] KVM: PPC: Book3S HV: Initialise vcpu MSR with MSR_ME Date: Thu, 9 Sep 2021 20:21:31 -0400 Message-Id: <20210910002143.175731-26-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Piggin [ Upstream commit fd42b7b09c602c904452c0c3e5955ca21d8e387a ] It is possible to create a VCPU without setting the MSR before running it, which results in a warning in kvmhv_vcpu_entry_p9() that MSR_ME is not set. This is pretty harmless because the MSR_ME bit is added to HSRR1 before HRFID to guest, and a normal qemu guest doesn't hit it. Initialise the vcpu MSR with MSR_ME set. Reported-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210811160134.904987-2-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/kvm/book3s_hv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index dc897dff8eb9..4718313eddc9 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2293,6 +2293,7 @@ static struct kvm_vcpu *kvmppc_core_vcpu_create_hv(struct kvm *kvm, spin_lock_init(&vcpu->arch.vpa_update_lock); spin_lock_init(&vcpu->arch.tbacct_lock); vcpu->arch.busy_preempt = TB_NIL; + vcpu->arch.shregs.msr = MSR_ME; vcpu->arch.intr_msr = MSR_SF | MSR_ME; /* -- 2.30.2