From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F4EFC04A94 for ; Mon, 31 Jul 2023 18:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjGaSXL (ORCPT ); Mon, 31 Jul 2023 14:23:11 -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-Google-Smtp-Source: APBJJlE51QtfiG+1ENPBZcz/MTN10/l7Xyhmr/3dD4Lp00ivZz+NffJEl0iYsoUxrdAsUIsDuqY10A== 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: 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