Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4876167rwb; Mon, 31 Jul 2023 13:53:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlG1HThBiwX91yAMei0Y9m0nnJSnfm/wR5cShFjfCt1uwR/ncuOnwD5G6Zftke5WtgGecsQC X-Received: by 2002:a05:6a21:4887:b0:134:ad98:fb0c with SMTP id av7-20020a056a21488700b00134ad98fb0cmr12194177pzc.4.1690836807556; Mon, 31 Jul 2023 13:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690836807; cv=none; d=google.com; s=arc-20160816; b=XoQijDeY9yd2kQCVIhL+BB0MloskK2vcQbKqhSG+m8SAe+mtoo+KfJdx+h9ai4pOJK D1IwjGkpIutyxbNkHJQEtomuJqWZ2CuvcA8QPiulYE9tnxzWr/2XHVJOQ6nWK8doDwrv V/cTkaa2zhICQeNDt1kmq3P1y5ocxM5FLp23ca3dI+rVtw5bXgwNldsWDeqxA/HweR3v MmCeD4bcCUNkVdPs6XHMJcCK9rOAfNVDL34laXUE05IXmlqrY4/u7GEP9pZhMzxmpr6E nkQZ1fOlEG22Tb1IjYLwsMNMDm640cJcWpPMdG+6O6RNTkGE75/lGW7teHSESaNKvVHX fbvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :reply-to:dkim-signature; bh=6HESCPn2yqkRQlomTDEJ9KEelTSIJogLeTLwuEF5EyM=; fh=CXR3vSfwk/Rbs0FKAI5Y7o7qtIeup4nYBa963sMIKmw=; b=dhi/G25GPE+29sIlV1Usx0LvTnuIsGyPOhIjnXdcdfnC2UWetnUnsUGMUMNTBl+JB7 2rjNTdjckO5DnvDplRkE7OiGLgblhvxVlmbGgY+QG8UnCGKuBuQgUamU4b1K5OUJOVUw YAdT8h1m2f+h3+nBnQp3eqU8YDkX13cntTVdjKrmT3rJcDinPkAuBFoefaPOkCLlpGKt KOJvRtDNK39GwHEAmq9uqPULMxmNTpCfaqDvmnjOI/agwUjS+KeHxsaIpKwWqrH8J7fu rNAsVcMsMDFUD5y65q0KnIDvLt26731R2q7XF8mcPV1yMWvZoAEd7BKST1sVnspJYSC0 enag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=bIOTcPBK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v63-20020a638942000000b00563e1d607bcsi7677988pgd.411.2023.07.31.13.53.15; Mon, 31 Jul 2023 13:53:27 -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=@google.com header.s=20221208 header.b=bIOTcPBK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjGaUac (ORCPT + 99 others); Mon, 31 Jul 2023 16:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbjGaUaa (ORCPT ); Mon, 31 Jul 2023 16:30:30 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDEB4E52 for ; Mon, 31 Jul 2023 13:30:29 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id 41be03b00d2f7-564656d952aso318471a12.3 for ; Mon, 31 Jul 2023 13:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690835429; x=1691440229; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=6HESCPn2yqkRQlomTDEJ9KEelTSIJogLeTLwuEF5EyM=; b=bIOTcPBKQpMsQ2T038vAoGELSwehmJJHLXxm0vf7EKuC0vlU7oM5xb+0JHY8DMrTa6 vjiCtfDi4kTL5EtobGmC5eLwYHbbPwoALsuGqqELp5A7ErCquVX5RBodMXTmxdcTgoIT 8kq/f6qU3bnUXYaTjESLcAXCoJvZQITEk4SpczPfkH8r3ILgy3m6n3RJ/v2yt6dXQ5Tq yN8F33WdnVS7aXG/I3E80Chr/bnZInSl3kaP12QzmDAm0HT/ApcbtFahnvurMVvg3cfr DwCh3X+vO2C96IswGqZFhexHyjKLpwTvqH5fXuFj7Xr5L+1/Z2YMfjRHJ0BN3KDE8yVp APBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690835429; x=1691440229; h=cc:to:from:subject:message-id:mime-version:date:reply-to :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6HESCPn2yqkRQlomTDEJ9KEelTSIJogLeTLwuEF5EyM=; b=MAzmwiB4whoJVEEbNMc5Hi2yaE5fk4sTrp+jngz9g6vCa92zNbMc21hW005z/wMGx/ A6Wc32S/gpyX6bvG+iNN4It86jBgPI2xIXKvDoWAFTrHOp1UX5nRXUg0jZDW87EUHDYb Af8wCOhW0xBXHn0PgFUPTbz+xZXWRv5pFSqLnY2eVzhO2UDskqPWZWE7ZuU58ftovRZ7 wMRSe/tfqgt5YZLFWPm3SGSGZKw0Pjb1vLVM4nEJOlz3lIjwQvLnOGF+E78HNA2uPW05 7kewCx6Fj1XcZM7Ht1eRfzTtj2snwMmXyVFcRCutATfR6EoV/ewBzAlhpvNWCzn8J2ko XUUw== X-Gm-Message-State: ABy/qLa6velU/x1wq4412bXcLBwJ80HF5itJseK/NYW4D3upiAnZF+1V nMH6IxhEQYnIguWe2hAvVwy51cLReRY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:d4c8:b0:1ba:ff36:e0d7 with SMTP id o8-20020a170902d4c800b001baff36e0d7mr46611plg.12.1690835429354; Mon, 31 Jul 2023 13:30:29 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 31 Jul 2023 13:30:23 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <20230731203026.1192091-1-seanjc@google.com> Subject: [PATCH v4.1 0/3] KVM: selftests: Guest printf extra prep patches From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Christopherson , Andrew Jones , Aaron Lewis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham 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 Delta patches for v4 of the guest printf series to enable guest_printf_test for all architectures. Sending all 36 patches seemed counter-productive, and I want to get input on adding ucall.h asap. v4.1: - Add ucall.h and have each arch UCALL_EXIT_REASON so that generic code can query whether or not a ucall exit actually occurred. [Drew] - Use UCALL_EXIT_REASON in guest_printf_test.c and enable the test for all architectures. [Drew] v4: https://lore.kernel.org/all/20230729003643.1053367-1-seanjc@google.com Aaron Lewis (1): KVM: selftests: Add a selftest for guest prints and formatted asserts Sean Christopherson (2): KVM: selftests: Add arch ucall.h and inline simple arch hooks KVM: selftests: Add #define of expected KVM exit reason for ucall tools/testing/selftests/kvm/Makefile | 4 + .../testing/selftests/kvm/guest_print_test.c | 221 ++++++++++++++++++ .../selftests/kvm/include/aarch64/ucall.h | 20 ++ .../selftests/kvm/include/riscv/ucall.h | 20 ++ .../selftests/kvm/include/s390x/ucall.h | 19 ++ .../selftests/kvm/include/ucall_common.h | 1 + .../selftests/kvm/include/x86_64/ucall.h | 13 ++ .../testing/selftests/kvm/lib/aarch64/ucall.c | 11 +- tools/testing/selftests/kvm/lib/riscv/ucall.c | 11 - tools/testing/selftests/kvm/lib/s390x/ucall.c | 10 - .../testing/selftests/kvm/lib/x86_64/ucall.c | 4 - 11 files changed, 299 insertions(+), 35 deletions(-) create mode 100644 tools/testing/selftests/kvm/guest_print_test.c create mode 100644 tools/testing/selftests/kvm/include/aarch64/ucall.h create mode 100644 tools/testing/selftests/kvm/include/riscv/ucall.h create mode 100644 tools/testing/selftests/kvm/include/s390x/ucall.h create mode 100644 tools/testing/selftests/kvm/include/x86_64/ucall.h base-commit: 12dcd9e1fe9264d306837622952b8f79d1181fab -- 2.41.0.585.gd2178a4bd4-goog