From patchwork Mon Jul 31 20:30:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13335413 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD06AC001DE for ; Mon, 31 Jul 2023 20:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID :Mime-Version:Date:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Axiruf9POjcmL1iAfWYRoWZSXizxfAbKbvC6KAwy+zk=; b=QyHuIEKQTub/h0 4O1afPRRAUbrpkXqLQ91yZZSXxjAy7zLkJ8aJ5ugzjJOgzneTQNRgP69yo4UY7UzrgYlNKhfGSo8g F0hdGC5EEFex2gtRSCPJD8sBeCph/ODMaJ7bOPMmdDr67bxisXjbzJYR0y+71klGP3JMtiG3hNdMV qTFhMrjxGLlC4Z1k4A2NlfWjNBnxFvoAl+C7781iUEJmkctyeM2KpVfLnE8vrfHpfZGwYyVPlHZY/ aBn7meJmkhrs7xusGt6fpk7XykUV6I5p7cRCUxuCY0YFLQaYy0TSggOnFeWSNWPx1h5ElDnzjrYX4 0QhPPJnTBQpp0AYKKDGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQZXP-00HHOu-33; Mon, 31 Jul 2023 20:30:43 +0000 Received: from mail-pg1-x549.google.com ([2607:f8b0:4864:20::549]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQZXL-00HHIw-2h for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 20:30:42 +0000 Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-55c04f5827eso3450015a12.1 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=G+3Hlwu49MScMiaHC8L5yxYYlKVI9FfNuVHaSeYlQALcoa0cJQ20xlC+lqjbVcFRyL rlGufp6lsJLzW5TJUkDN1F35q3ojEyL1uyoy5FLGa28N4pp8JncYhRpXgrVOElIdU3SY WAq57GBH2ksnkFH8swP/K/GhLHRA8MDfQZ6IK5FuTVRk74L+gEwDkEh+flmFaDJq/JUQ QmSTmJHG2VaY9ELCmdoBxk8GX+HxYF/j+KG74HrOeH4ay8YAVE7+Vzw+r3t5olHdOXKA s+9mV73xiHPAe4hR4fq8vvw2/QV0XVex0NzajTZykv9wfgnX4xEiGY0TYxMg2X2saErW EcHg== X-Gm-Message-State: ABy/qLZGVUe1Czd3e/b2e5rs+c/5/7PuZTLlDAxiYmgYu9UJonKYOJZ5 GCAgUvGmGtp26ks3NJ4zTD89lGU6uhQ= X-Google-Smtp-Source: APBJJlHgxXlg8+gvx8zA8kKWT9TTiDRE1TpIeTm8T+Air3m+lXVJ5gOGOil9KVUs5jELG98CZaMGEync9vo= 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_133039_881879_BDA33111 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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