diff mbox series

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

Message ID 20220419153423.644c0fa1@canb.auug.org.au (mailing list archive)
State New, archived
Headers show
Series linux-next: build failure after merge of the kvm tree | expand

Commit Message

Stephen Rothwell April 19, 2022, 5:34 a.m. UTC
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 <sfr@canb.auug.org.au>
Date: Tue, 19 Apr 2022 15:25:17 +1000
Subject: [PATCH] fix up for "KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/uapi/linux/kvm.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Sean Christopherson April 19, 2022, 4:01 p.m. UTC | #1
On Tue, Apr 19, 2022, Stephen Rothwell wrote:
> 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)?

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/YlisiF4BU6Uxe+iU@google.com
Paolo Bonzini April 19, 2022, 4:09 p.m. UTC | #2
On 4/19/22 18:01, Sean Christopherson wrote:
>> 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/YlisiF4BU6Uxe+iU@google.com
> 

I'll get to it tomorrow morning.

Paolo
Paolo Bonzini April 21, 2022, 6:06 p.m. UTC | #3
On 4/19/22 18:01, Sean Christopherson wrote:
> 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/YlisiF4BU6Uxe+iU@google.com

Sent out my proposal.  For ARM, it is also binary backwards-compatible 
for 64-bit userspace.

Paolo
Stephen Rothwell April 27, 2022, 3:23 a.m. UTC | #4
Hi all,

On Tue, 19 Apr 2022 15:34:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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 <sfr@canb.auug.org.au>
> Date: Tue, 19 Apr 2022 15:25:17 +1000
> Subject: [PATCH] fix up for "KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  include/uapi/linux/kvm.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index dd1d8167e71f..68ce07185f03 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -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 */
> -- 
> 2.35.1

I am still applying the above patch.
Paolo Bonzini April 27, 2022, 6:06 a.m. UTC | #5
On 4/27/22 05:23, Stephen Rothwell wrote:
>>   #define KVM_SYSTEM_EVENT_NDATA_VALID    (1u << 31)
>>   			__u32 type;
>>   			__u32 ndata;
>> +			__u64 flags;
>>   			__u64 data[16];
>>   		} system_event;
>>   		/* KVM_EXIT_S390_STSI */
>> -- 
>> 2.35.1
> I am still applying the above patch.

I am waiting for review of 
https://lore.kernel.org/kvm/202204230312.8EOM8DHM-lkp@intel.com/T/.

Paolo
diff mbox series

Patch

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index dd1d8167e71f..68ce07185f03 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -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 */