mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: KVM: arm64: Remove 'struct kvm_vcpu' from the KMI
With the addition of 'struct pkvm_module_ops' to the Android-14 KMI, we inadvertently exposing a number of internal KVM data structures via the unused '__hyp_running_vcpu' member of 'struct kvm_cpu_context'. Fix up the KMI by making this field a 'void *' for everybody other than genksyms. Cc: Matthias Männich <maennich@google.com> Cc: Quentin Perret <qperret@google.com> Cc: Vincent Donnefort <vdonnefort@google.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 288146090 Signed-off-by: Will Deacon <willdeacon@google.com> Change-Id: I54b7fe055830e22e6118779617de2d9259501833
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -203,8 +203,10 @@ struct kvm_arch {
|
|||||||
/* Mandated version of PSCI */
|
/* Mandated version of PSCI */
|
||||||
u32 psci_version;
|
u32 psci_version;
|
||||||
|
|
||||||
|
#ifndef __GENKSYMS__
|
||||||
/* Protects VM-scoped configuration data */
|
/* Protects VM-scoped configuration data */
|
||||||
struct mutex config_lock;
|
struct mutex config_lock;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we encounter a data abort without valid instruction syndrome
|
* If we encounter a data abort without valid instruction syndrome
|
||||||
@@ -353,7 +355,11 @@ struct kvm_cpu_context {
|
|||||||
|
|
||||||
u64 sys_regs[NR_SYS_REGS];
|
u64 sys_regs[NR_SYS_REGS];
|
||||||
|
|
||||||
|
#ifdef __GENKSYMS__
|
||||||
struct kvm_vcpu *__hyp_running_vcpu;
|
struct kvm_vcpu *__hyp_running_vcpu;
|
||||||
|
#else
|
||||||
|
void *__hyp_running_vcpu;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct kvm_host_data {
|
struct kvm_host_data {
|
||||||
@@ -512,7 +518,9 @@ struct kvm_vcpu_arch {
|
|||||||
|
|
||||||
/* vcpu power state */
|
/* vcpu power state */
|
||||||
struct kvm_mp_state mp_state;
|
struct kvm_mp_state mp_state;
|
||||||
|
#ifndef __GENKSYMS__
|
||||||
spinlock_t mp_state_lock;
|
spinlock_t mp_state_lock;
|
||||||
|
#endif
|
||||||
|
|
||||||
union {
|
union {
|
||||||
/* Cache some mmu pages needed inside spinlock regions */
|
/* Cache some mmu pages needed inside spinlock regions */
|
||||||
|
|||||||
Reference in New Issue
Block a user