Skip to content

[PW_SID:970599] KVM: Remove include/kvm, standardize includes#502

Closed
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw970599
Closed

[PW_SID:970599] KVM: Remove include/kvm, standardize includes#502
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw970599

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 970599 applied to workflow__riscv__fixes

Name: KVM: Remove include/kvm, standardize includes
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=970599
Version: 1

asg-17 and others added 8 commits June 11, 2025 02:52
Move arm_hypercalls.h and arm_psci.h into arch/arm64/kvm now that KVM
no longer supports 32-bit ARM, i.e. now that there's no reason to make
the hypercall and PSCI APIs "public".

Signed-off-by: Anish Ghulati <aghulati@google.com>
[sean: squash into one patch, write changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Include include/uapi/linux/kvm.h and include/linux/kvm_types.h in ARM's
public arm_arch_timer.h and arm_pmu.h headers to get forward declarations
of things like "struct kvm_vcpu" and "struct kvm_device_attr", which are
referenced but never declared (neither file includes *any* KVM headers).

The missing includes don't currently cause problems because of the order
of includes in parent files, but that order is largely arbitrary and is
subject to change, e.g. a future commit will move the ARM specific headers
to arch/arm64/include/asm and reorder parent includes to maintain
alphabetic ordering.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move kvm/arm_{arch_timer,pmu,vgic}.h to arch/arm64/include/asm and drop
the "arm" prefix from all file names.  Now that KVM no longer supports
32-bit ARM, there is no reason to expose ARM specific headers to other
architectures beyond arm64.

Cc: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move iodev.h, the last remaining holdout in include/kvm, to the standard
include/linux directory as kvm_iodev.h and delete include/kvm.

Acked-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Don't add virt/kvm to KVM MIPS' include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code.  It's not clear that MIPS *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a different
architecture's Makefile when MIPS support was first added.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Don't add virt/kvm to KVM PPC's include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code.  It's not clear that PPC *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a different
architecture's Makefile when PPC support was first added.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Don't add virt/kvm to KVM s390's include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code.  It's not clear that s390 *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a x86's
Makefile when s390 support was first added.

The only headers in virt/kvm at the time were the x86 specific ioapic.h,
and iodev.h, neither of which shows up as an #include in the diff for the
commit range 37817f2..e976a2b.

Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Standardize KVM's include paths across all architectures by declaring
the KVM-specific includes in the common Makefile.kvm.  Having common KVM
"own" the included paths reduces the temptation to unnecessarily add
virt/kvm to arch include paths, and conversely if allowing arch code to
grab headers from virt/kvm becomes desirable, virt/kvm can be added to
all architecture's include path with a single line update.

Having the common KVM makefile append to ccflags also provides a
convenient location to append other things, e.g. KVM-specific #defines.

Note, this changes the behavior of s390 and PPC, as s390 and PPC
previously overwrote ccflags-y instead of adding on.  There is no evidence
that overwriting ccflags-y was necessary or even deliberate, as both s390
and PPC switched to the overwrite behavior without so much as a passing
mention when EXTRA_CFLAGS was replaced with ccflags-y (commit c73028a
("s390: change to new flag variable") and commit 4108d9b
("powerpc/Makefiles: Change to new flag variables")).

Acked-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 982.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1317.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.16 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.77 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
 {include => arch/arm64}/kvm/arm_hypercalls.h | 0

total: 0 errors, 1 warnings, 0 checks, 129 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit bced50686aba ("KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 129 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 2.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
kdoc
Desc: Detects for kdoc errors
Duration: 0.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
module-param
Desc: Detect module_param changes
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/8] KVM: arm64: Move arm_{psci,hypercalls}.h to an internal KVM path"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.34 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 979.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1363.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.66 seconds
Result: WARNING
Output:

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#17: 
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>

total: 0 errors, 1 warnings, 0 checks, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 4dadd219f019 ("KVM: arm64: Include KVM headers to get forward declarations") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 16 lines checked
WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 72.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/8] KVM: arm64: Include KVM headers to get forward declarations"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[6/8] KVM: PPC: Stop adding virt/kvm to the arch include path"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[6/8] KVM: PPC: Stop adding virt/kvm to the arch include path"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[6/8] KVM: PPC: Stop adding virt/kvm to the arch include path"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[6/8] KVM: PPC: Stop adding virt/kvm to the arch include path"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 931.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1253.13 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 71.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[7/8] KVM: s390: Stop adding virt/kvm to the arch include path"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 963.18 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1344.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 71.94 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[8/8] KVM: Standardize include paths across all architectures"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.55 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw970599 branch June 11, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants