From: Gustavo Romero Date: Thu, 13 Feb 2020 23:49:00 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Treat unrecognized TM instructions as illegal Message-Id: <7968cea9-da2d-d5f6-bcb7-8549ac6c1899@linux.vnet.ibm.com> List-Id: References: <20200213151532.12559-1-gromero@linux.ibm.com> <20200213233148.GK22482@gate.crashing.org> In-Reply-To: <20200213233148.GK22482@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Segher Boessenkool , Gustavo Romero Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Hi Segher, Thanks a lot for reviewing it. On 02/13/2020 08:31 PM, Segher Boessenkool wrote: >> --- >> arch/powerpc/kvm/book3s_hv_tm.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/kvm/book3s_hv_tm.c b/arch/powerpc/kvm/book3s_hv_tm.c >> index 0db937497169..d342a9e11298 100644 >> --- a/arch/powerpc/kvm/book3s_hv_tm.c >> +++ b/arch/powerpc/kvm/book3s_hv_tm.c >> @@ -3,6 +3,8 @@ >> * Copyright 2017 Paul Mackerras, IBM Corp. >> */ >> >> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt >> + >> #include >> >> #include >> @@ -208,6 +210,8 @@ int kvmhv_p9_tm_emulation(struct kvm_vcpu *vcpu) >> } >> >> /* What should we do here? We didn't recognize the instruction */ >> - WARN_ON_ONCE(1); >> + kvmppc_core_queue_program(vcpu, SRR1_PROGILL); >> + pr_warn_ratelimited("Unrecognized TM-related instruction %#x for emulation", instr); >> + >> return RESUME_GUEST; >> } > > Do we actually know it is TM-related here? Otherwise, looks good to me :-) Correct, I understand it's only TM-related here, so I don't expect anything else to hit 0x1500. Best regards, Gustavo