mbox series

[5.15,0/2] Fix kvm selftest build failures in linux-5.15.y

Message ID 20221223000958.729256-1-code@tyhicks.com (mailing list archive)
Headers show
Series Fix kvm selftest build failures in linux-5.15.y | expand

Message

Tyler Hicks Dec. 23, 2022, 12:09 a.m. UTC
From: "Tyler Hicks" <code@tyhicks.com>

The backport of commit 05c2224d4b04 ("KVM: selftests: Fix number of
pages for memory slot in memslot_modification_stress_test") broke the
build of the KVM selftest memslot_modification_stress_test.c source file
in two ways:

- Incorrectly assumed that max_t() was defined despite commit
  5cf67a6051ea ("tools/include: Add _RET_IP_ and math definitions to
  kernel.h") not being present
- Incorrectly assumed that kvm_vm struct members could be directly
  accessed despite b530eba14c70 ("KVM: selftests: Get rid of
  kvm_util_internal.h") not being present

Backport the first commit, as it is simple enough. Work around the lack
of the second commit by using the accessors to get to the kvm_vm struct
members.

Note that the linux-6.0.y backport of commit 05c2224d4b04 ("KVM:
selftests: Fix number of pages for memory slot in
memslot_modification_stress_test") is fine because the two prerequisite
commits, mentioned above, are both present in v6.0.

Tyler

Karolina Drobnik (1):
  tools/include: Add _RET_IP_ and math definitions to kernel.h

Tyler Hicks (Microsoft) (1):
  KVM: selftests: Fix build regression by using accessor function

 tools/include/linux/kernel.h                                | 6 ++++++
 .../selftests/kvm/memslot_modification_stress_test.c        | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Paolo Bonzini Dec. 23, 2022, 4:45 p.m. UTC | #1
On 12/23/22 01:09, Tyler Hicks wrote:
> From: "Tyler Hicks" <code@tyhicks.com>
> 
> The backport of commit 05c2224d4b04 ("KVM: selftests: Fix number of
> pages for memory slot in memslot_modification_stress_test") broke the
> build of the KVM selftest memslot_modification_stress_test.c source file
> in two ways:
> 
> - Incorrectly assumed that max_t() was defined despite commit
>    5cf67a6051ea ("tools/include: Add _RET_IP_ and math definitions to
>    kernel.h") not being present
> - Incorrectly assumed that kvm_vm struct members could be directly
>    accessed despite b530eba14c70 ("KVM: selftests: Get rid of
>    kvm_util_internal.h") not being present
> 
> Backport the first commit, as it is simple enough. Work around the lack
> of the second commit by using the accessors to get to the kvm_vm struct
> members.
> 
> Note that the linux-6.0.y backport of commit 05c2224d4b04 ("KVM:
> selftests: Fix number of pages for memory slot in
> memslot_modification_stress_test") is fine because the two prerequisite
> commits, mentioned above, are both present in v6.0.
> 
> Tyler
> 
> Karolina Drobnik (1):
>    tools/include: Add _RET_IP_ and math definitions to kernel.h
> 
> Tyler Hicks (Microsoft) (1):
>    KVM: selftests: Fix build regression by using accessor function
> 
>   tools/include/linux/kernel.h                                | 6 ++++++
>   .../selftests/kvm/memslot_modification_stress_test.c        | 2 +-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Sasha Levin Dec. 25, 2022, 3:33 a.m. UTC | #2
On Fri, Dec 23, 2022 at 05:45:44PM +0100, Paolo Bonzini wrote:
>On 12/23/22 01:09, Tyler Hicks wrote:
>>From: "Tyler Hicks" <code@tyhicks.com>
>>
>>The backport of commit 05c2224d4b04 ("KVM: selftests: Fix number of
>>pages for memory slot in memslot_modification_stress_test") broke the
>>build of the KVM selftest memslot_modification_stress_test.c source file
>>in two ways:
>>
>>- Incorrectly assumed that max_t() was defined despite commit
>>   5cf67a6051ea ("tools/include: Add _RET_IP_ and math definitions to
>>   kernel.h") not being present
>>- Incorrectly assumed that kvm_vm struct members could be directly
>>   accessed despite b530eba14c70 ("KVM: selftests: Get rid of
>>   kvm_util_internal.h") not being present
>>
>>Backport the first commit, as it is simple enough. Work around the lack
>>of the second commit by using the accessors to get to the kvm_vm struct
>>members.
>>
>>Note that the linux-6.0.y backport of commit 05c2224d4b04 ("KVM:
>>selftests: Fix number of pages for memory slot in
>>memslot_modification_stress_test") is fine because the two prerequisite
>>commits, mentioned above, are both present in v6.0.
>>
>>Tyler
>>
>>Karolina Drobnik (1):
>>   tools/include: Add _RET_IP_ and math definitions to kernel.h
>>
>>Tyler Hicks (Microsoft) (1):
>>   KVM: selftests: Fix build regression by using accessor function
>>
>>  tools/include/linux/kernel.h                                | 6 ++++++
>>  .../selftests/kvm/memslot_modification_stress_test.c        | 2 +-
>>  2 files changed, 7 insertions(+), 1 deletion(-)
>>
>
>Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>

Queued up, thanks!