mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
KVM: PPC: e500mc: implicitly set MSR_GS
When setting MSR for an e500mc guest, we implicitly always set MSR_GS to make sure the guest is in guest state. Since we have this implicit rule there, we don't need to explicitly pass MSR_GS to set_msr(). Remove all explicit setters of MSR_GS. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
4ab969199e
commit
79300f8cb9
@ -280,7 +280,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
|
|||||||
unsigned int priority)
|
unsigned int priority)
|
||||||
{
|
{
|
||||||
int allowed = 0;
|
int allowed = 0;
|
||||||
ulong uninitialized_var(msr_mask);
|
ulong msr_mask = 0;
|
||||||
bool update_esr = false, update_dear = false;
|
bool update_esr = false, update_dear = false;
|
||||||
ulong crit_raw = vcpu->arch.shared->critical;
|
ulong crit_raw = vcpu->arch.shared->critical;
|
||||||
ulong crit_r1 = kvmppc_get_gpr(vcpu, 1);
|
ulong crit_r1 = kvmppc_get_gpr(vcpu, 1);
|
||||||
@ -322,20 +322,19 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
|
|||||||
case BOOKE_IRQPRIO_AP_UNAVAIL:
|
case BOOKE_IRQPRIO_AP_UNAVAIL:
|
||||||
case BOOKE_IRQPRIO_ALIGNMENT:
|
case BOOKE_IRQPRIO_ALIGNMENT:
|
||||||
allowed = 1;
|
allowed = 1;
|
||||||
msr_mask = MSR_GS | MSR_CE | MSR_ME | MSR_DE;
|
msr_mask = MSR_CE | MSR_ME | MSR_DE;
|
||||||
int_class = INT_CLASS_NONCRIT;
|
int_class = INT_CLASS_NONCRIT;
|
||||||
break;
|
break;
|
||||||
case BOOKE_IRQPRIO_CRITICAL:
|
case BOOKE_IRQPRIO_CRITICAL:
|
||||||
case BOOKE_IRQPRIO_DBELL_CRIT:
|
case BOOKE_IRQPRIO_DBELL_CRIT:
|
||||||
allowed = vcpu->arch.shared->msr & MSR_CE;
|
allowed = vcpu->arch.shared->msr & MSR_CE;
|
||||||
allowed = allowed && !crit;
|
allowed = allowed && !crit;
|
||||||
msr_mask = MSR_GS | MSR_ME;
|
msr_mask = MSR_ME;
|
||||||
int_class = INT_CLASS_CRIT;
|
int_class = INT_CLASS_CRIT;
|
||||||
break;
|
break;
|
||||||
case BOOKE_IRQPRIO_MACHINE_CHECK:
|
case BOOKE_IRQPRIO_MACHINE_CHECK:
|
||||||
allowed = vcpu->arch.shared->msr & MSR_ME;
|
allowed = vcpu->arch.shared->msr & MSR_ME;
|
||||||
allowed = allowed && !crit;
|
allowed = allowed && !crit;
|
||||||
msr_mask = MSR_GS;
|
|
||||||
int_class = INT_CLASS_MC;
|
int_class = INT_CLASS_MC;
|
||||||
break;
|
break;
|
||||||
case BOOKE_IRQPRIO_DECREMENTER:
|
case BOOKE_IRQPRIO_DECREMENTER:
|
||||||
@ -346,13 +345,13 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
|
|||||||
case BOOKE_IRQPRIO_DBELL:
|
case BOOKE_IRQPRIO_DBELL:
|
||||||
allowed = vcpu->arch.shared->msr & MSR_EE;
|
allowed = vcpu->arch.shared->msr & MSR_EE;
|
||||||
allowed = allowed && !crit;
|
allowed = allowed && !crit;
|
||||||
msr_mask = MSR_GS | MSR_CE | MSR_ME | MSR_DE;
|
msr_mask = MSR_CE | MSR_ME | MSR_DE;
|
||||||
int_class = INT_CLASS_NONCRIT;
|
int_class = INT_CLASS_NONCRIT;
|
||||||
break;
|
break;
|
||||||
case BOOKE_IRQPRIO_DEBUG:
|
case BOOKE_IRQPRIO_DEBUG:
|
||||||
allowed = vcpu->arch.shared->msr & MSR_DE;
|
allowed = vcpu->arch.shared->msr & MSR_DE;
|
||||||
allowed = allowed && !crit;
|
allowed = allowed && !crit;
|
||||||
msr_mask = MSR_GS | MSR_ME;
|
msr_mask = MSR_ME;
|
||||||
int_class = INT_CLASS_CRIT;
|
int_class = INT_CLASS_CRIT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user