Skip to content

Commit a9a3de5

Browse files
iamjpnmpe
authored andcommitted
KVM: PPC: Book3S HV nestedv2: Avoid msr check in kvmppc_handle_exit_hv()
The msr check in kvmppc_handle_exit_hv() is not needed for nestedv2 hosts, skip the check to avoid a H_GUEST_GET_STATE hcall. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231201132618.555031-9-vaibhav@linux.ibm.com
1 parent df938a5 commit a9a3de5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/powerpc/kvm/book3s_hv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
15971597
* That can happen due to a bug, or due to a machine check
15981598
* occurring at just the wrong time.
15991599
*/
1600-
if (__kvmppc_get_msr_hv(vcpu) & MSR_HV) {
1600+
if (!kvmhv_is_nestedv2() && (__kvmppc_get_msr_hv(vcpu) & MSR_HV)) {
16011601
printk(KERN_EMERG "KVM trap in HV mode!\n");
16021602
printk(KERN_EMERG "trap=0x%x | pc=0x%lx | msr=0x%llx\n",
16031603
vcpu->arch.trap, kvmppc_get_pc(vcpu),

0 commit comments

Comments
 (0)