Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5398117rwl; Tue, 21 Mar 2023 18:37:07 -0700 (PDT) X-Google-Smtp-Source: AK7set/tWvMjDarQmXYuZup//2m7skGmNhqUi0KGHUX4Ozi+POjUumGyOXRaLXCfcuY2SNFisw6K X-Received: by 2002:a17:906:2081:b0:8d2:78c5:1d4e with SMTP id 1-20020a170906208100b008d278c51d4emr4577397ejq.5.1679449027060; Tue, 21 Mar 2023 18:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679449027; cv=none; d=google.com; s=arc-20160816; b=B7HzUtihsU1kQTuu7E8pfCU1j4qnfZQ8G6vOir7Uk3oHvGdOXSR4Cm1limOeEzKUfd BQoN3JLau8yrFUsv0GLYnnNwkwyem6jFFoWlZOB7jS1OqCUU29rh7xRtq3nHHys4Oroy ANp4aepkpcs5S2hHdTUCQecIMTwFRZ3mCaJqW6/wAv1P08CKpZkanUqfZfeF6zGBXx++ pjq7pIcJiwVWF6M9/rlWhDiNLSo5U+ExpyfAFeLwXDa7vohMMi8MJ/Y+brhbMVF2uSe+ zCQWP7cLotGIncOUQVDCdKU3fa4MfnEBC6m5JkgkBp81oZZI46TB9ATyfBTiuJ1F4YsR aRvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=p6kJmXed78dKg1ZRusNCvmLOQkJ/PK19L0OGtn2MdZU=; b=Cwp7NmsjDQxStAqofjLtU2mNJjIntnCvQnYtDiY2wlf3c+TLncOXBu64pG54Ht0lUk HANFxSAxO8uY8apfE7UXPQzHjokiC0hgqpNa9Ckx/f3mjugHFcWkM9mAV3z3zYs6l5cU vhrxvuRO+VvQYwHtU6dyvypoKOvDGArM6FJUcECE+RnoaVMRASQUKvVuMWCskWOiVr/G t0fqt7FDQahLMOaVH4w3PyBiA0zrtyYyVXen4GYNs5YSS3KgMvbGDlAoqRnkX0TagyUQ q79HR+zZ+0gpHwNyETUDY8kLBVAa4F4m4mikpP+cTtJ2WIFvphTekz4KG7SkKer9ra0A Unxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd2-20020a170906b34200b008dae86d0890si5556792ejb.575.2023.03.21.18.36.42; Tue, 21 Mar 2023 18:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbjCVBf3 (ORCPT + 99 others); Tue, 21 Mar 2023 21:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbjCVBfN (ORCPT ); Tue, 21 Mar 2023 21:35:13 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8121F5A6DF; Tue, 21 Mar 2023 18:34:57 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.120]) by gateway (Coremail) with SMTP id _____8Bxok44WxpkrskPAA--.12096S3; Wed, 22 Mar 2023 09:34:48 +0800 (CST) Received: from [10.20.42.120] (unknown [10.20.42.120]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxX+Q2Wxpkt0MJAA--.37863S3; Wed, 22 Mar 2023 09:34:46 +0800 (CST) Subject: Re: [PATCH v4 05/29] LoongArch: KVM: Add vcpu related header files To: Xi Ruoyao , Paolo Bonzini References: <20230321035651.598505-1-zhaotianrui@loongson.cn> <20230321035651.598505-6-zhaotianrui@loongson.cn> <75f843b2780fc3c3dcc1d0d8f78f2b955956316b.camel@xry111.site> Cc: Huacai Chen , WANG Xuerui , Greg Kroah-Hartman , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jens Axboe , Mark Brown , Alex Deucher , Oliver Upton , maobibo@loongson.cn From: Tianrui Zhao Message-ID: <554dc19a-cd94-0f94-7e81-9cdc137dac7d@loongson.cn> Date: Wed, 22 Mar 2023 09:34:46 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <75f843b2780fc3c3dcc1d0d8f78f2b955956316b.camel@xry111.site> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxX+Q2Wxpkt0MJAA--.37863S3 X-CM-SenderInfo: p2kd03xldq233l6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvdXoW7Xr18JrW8JryrtFyfurykKrg_yoWDZFb_Xr s8JF15Ca1kWF4xtanIkFWrX347Gr43Zw15Aa1jqws0qr4rKry0qws3Krs2yrs3tw109F17 Cay5J3sIg3sxujkaLaAFLSUrUUUUnb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUO 17kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS 14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCY1x0262kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE 7xkEbVWUJVW8JwCFI7km07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I 0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAI cVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcV CF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8Dl1DUUUUU== X-Spam-Status: No, score=3.6 required=5.0 tests=NICE_REPLY_A,RCVD_IN_SBL_CSS, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023年03月21日 20:30, Xi Ruoyao 写道: > On Tue, 2023-03-21 at 11:56 +0800, Tianrui Zhao wrote: >> +/* Tracepoints for VM exits */ >> +#define kvm_trace_symbol_exit_types \ >> + ({ KVM_TRACE_EXIT_IDLE, "IDLE" }, \ >> + { KVM_TRACE_EXIT_CACHE, "CACHE" }, \ >> + { KVM_TRACE_EXIT_SIGNAL, "Signal" }) > Looks like there shouldn't be "(" and ")". > >> +#define kvm_trace_symbol_aux_op \ >> + ({ KVM_TRACE_AUX_RESTORE, "restore" }, \ >> + { KVM_TRACE_AUX_SAVE, "save" }, \ >> + { KVM_TRACE_AUX_ENABLE, "enable" }, \ >> + { KVM_TRACE_AUX_DISABLE, "disable" }, \ >> + { KVM_TRACE_AUX_DISCARD, "discard" }) > Likewise. > > See the test robot report, and https://godbolt.org/z/bE8q97z1o. > > The lesson: if a text book claims "you should always wrap the content of > a macro in ( ... )", we should burn it in the fire! :) > Thanks, it should remove the "()" statement in the macros. The reason I did this before because an error was triggered when I use checkpatch.py to check it, and now I know this error can be ignored. Thanks Tianrui Zhao