From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Tejun Heo <tj@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
KVM <kvm@vger.kernel.org>
Cc: Sean Christopherson <seanjc@google.com>,
Vipin Sharma <vipinsh@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the cgroup tree
Date: Thu, 22 Apr 2021 16:31:13 +1000 [thread overview]
Message-ID: <20210422163113.31fdbc9b@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3757 bytes --]
Hi all,
After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:
arch/x86/kvm/svm/sev.c: In function 'sev_asid_new':
arch/x86/kvm/svm/sev.c:118:12: error: invalid type argument of '->' (have 'int')
118 | type = sev->es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
| ^~
In file included from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/svm/sev.c:11:
arch/x86/kvm/svm/sev.c:119:13: error: invalid type argument of '->' (have 'int')
119 | WARN_ON(sev->misc_cg);
| ^~
arch/x86/kvm/svm/sev.c:119:2: note: in expansion of macro 'WARN_ON'
119 | WARN_ON(sev->misc_cg);
| ^~~~~~~
arch/x86/kvm/svm/sev.c:120:5: error: invalid type argument of '->' (have 'int')
120 | sev->misc_cg = get_current_misc_cg();
| ^~
arch/x86/kvm/svm/sev.c:121:36: error: invalid type argument of '->' (have 'int')
121 | ret = misc_cg_try_charge(type, sev->misc_cg, 1);
| ^~
arch/x86/kvm/svm/sev.c:123:18: error: invalid type argument of '->' (have 'int')
123 | put_misc_cg(sev->misc_cg);
| ^~
arch/x86/kvm/svm/sev.c:124:6: error: invalid type argument of '->' (have 'int')
124 | sev->misc_cg = NULL;
| ^~
arch/x86/kvm/svm/sev.c:154:28: error: invalid type argument of '->' (have 'int')
154 | misc_cg_uncharge(type, sev->misc_cg, 1);
| ^~
arch/x86/kvm/svm/sev.c:155:17: error: invalid type argument of '->' (have 'int')
155 | put_misc_cg(sev->misc_cg);
| ^~
arch/x86/kvm/svm/sev.c:156:5: error: invalid type argument of '->' (have 'int')
156 | sev->misc_cg = NULL;
| ^~
Caused by commit
7aef27f0b2a8 ("svm/sev: Register SEV and SEV-ES ASIDs to the misc controller")
interacting with commit
9fa1521daafb ("KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes")
from the kvm tree.
I have applied the following for today, better suggestions welcome.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Apr 2021 16:13:34 +1000
Subject: [PATCH] fixup for "KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/x86/kvm/svm/sev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 5ae091509bb0..3458710a9729 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -109,13 +109,13 @@ static bool __sev_recycle_asids(int min_asid, int max_asid)
return true;
}
-static int sev_asid_new(bool es_active)
+static int sev_asid_new(bool es_active, struct kvm_sev_info *sev)
{
int pos, min_asid, max_asid, ret;
bool retry = true;
enum misc_res_type type;
- type = sev->es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
+ type = es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
WARN_ON(sev->misc_cg);
sev->misc_cg = get_current_misc_cg();
ret = misc_cg_try_charge(type, sev->misc_cg, 1);
@@ -221,7 +221,7 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
if (unlikely(sev->active))
return ret;
- asid = sev_asid_new(es_active);
+ asid = sev_asid_new(es_active, sev);
if (asid < 0)
return ret;
sev->asid = asid;
--
2.30.2
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2021-04-22 6:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 6:31 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-07 3:38 linux-next: build failure after merge of the cgroup tree Stephen Rothwell
2023-12-07 4:18 ` Waiman Long
2023-07-17 1:34 Stephen Rothwell
2023-07-17 6:45 ` Miaohe Lin
2022-10-31 2:23 Stephen Rothwell
2022-10-31 17:52 ` Tejun Heo
2022-09-12 6:18 Stephen Rothwell
2022-09-12 7:38 ` Peter Zijlstra
2022-09-12 18:44 ` Tejun Heo
2022-09-12 22:16 ` Tejun Heo
2022-09-15 10:46 ` Peter Zijlstra
2022-10-10 20:57 ` Stephen Rothwell
2022-10-10 20:59 ` Tejun Heo
2022-08-29 3:29 Stephen Rothwell
2021-05-11 0:51 Stephen Rothwell
2021-05-11 1:10 ` Roman Gushchin
2021-05-11 1:31 ` Tejun Heo
2015-09-25 3:26 Stephen Rothwell
2014-02-26 6:46 Stephen Rothwell
2014-02-26 13:44 ` Tejun Heo
2013-04-29 4:04 Stephen Rothwell
2013-04-29 22:55 ` Tejun Heo
2013-04-30 1:51 ` Benjamin Herrenschmidt
2012-09-14 3:17 Stephen Rothwell
2012-09-14 6:56 ` Daniel Wagner
2012-09-14 17:00 ` Tejun Heo
2012-09-14 18:32 ` Sedat Dilek
2012-09-14 18:34 ` Tejun Heo
2012-09-15 7:55 ` Sedat Dilek
2011-11-25 3:50 Stephen Rothwell
2011-11-27 19:33 ` Tejun Heo
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=20210422163113.31fdbc9b@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tj@kernel.org \
--cc=vipinsh@google.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;
as well as URLs for NNTP newsgroup(s).