mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
kvm: powerpc: book3s: pr: Rename KVM_BOOK3S_PR to KVM_BOOK3S_PR_POSSIBLE
With later patches supporting PR kvm as a kernel module, the changes that has to be built into the main kernel binary to enable PR KVM module is now selected via KVM_BOOK3S_PR_POSSIBLE Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
066212e02a
commit
7aa79938f7
9 changed files with 16 additions and 16 deletions
|
@ -244,7 +244,7 @@ do_kvm_##n: \
|
||||||
#define KVM_HANDLER_SKIP(area, h, n)
|
#define KVM_HANDLER_SKIP(area, h, n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
#define KVMTEST_PR(n) __KVMTEST(n)
|
#define KVMTEST_PR(n) __KVMTEST(n)
|
||||||
#define KVM_HANDLER_PR(area, h, n) __KVM_HANDLER(area, h, n)
|
#define KVM_HANDLER_PR(area, h, n) __KVM_HANDLER(area, h, n)
|
||||||
#define KVM_HANDLER_PR_SKIP(area, h, n) __KVM_HANDLER_SKIP(area, h, n)
|
#define KVM_HANDLER_PR_SKIP(area, h, n) __KVM_HANDLER_SKIP(area, h, n)
|
||||||
|
|
|
@ -304,7 +304,7 @@ static inline ulong kvmppc_get_fault_dar(struct kvm_vcpu *vcpu)
|
||||||
return vcpu->arch.fault_dar;
|
return vcpu->arch.fault_dar;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
|
|
||||||
static inline unsigned long kvmppc_interrupt_offset(struct kvm_vcpu *vcpu)
|
static inline unsigned long kvmppc_interrupt_offset(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
@ -339,7 +339,7 @@ static inline bool kvmppc_critical_section(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
return crit;
|
return crit;
|
||||||
}
|
}
|
||||||
#else /* CONFIG_KVM_BOOK3S_PR */
|
#else /* CONFIG_KVM_BOOK3S_PR_POSSIBLE */
|
||||||
|
|
||||||
static inline unsigned long kvmppc_interrupt_offset(struct kvm_vcpu *vcpu)
|
static inline unsigned long kvmppc_interrupt_offset(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef __ASM_KVM_BOOK3S_64_H__
|
#ifndef __ASM_KVM_BOOK3S_64_H__
|
||||||
#define __ASM_KVM_BOOK3S_64_H__
|
#define __ASM_KVM_BOOK3S_64_H__
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
static inline struct kvmppc_book3s_shadow_vcpu *svcpu_get(struct kvm_vcpu *vcpu)
|
static inline struct kvmppc_book3s_shadow_vcpu *svcpu_get(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
|
|
|
@ -257,7 +257,7 @@ struct kvm_arch {
|
||||||
struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
|
struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
|
||||||
int hpt_cma_alloc;
|
int hpt_cma_alloc;
|
||||||
#endif /* CONFIG_KVM_BOOK3S_64_HV */
|
#endif /* CONFIG_KVM_BOOK3S_64_HV */
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
struct mutex hpt_mutex;
|
struct mutex hpt_mutex;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
#ifdef CONFIG_PPC_BOOK3S_64
|
||||||
|
|
|
@ -166,7 +166,7 @@ struct paca_struct {
|
||||||
struct dtl_entry *dtl_curr; /* pointer corresponding to dtl_ridx */
|
struct dtl_entry *dtl_curr; /* pointer corresponding to dtl_ridx */
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_HANDLER
|
#ifdef CONFIG_KVM_BOOK3S_HANDLER
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
/* We use this to store guest state in */
|
/* We use this to store guest state in */
|
||||||
struct kvmppc_book3s_shadow_vcpu shadow_vcpu;
|
struct kvmppc_book3s_shadow_vcpu shadow_vcpu;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -533,7 +533,7 @@ int main(void)
|
||||||
DEFINE(VCPU_SLB_SIZE, sizeof(struct kvmppc_slb));
|
DEFINE(VCPU_SLB_SIZE, sizeof(struct kvmppc_slb));
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
#ifdef CONFIG_PPC_BOOK3S_64
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
DEFINE(PACA_SVCPU, offsetof(struct paca_struct, shadow_vcpu));
|
DEFINE(PACA_SVCPU, offsetof(struct paca_struct, shadow_vcpu));
|
||||||
# define SVCPU_FIELD(x, f) DEFINE(x, offsetof(struct paca_struct, shadow_vcpu.f))
|
# define SVCPU_FIELD(x, f) DEFINE(x, offsetof(struct paca_struct, shadow_vcpu.f))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -425,7 +425,7 @@ data_access_check_stab:
|
||||||
mfspr r9,SPRN_DSISR
|
mfspr r9,SPRN_DSISR
|
||||||
srdi r10,r10,60
|
srdi r10,r10,60
|
||||||
rlwimi r10,r9,16,0x20
|
rlwimi r10,r9,16,0x20
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
lbz r9,HSTATE_IN_GUEST(r13)
|
lbz r9,HSTATE_IN_GUEST(r13)
|
||||||
rlwimi r10,r9,8,0x300
|
rlwimi r10,r9,8,0x300
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@ config KVM_BOOK3S_64_HANDLER
|
||||||
bool
|
bool
|
||||||
select KVM_BOOK3S_HANDLER
|
select KVM_BOOK3S_HANDLER
|
||||||
|
|
||||||
config KVM_BOOK3S_PR
|
config KVM_BOOK3S_PR_POSSIBLE
|
||||||
bool
|
bool
|
||||||
select KVM_MMIO
|
select KVM_MMIO
|
||||||
select MMU_NOTIFIER
|
select MMU_NOTIFIER
|
||||||
|
@ -44,7 +44,7 @@ config KVM_BOOK3S_32
|
||||||
depends on PPC_BOOK3S_32 && !SMP && !PTE_64BIT
|
depends on PPC_BOOK3S_32 && !SMP && !PTE_64BIT
|
||||||
select KVM
|
select KVM
|
||||||
select KVM_BOOK3S_32_HANDLER
|
select KVM_BOOK3S_32_HANDLER
|
||||||
select KVM_BOOK3S_PR
|
select KVM_BOOK3S_PR_POSSIBLE
|
||||||
---help---
|
---help---
|
||||||
Support running unmodified book3s_32 guest kernels
|
Support running unmodified book3s_32 guest kernels
|
||||||
in virtual machines on book3s_32 host processors.
|
in virtual machines on book3s_32 host processors.
|
||||||
|
@ -91,7 +91,7 @@ config KVM_BOOK3S_64_HV
|
||||||
config KVM_BOOK3S_64_PR
|
config KVM_BOOK3S_64_PR
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on KVM_BOOK3S_64 && !KVM_BOOK3S_64_HV
|
depends on KVM_BOOK3S_64 && !KVM_BOOK3S_64_HV
|
||||||
select KVM_BOOK3S_PR
|
select KVM_BOOK3S_PR_POSSIBLE
|
||||||
|
|
||||||
config KVM_BOOKE_HV
|
config KVM_BOOKE_HV
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -94,7 +94,7 @@ TRACE_EVENT(kvm_exit,
|
||||||
__field( unsigned long, pc )
|
__field( unsigned long, pc )
|
||||||
__field( unsigned long, msr )
|
__field( unsigned long, msr )
|
||||||
__field( unsigned long, dar )
|
__field( unsigned long, dar )
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
__field( unsigned long, srr1 )
|
__field( unsigned long, srr1 )
|
||||||
#endif
|
#endif
|
||||||
__field( unsigned long, last_inst )
|
__field( unsigned long, last_inst )
|
||||||
|
@ -105,7 +105,7 @@ TRACE_EVENT(kvm_exit,
|
||||||
__entry->pc = kvmppc_get_pc(vcpu);
|
__entry->pc = kvmppc_get_pc(vcpu);
|
||||||
__entry->dar = kvmppc_get_fault_dar(vcpu);
|
__entry->dar = kvmppc_get_fault_dar(vcpu);
|
||||||
__entry->msr = vcpu->arch.shared->msr;
|
__entry->msr = vcpu->arch.shared->msr;
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
__entry->srr1 = vcpu->arch.shadow_srr1;
|
__entry->srr1 = vcpu->arch.shadow_srr1;
|
||||||
#endif
|
#endif
|
||||||
__entry->last_inst = vcpu->arch.last_inst;
|
__entry->last_inst = vcpu->arch.last_inst;
|
||||||
|
@ -115,7 +115,7 @@ TRACE_EVENT(kvm_exit,
|
||||||
" | pc=0x%lx"
|
" | pc=0x%lx"
|
||||||
" | msr=0x%lx"
|
" | msr=0x%lx"
|
||||||
" | dar=0x%lx"
|
" | dar=0x%lx"
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
" | srr1=0x%lx"
|
" | srr1=0x%lx"
|
||||||
#endif
|
#endif
|
||||||
" | last_inst=0x%lx"
|
" | last_inst=0x%lx"
|
||||||
|
@ -124,7 +124,7 @@ TRACE_EVENT(kvm_exit,
|
||||||
__entry->pc,
|
__entry->pc,
|
||||||
__entry->msr,
|
__entry->msr,
|
||||||
__entry->dar,
|
__entry->dar,
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
__entry->srr1,
|
__entry->srr1,
|
||||||
#endif
|
#endif
|
||||||
__entry->last_inst
|
__entry->last_inst
|
||||||
|
@ -236,7 +236,7 @@ TRACE_EVENT(kvm_check_requests,
|
||||||
* Book3S trace points *
|
* Book3S trace points *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_PR
|
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
|
||||||
|
|
||||||
TRACE_EVENT(kvm_book3s_reenter,
|
TRACE_EVENT(kvm_book3s_reenter,
|
||||||
TP_PROTO(int r, struct kvm_vcpu *vcpu),
|
TP_PROTO(int r, struct kvm_vcpu *vcpu),
|
||||||
|
|
Loading…
Reference in a new issue