Skip to contentSkip to conversation

linux-next: build failure after merge of the kvm tree

PATCH Stephen Rothwell 3 participants 6 messages Apr 19, 2022 – Apr 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the kvm tree, today's linux-next build (arm64 defconfig) failed like this:

arch/arm64/kvm/psci.c: In function 'kvm_prepare_system_event':
arch/arm64/kvm/psci.c:184:32: error: 'struct <anonymous>' has no member named 'flags'
184 | vcpu->run->system_event.flags = flags;
| ^

Caused by commit

c24a950ec7d6 ("KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES")

In this commit, the uapi structure changes do not match the documentation changes :-( Does it matter that the ABI may be changed by this commit (depending on the alignment of the structure members)?

I have added the following patch or today:

From: Stephen Rothwell <[email protected]>
Date: Tue, 19 Apr 2022 15:25:17 +1000
Subject: [PATCH] fix up for "KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES"

---
 include/uapi/linux/kvm.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/kvm.h +1 -0
index dd1d8167e71f..68ce07185f03 100644
@@ -448,6 +448,7 @@ struct kvm_run {
 #define KVM_SYSTEM_EVENT_NDATA_VALID    (1u << 31)
 			__u32 type;
 			__u32 ndata;
+			__u64 flags;
 			__u64 data[16];
 		} system_event;
 		/* KVM_EXIT_S390_STSI */
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the kvm tree, today's linux-next build (arm64 defconfig) failed like this:

arch/arm64/kvm/psci.c: In function 'kvm_prepare_system_event':
arch/arm64/kvm/psci.c:184:32: error: 'struct <anonymous>' has no member named 'flags'
184 | vcpu->run->system_event.flags = flags;
| ^

Quoted 7 lines

Caused by commit

c24a950ec7d6 ("KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES")

In this commit, the uapi structure changes do not match the documentation changes :-( Does it matter that the ABI may be changed by this commit (depending on the alignment of the structure members)?

Yeah, it's a bit of mess. I believe we have a way out, waiting on Paolo to weigh in.

https://lore.kernel.org/all/[email protected]

maintainer
#2 lore raw
Quoted 7 lines · Sean Christopherson
Quoted 3 lines

In this commit, the uapi structure changes do not match the documentation
changes:-( Does it matter that the ABI may be changed by this commit
(depending on the alignment of the structure members)?

Yeah, it's a bit of mess. I believe we have a way out, waiting on Paolo to weigh in.

https://lore.kernel.org/all/[email protected]

I'll get to it tomorrow morning.

Paolo

#4 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 42 lines · On Tue, 19 Apr 2022 15:34:23 +1000 Stephen Rothwell <[email protected]>…

After merging the kvm tree, today's linux-next build (arm64 defconfig) failed like this:

arch/arm64/kvm/psci.c: In function 'kvm_prepare_system_event':
arch/arm64/kvm/psci.c:184:32: error: 'struct <anonymous>' has no member named 'flags'
184 | vcpu->run->system_event.flags = flags;
| ^

Caused by commit

c24a950ec7d6 ("KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES")

In this commit, the uapi structure changes do not match the documentation changes :-( Does it matter that the ABI may be changed by this commit (depending on the alignment of the structure members)?

I have added the following patch or today:

From: Stephen Rothwell <[email protected]>
Date: Tue, 19 Apr 2022 15:25:17 +1000
Subject: [PATCH] fix up for "KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES"

---
 include/uapi/linux/kvm.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/kvm.h +1 -0
index dd1d8167e71f..68ce07185f03 100644
@@ -448,6 +448,7 @@ struct kvm_run {
 #define KVM_SYSTEM_EVENT_NDATA_VALID    (1u << 31)
 			__u32 type;
 			__u32 ndata;
+			__u64 flags;
 			__u64 data[16];
 		} system_event;
 		/* KVM_EXIT_S390_STSI */
Signature · 1 line
2.35.1

I am still applying the above patch.

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#5 lore raw
Quoted 10 lines · Stephen Rothwell
Quoted 9 lines
  #define KVM_SYSTEM_EVENT_NDATA_VALID    (1u << 31)
  			__u32 type;
  			__u32 ndata;
include/uapi/linux/kvm.h +1 -0
+			__u64 flags;
  			__u64 data[16];
  		} system_event;
  		/* KVM_EXIT_S390_STSI */
Signature · 1 line
2.35.1

I am still applying the above patch.

I am waiting for review of https://lore.kernel.org/kvm/[email protected]/T/.

Paolo