Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4821229rwb; Mon, 31 Jul 2023 12:48:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlE883r/ejadHw24WaAmg0fZa5CGQmOAFO9X+jZDETESNAZTKqeiq8snOW2lHD/3Jt4leB1P X-Received: by 2002:a2e:83d0:0:b0:2b6:e96c:5414 with SMTP id s16-20020a2e83d0000000b002b6e96c5414mr624549ljh.52.1690832934550; Mon, 31 Jul 2023 12:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690832934; cv=none; d=google.com; s=arc-20160816; b=Rfk8UqcQCiU/Z7X3nkVlwMAdemE7lwKjhGyMknz0Z+T3A2z/ybqcfpMqWpDqpm3wd0 8hyCAoKf3ZRTdwKu+0WSmK6OZkHWmpAZn0oCuec8vtAKDM6GhvXpoyHvrAdZyrYp5QI+ F2aY9iTBx6QI21N+5Sl7Zg/Mmh8OiJ7l9bQ2Ymv+x0Y47WdHjh1/X8xGWq7c65UzvhTx 9K8o2Dfd3ZlyuE3kGmPf9VJiK3pDMNhIs3b8rTzyuZ4g4p3wn5cAOpiWOkYP1NgBoqP0 vGEVEi1VbtQRRm+AUs3YcAAnrOsFgQq7auKRTluzPCnxrjoAnsKwRvNM9F0+fLbCpskz I2Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q6BmQQ8xDHQ3qzVuwILJuAltF2TxUquAINpFxWwuR3w=; fh=Y+ILp1GbGV2pU5j7RLYWv4aUVeo1A8QR360RSruhIRU=; b=WApz8oPdhaW32wTIHRon+T8IpnOtOz4UqJjsK2V5uBwLpYs2h6syOw3CnTvpGzQVhC qOK2hIqepuPdJNzXqTgFK3dWeopALa+RRDwemdYWK7ZYSL9nmhOAA8v4jkQ2UB+189cJ lW/pno1oO3c+A516oyIQi7GmxNrM4g0+7KM6gaDMMuiSq5krlUxAEUK0IEP6Ql6/CFJZ /phReL7G7/xpznKZnLf+t1/7KCDxDutiZE5Wn6TJGR4554k0WKasCcxalEnd37CNlLce LbHWr83uVyx4We1IAxTIU4IeqPNiRob1N6Zmb2T97oQHmR7+CE3pb1f1gs1efbNZUFpu 5/GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=RTUp1GcE; 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 y17-20020a170906915100b009924806cd0asi2624251ejw.295.2023.07.31.12.48.30; Mon, 31 Jul 2023 12:48:54 -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; dkim=pass header.i=@ventanamicro.com header.s=google header.b=RTUp1GcE; 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 S230016AbjGaSXK (ORCPT + 99 others); Mon, 31 Jul 2023 14:23:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231481AbjGaSW7 (ORCPT ); Mon, 31 Jul 2023 14:22:59 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC28E79 for ; Mon, 31 Jul 2023 11:22:57 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4fe0eb0ca75so7692438e87.2 for ; Mon, 31 Jul 2023 11:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1690827775; x=1691432575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Q6BmQQ8xDHQ3qzVuwILJuAltF2TxUquAINpFxWwuR3w=; b=RTUp1GcE9TWV1qTvNE1C02wFkvp/rEJhtk+51nISvyjgPTusv53crdnWdpbT2WDNpC 9czQGReCauWeNFu8mJtHkId8ASDjhvZWALHZh+SyhEMqoUTqhxssydzxa6uZBKj0qYrD vcyzEEjHdxO76TNZyKc9O24YAUeb5rdAfQi7xglRc7Oz8U/VK20seE+TqLxPiIUEF2AF p2ypuV+xtoforGGsa/Lt/KyL8w4KTS3XdMdpYfXyMrVCX/d56Us0p1xCWIGjqH506lyL NZbaDWWhUfPFLWX9TmHQaEyEA1UmGoVZusjLFfEFIf7D4qJ0RegD+CSe3GcPeA3rkzoJ xi6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690827775; x=1691432575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Q6BmQQ8xDHQ3qzVuwILJuAltF2TxUquAINpFxWwuR3w=; b=Vk6L59b9JLCQOS8SPsLp5reoSBTrDZ0lw2/rM70b3GqvF3VxSISI684PkmapAFlSKu PZyaKsirD/Q0/0ikCZ8eaXyN1/9/Oz7VVJWRT0CQc6MS1qsi/KC0Opdc+eZGrpxqnCtx wsY0gfPcdxx6JAiOTc2oKHzB2indIVN2BFxG/nnbyB7oFxKqICmA46cllzXkBRc7BWif fEF6lzLoJjEyg00ZGaE+8X55KsUgrvc4cpP92dWmK4rTidy8pjmGk0NX6Ff8ACFfLotW 3H+hGhFZXhapHzrxCrk7SacNJkSC75STvXsQWCpQSwGRna6HHNWv5+8p31xQA2Le6Cbo rk3w== X-Gm-Message-State: ABy/qLZAOqNCgyqXYNqdDCaY77tOSeSEk54/DCv/BYDHIltRHJzc3ohS Gfl8afvldwLFPFTBdxC9063zqw== X-Received: by 2002:ac2:5e34:0:b0:4fe:3e89:fcb1 with SMTP id o20-20020ac25e34000000b004fe3e89fcb1mr383296lfg.68.1690827775288; Mon, 31 Jul 2023 11:22:55 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id u7-20020a170906408700b0098de7d28c34sm6476150ejj.193.2023.07.31.11.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 11:22:54 -0700 (PDT) Date: Mon, 31 Jul 2023 20:22:54 +0200 From: Andrew Jones To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Thomas Huth , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Aaron Lewis Subject: Re: [PATCH v4 09/34] KVM: selftests: Add a selftest for guest prints and formatted asserts Message-ID: <20230731-4335e61b2b2688a925025a9c@orel> References: <20230729003643.1053367-1-seanjc@google.com> <20230729003643.1053367-10-seanjc@google.com> <20230731-91b64a6b787ba7e23b285785@orel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 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 On Mon, Jul 31, 2023 at 10:19:47AM -0700, Sean Christopherson wrote: > On Mon, Jul 31, 2023, Sean Christopherson wrote: > > On Mon, Jul 31, 2023, Andrew Jones wrote: > > > diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h > > > index 4cf69fa8bfba..4adf526dc378 100644 > > > --- a/tools/testing/selftests/kvm/include/ucall_common.h > > > +++ b/tools/testing/selftests/kvm/include/ucall_common.h > > > @@ -6,8 +6,19 @@ > > > */ > > > #ifndef SELFTEST_KVM_UCALL_COMMON_H > > > #define SELFTEST_KVM_UCALL_COMMON_H > > > +#include > > > #include "test_util.h" > > > > > > +#if defined(__aarch64__) > > > +#define UCALL_EXIT_REASON KVM_EXIT_MMIO > > > +#elif defined(__x86_64__) > > > +#define UCALL_EXIT_REASON KVM_EXIT_IO > > > +#elif defined(__s390x__) > > > +#define UCALL_EXIT_REASON KVM_EXIT_S390_SIEIC > > > +#elif defined(__riscv) > > > +#define UCALL_EXIT_REASON KVM_EXIT_RISCV_SBI > > > +#endif > > > + > > > /* Common ucalls */ > > > enum { > > > UCALL_NONE, > > > > > > and then compiled the test for riscv and it passed. I also ran all other > > > riscv tests successfully. > > > > Can I have your SoB for the ucall_common.h patch? I'll write a changelog and fold > > in a separate prep patch for that change. > > On second thought, I take that back. I think it makes more sense to add a ucall.h > for each arch and #define the exit type there. All then move all of the > ucall_arch_do_ucall() implementations to ucall.h (except maybe x86 while it has > the horrific save/restore GPRs hack...). That way the #define is colocated with > the code that generates the exit reason. Yup, feel free to just take the above as inspiration and create a different patch. If you decide you want an s-o-b for the above, though, then here's one Signed-off-by: Andrew Jones Thanks, drew