diff mbox series

x86/kvm: align kvm_apic_eoi to cacheline

Message ID 1662446848-55805-1-git-send-email-lirongqing@baidu.com (mailing list archive)
State New, archived
Headers show
Series x86/kvm: align kvm_apic_eoi to cacheline | expand

Commit Message

Li RongQing Sept. 6, 2022, 6:47 a.m. UTC
kvm_apic_eoi has higher access frequency, aligning it to
cacheline can give better performance

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 arch/x86/kernel/kvm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index d4e48b4..d413478 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -330,7 +330,8 @@  static void kvm_register_steal_time(void)
 		(unsigned long long) slow_virt_to_phys(st));
 }
 
-static DEFINE_PER_CPU_DECRYPTED(unsigned long, kvm_apic_eoi) = KVM_PV_EOI_DISABLED;
+static DEFINE_PER_CPU_DECRYPTED(unsigned long, kvm_apic_eoi) \
+	__aligned(64) = KVM_PV_EOI_DISABLED;
 
 static notrace void kvm_guest_apic_eoi_write(u32 reg, u32 val)
 {