linux/arch/x86/kvm
Adrian Hunter 38e93267ca KVM: x86: Do not use kvm_rip_read() unconditionally for KVM_PROFILING
Not all VMs allow access to RIP.  Check guest_state_protected before
calling kvm_rip_read().

This avoids, for example, hitting WARN_ON_ONCE in vt_cache_reg() for
TDX VMs.

Fixes: 81bf912b2c ("KVM: TDX: Implement TDX vcpu enter/exit path")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20250415104821.247234-3-adrian.hunter@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-24 09:52:32 -04:00
..
mmu KVM: x86/mmu: Wrap sanity check on number of TDP MMU pages with KVM_PROVE_MMU 2025-04-04 07:07:40 -04:00
svm KVM: SVM: WARN if an invalid posted interrupt IRTE entry is added 2025-04-24 09:52:31 -04:00
vmx KVM: x86: Reset IRTE to host control if *new* route isn't postable 2025-04-24 09:52:31 -04:00
.gitignore
Kconfig KVM: x86/mmu: Age TDP MMU SPTEs without holding mmu_lock 2025-02-14 07:17:17 -08:00
Makefile KVM: x86: leave kvm.ko out of the build if no vendor module is requested 2024-10-06 03:53:41 -04:00
cpuid.c KVM: x86: Explicitly zero-initialize on-stack CPUID unions 2025-04-04 07:07:40 -04:00
cpuid.h KVM: x86: Defer runtime updates of dynamic CPUID bits until CPUID emulation 2025-02-12 10:16:33 -08:00
debugfs.c
emulate.c KVM: x86: Plumb the emulator's starting RIP into nested intercept checks 2025-02-24 09:01:07 -08:00
fpu.h
hyperv.c KVM: x86: Switch to use hrtimer_setup() 2025-02-18 10:32:31 +01:00
hyperv.h KVM: x86: hyper-v: Remove unused inline function kvm_hv_free_pa_page() 2024-08-13 09:28:48 -04:00
i8254.c KVM: x86: Switch to use hrtimer_setup() 2025-02-18 10:32:31 +01:00
i8254.h
i8259.c KVM: x86: Wake vCPU for PIC interrupt injection iff a valid IRQ was found 2025-02-12 10:05:01 -08:00
ioapic.c
ioapic.h
irq.c KVM: x86: Fold kvm_get_apic_interrupt() into kvm_cpu_get_interrupt() 2024-09-09 20:15:01 -07:00
irq.h
irq_comm.c
kvm-asm-offsets.c
kvm_cache_regs.h KVM: x86: Add lockdep-guarded asserts on register cache usage 2024-11-01 09:22:22 -07:00
kvm_emulate.h KVM: x86: Add a #define for the architectural max instruction length 2025-02-24 09:01:07 -08:00
kvm_onhyperv.c
kvm_onhyperv.h
lapic.c ARM: 2025-03-25 14:22:07 -07:00
lapic.h KVM: nVMX: Defer SVI update to vmcs01 on EOI when L2 is active w/o VID 2024-12-19 07:33:58 -08:00
mmu.h Merge branch 'kvm-mirror-page-tables' into HEAD 2025-01-20 07:15:58 -05:00
mtrr.c KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
pmu.c KVM: x86/pmu: Drop now-redundant refresh() during init() 2024-12-18 14:19:33 -08:00
pmu.h
reverse_cpuid.h KVM: x86: Replace guts of "governed" features with comprehensive cpu_caps 2024-12-18 14:20:05 -08:00
smm.c KVM: x86: Defer runtime updates of dynamic CPUID bits until CPUID emulation 2025-02-12 10:16:33 -08:00
smm.h
trace.h KVM: x86: Do not use kvm_rip_read() unconditionally in KVM tracepoints 2025-04-24 09:52:31 -04:00
tss.h
x86.c KVM: x86: Do not use kvm_rip_read() unconditionally for KVM_PROFILING 2025-04-24 09:52:32 -04:00
x86.h KVM Xen changes for 6.15 2025-03-19 09:14:59 -04:00
xen.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
xen.h KVM: x86: Update Xen TSC leaves during CPUID emulation 2025-02-25 07:09:55 -08:00