]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: x86: Rename kvm_cache_regs.h => regs.h
authorSean Christopherson <seanjc@google.com>
Fri, 29 May 2026 22:21:49 +0000 (15:21 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 3 Jun 2026 12:35:18 +0000 (05:35 -0700)
Rename kvm_cache_regs.h to simply regs.h, as the "cache" nomenclature is
already a lie (the file deals with state/registers that aren't cached per
se), and so that more code/functionality can be landed in the header
without making it a truly horrible misnomer.

Deliberately drop the kvm_ prefix/namespace to align with other "local"
headers, and to further differentiate regs.h from the public/global
arch/x86/include/asm/kvm_vcpu_regs.h, which sadly needs to stay in asm/
so that the number of registers can be referenced by kvm_vcpu_arch.

No functional change intended.

Reviewed-by: Yosry Ahmed <yosry@kernel.org>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Link: https://patch.msgid.link/20260529222223.870923-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
14 files changed:
arch/x86/kvm/emulate.c
arch/x86/kvm/lapic.c
arch/x86/kvm/mmu.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/regs.h [moved from arch/x86/kvm/kvm_cache_regs.h with 99% similarity]
arch/x86/kvm/smm.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/vmx/nested.h
arch/x86/kvm/vmx/sgx.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h

index a367828ce86996b11d3bfe027866731b20384d85..94e2531487717b1545c59dd14a5051d70af038bb 100644 (file)
@@ -20,7 +20,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kvm_host.h>
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "kvm_emulate.h"
 #include <linux/stringify.h>
 #include <asm/debugreg.h>
index 4078e624ca6675d1af4b3182f8279f76ed38bdf6..d8dbfb107bfb0f83da22fc683bfc5a919cfb9ef4 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/delay.h>
 #include <linux/atomic.h>
 #include <linux/jump_label.h>
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "irq.h"
 #include "ioapic.h"
 #include "trace.h"
index ddf4e467c071ebc21d07613eda1f2ef6a91d16a6..e1bb663ebbd5877d59646c8fbc82e3c41024d7fe 100644 (file)
@@ -3,7 +3,7 @@
 #define __KVM_X86_MMU_H
 
 #include <linux/kvm_host.h>
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "x86.h"
 #include "cpuid.h"
 
index f8aa7eda661eece2bb864e503692d126c6919a91..d7a929ea2a2682e279d40dabc8a52724dfe9510b 100644 (file)
@@ -22,7 +22,7 @@
 #include "mmu_internal.h"
 #include "tdp_mmu.h"
 #include "x86.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "smm.h"
 #include "kvm_emulate.h"
 #include "page_track.h"
similarity index 99%
rename from arch/x86/kvm/kvm_cache_regs.h
rename to arch/x86/kvm/regs.h
index 2ae492ad6412bb50f2a5a0791de265bcd64c09eb..4440f3992fceddb34c566293061264ba63e8f9b5 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#ifndef ASM_KVM_CACHE_REGS_H
-#define ASM_KVM_CACHE_REGS_H
+#ifndef ARCH_X86_KVM_REGS_H
+#define ARCH_X86_KVM_REGS_H
 
 #include <linux/kvm_host.h>
 
index f623c59861198e14908ed05d29ee523927e23284..a446487bdd5cfb866eb5172efea5697ac3719182 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/kvm_host.h>
 #include "x86.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "kvm_emulate.h"
 #include "smm.h"
 #include "cpuid.h"
index be15cb51680323e6e851644c11b89d5c1d1153d5..faa1ca7588b9ea0e3ba453b90f628893a22d0059 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "irq.h"
 #include "mmu.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "x86.h"
 #include "smm.h"
 #include "cpuid.h"
index 19b80ef56e2b79f503d7c4a0d4fb15bcdda12fc5..38d9f296159dd4c7986f7dc36b236012ce94e775 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/sev-common.h>
 
 #include "cpuid.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 
 /*
  * Helpers to convert to/from physical addresses for pages whose address is
index 213a448104aff0931eb55ca5e6235c1bc26d986b..6d6cd5904ddf66abe2694a2b22dd6f1c5456c781 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __KVM_X86_VMX_NESTED_H
 #define __KVM_X86_VMX_NESTED_H
 
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "hyperv.h"
 #include "vmcs12.h"
 #include "vmx.h"
index 4c61fc33f7648d74991c4cd7723891d746c22c7f..66c315554b46bb3d687631d22d0e3638b58787e3 100644 (file)
@@ -6,7 +6,7 @@
 #include <asm/sgx.h>
 
 #include "x86.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "nested.h"
 #include "sgx.h"
 #include "vmx.h"
index cf9f2f55f569de9cc950db6624fd70868d1ab9e6..18ce36bdce6e9c47688e98ba4a797c34f67f8a8d 100644 (file)
@@ -59,7 +59,7 @@
 #include "hyperv.h"
 #include "kvm_onhyperv.h"
 #include "irq.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "lapic.h"
 #include "mmu.h"
 #include "nested.h"
index daedf663c0a9cbf077e47d7f760edff07d067edd..de9de0d2016cafb93b07898b437c0d64da694549 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/posted_intr.h>
 
 #include "capabilities.h"
-#include "../kvm_cache_regs.h"
+#include "../regs.h"
 #include "pmu_intel.h"
 #include "vmcs.h"
 #include "vmx_ops.h"
index 63ee091aed70993a47fb38e2c234b321195d590d..da728754684601cbded231461ebdfb770cc8e2f3 100644 (file)
@@ -23,7 +23,7 @@
 #include "mmu.h"
 #include "i8254.h"
 #include "tss.h"
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "kvm_emulate.h"
 #include "mmu/page_track.h"
 #include "x86.h"
index aa7d5b757fb548cc8617e7cfd507da477d7bdd41..fee92c603ad02e0cd94cf810c23925b3fb659cf3 100644 (file)
@@ -6,7 +6,7 @@
 #include <asm/fpu/xstate.h>
 #include <asm/mce.h>
 #include <asm/pvclock.h>
-#include "kvm_cache_regs.h"
+#include "regs.h"
 #include "kvm_emulate.h"
 #include "cpuid.h"