Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E132C43603 for ; Thu, 12 Dec 2019 09:23:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33D662173E for ; Thu, 12 Dec 2019 09:23:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576142595; bh=CrMFAyK8WSN7I8S+7hCprsXhwmaZ+PcVK1GrfSdvzA4=; h=To:Subject:Date:From:Cc:In-Reply-To:References:List-ID:From; b=WjIqJ5OMzgKt7qVrXXO9msVPU6beYLvFFF1Vyv7wL2XJXZ2uXH9CUbFmGK+YnAqpi Jmmkrqhqxx8n4fkCDbbL2te2+j+oA+J5Dkq2UoZg710pz1ctUROZTBHNZPuYtPcSxK gQsLCCWt2bqeabhv200Cnh3aRNL2+mzQP5Ho4aQg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728316AbfLLJXO (ORCPT ); Thu, 12 Dec 2019 04:23:14 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:53963 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfLLJXO (ORCPT ); Thu, 12 Dec 2019 04:23:14 -0500 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1ifKgi-0006Yn-9w; Thu, 12 Dec 2019 10:23:12 +0100 To: Gavin Shan Subject: Re: [PATCH 3/3] kvm/arm: Standardize kvm exit reason field X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 12 Dec 2019 09:23:11 +0000 From: Marc Zyngier Cc: , , , , , , In-Reply-To: <20191212024512.39930-4-gshan@redhat.com> References: <20191212024512.39930-4-gshan@redhat.com> Message-ID: <2e960d77afc7ac75f1be73a56a9aca66@www.loen.fr> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: gshan@redhat.com, kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, paulus@ozlabs.org, jhogan@kernel.org, drjones@redhat.com, vkuznets@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Gavin, On 2019-12-12 02:45, Gavin Shan wrote: > This standardizes kvm exit reason field name by replacing "esr_ec" > with "exit_reason". > > Signed-off-by: Gavin Shan > --- > virt/kvm/arm/trace.h | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/virt/kvm/arm/trace.h b/virt/kvm/arm/trace.h > index 204d210d01c2..0ac774fd324d 100644 > --- a/virt/kvm/arm/trace.h > +++ b/virt/kvm/arm/trace.h > @@ -27,25 +27,27 @@ TRACE_EVENT(kvm_entry, > ); > > TRACE_EVENT(kvm_exit, > - TP_PROTO(int ret, unsigned int esr_ec, unsigned long vcpu_pc), > - TP_ARGS(ret, esr_ec, vcpu_pc), > + TP_PROTO(int ret, unsigned int exit_reason, unsigned long vcpu_pc), > + TP_ARGS(ret, exit_reason, vcpu_pc), > > TP_STRUCT__entry( > __field( int, ret ) > - __field( unsigned int, esr_ec ) > + __field( unsigned int, exit_reason ) I don't think the two are the same thing. The exit reason should be exactly that: why has the guest exited (exception, host interrupt, trap). What we're reporting here is the exception class, which doesn't apply to interrupts, for example (hence the 0 down below, which we treat as a catch-all). > __field( unsigned long, vcpu_pc ) > ), > > TP_fast_assign( > __entry->ret = ARM_EXCEPTION_CODE(ret); > - __entry->esr_ec = ARM_EXCEPTION_IS_TRAP(ret) ? esr_ec : 0; > + __entry->exit_reason = > + ARM_EXCEPTION_IS_TRAP(ret) ? exit_reason: 0; > __entry->vcpu_pc = vcpu_pc; > ), > > TP_printk("%s: HSR_EC: 0x%04x (%s), PC: 0x%08lx", > __print_symbolic(__entry->ret, kvm_arm_exception_type), > - __entry->esr_ec, > - __print_symbolic(__entry->esr_ec, kvm_arm_exception_class), > + __entry->exit_reason, > + __print_symbolic(__entry->exit_reason, > + kvm_arm_exception_class), > __entry->vcpu_pc) > ); The last thing is whether such a change is an ABI change or not. I've been very reluctant to change any of this for that reason. Thanks, M. -- Jazz is not dead. It just smells funny...