From patchwork Fri Dec 8 02:17:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 175530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5196192vqy; Thu, 7 Dec 2023 18:18:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaW6R1qYcsLnL0Jr7fcfJ2rsntyz8uFoMHVnkKhTw3GCZNizj/6s3Q+crNhKWUeW+zrJhM X-Received: by 2002:a17:902:ec89:b0:1d0:4a2e:1d71 with SMTP id x9-20020a170902ec8900b001d04a2e1d71mr4055286plg.21.1702001885575; Thu, 07 Dec 2023 18:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702001885; cv=none; d=google.com; s=arc-20160816; b=AQnF5oLqhEuHbemEhXbn1VgmRT1FuIvpYreQUJYxMGvrlSr3lIoPvfW3Ba6hefvgUu 1E7LebhangRXdWbR2/PiFx4UBNBd72SseDjYsX3eQigssIYXv1jf3psOZIzMMmAUVfry zUH81zNLjnTLS7e47KVXpoOIk6ux982WDkx7iFWhxpBc3sF8nvNwhXmrnieoFRfl+7eC eSTWDGsRYsJaXlWDFTWA+A0Pj0RHGGYvN/0p9wq9q3LSbM8NVQLm+5p58FhQVjSyHNR8 f1Yv3SRHF4S8ejg/bITu3V/KNZBo+UZa7jC+AdJ+qc8ZI5skDtAC9+D/502NDtnI2Vra 1lsw== 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=h7HcAkk9OcO6R26OdgJnZaKpSN5LYlU1FJ4TjFKmXHk=; fh=dogxdQWc7Q2U5Ekp9F18wEHwMgE3kRwQ/60KgTj3654=; b=lfY2lJzaXAMB+0KW7JxI4Uk6eeYeedQUpDSEj+5OJjDaO/0BtUnmoyHgWh1RsYN+WN /n3eCp70D6pOITeIKG6at90PN14nj6yTz+kr9EvoCq9m1VRRG57wAzoUWkH7jKuVvnRT 0RsX/KR/P8P+sJcsBBLSeI4awSgUqR5mE45vP2ssCq64tKaHdVYMoowPnLhLtdHDGOl8 N7yuTSk6svnIB+KUAZKq+FGMcm6SAy62FNf2b0KR5/JsKZ09c87HN2sYQXo2Wy+iZwTI GS/SbjxRYcK5ywvh5NcKhFu1EtquPorJg4JHKbNpvi7wCM2zky82WrZjroyN4pdoYw1K ptqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=w2OtNCVN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s3-20020a170902ea0300b001cc529610e3si722932plg.342.2023.12.07.18.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 18:18:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=w2OtNCVN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A40468040802; Thu, 7 Dec 2023 18:17:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572987AbjLHCR3 (ORCPT + 99 others); Thu, 7 Dec 2023 21:17:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235646AbjLHCR1 (ORCPT ); Thu, 7 Dec 2023 21:17:27 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 306591727 for ; Thu, 7 Dec 2023 18:17:33 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5d3eafe3d17so10052687b3.1 for ; Thu, 07 Dec 2023 18:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702001852; x=1702606652; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=h7HcAkk9OcO6R26OdgJnZaKpSN5LYlU1FJ4TjFKmXHk=; b=w2OtNCVN/oq88R4HPVOGyI2GILwdBmN5uo6io5EXpgCdnhgbt6pU6CGtnvjMBDkxdc jsPyz9caKZzOG16LIsArcDBkBxCvB3bOH9gx8UiJhsaEaXh3sT0vXtBHQ50DSO5vPLLA euucH1+l8LYpic0atZsoj0K1XrrqqHzH7vR0TljldE2X6L/aakrtmIVe915hZg9/8iIz LwEmqoazuAkNSeCz5YGIYRfaseb+Qzg91cVkj6Z6uFUqEiD1g7+46XMFaFngFX+SzKvD V3FeZys6mu0Nx6bqnC2wCEL4c+6nsRAg7pUBhtPow9DOPmdtofUMXyz45kiPYTrc3bsp 3Q2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702001852; x=1702606652; 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=h7HcAkk9OcO6R26OdgJnZaKpSN5LYlU1FJ4TjFKmXHk=; b=QBQEKxn2/tnVnuUfB6IokDyP6Bc2sfekO4oR1MF/RkRfFFHmOLTHwjBRq/bduxXGeL xqSF6riFzDKmX9WWCEIyDz0jryIOBAcMkoxZXM5pGCzwxuSSGO/l/HxSttToEm75PJ1D RAE+kvvObMRIA71X973n1YehWrhnRQxmvDSGPsWafe4Zw1/ObUc6pQ728b6YOfQkGn/v dBTWjESftkIgNjV1AImRLFSuqK/1A7bdnEaMNuv6Drxuvx41rhuqyXUx6bQCH2G4xw/6 mHHtKmzFH7z70b2VS0zyO42YQ+6+Asqs0i9+RAhKGeigTDwRBfyvIB4XDciTOBwPtG6d ia/Q== X-Gm-Message-State: AOJu0YzwAu2yvpDBUIwul6IlHuGKEMoCCq904vXjI7HacASM/MG4bwSa b599cc4DpdrUN4mLVWs1lR7s7TS7gH8= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:14d:b0:db5:3aaf:5207 with SMTP id p13-20020a056902014d00b00db53aaf5207mr2547ybh.3.1702001852402; Thu, 07 Dec 2023 18:17:32 -0800 (PST) Reply-To: Sean Christopherson Date: Thu, 7 Dec 2023 18:17:08 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20231208021708.1707327-1-seanjc@google.com> Subject: [GIT PULL] KVM: selftests: Fixes and cleanups for 6.7-rcN From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 18:17:39 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784678329162371206 X-GMAIL-MSGID: 1784678329162371206 Please pull selftests fixes/cleanups for 6.7. The big change is adding __printf() annotation to the guest printf/assert helpers, which is waaay better than me playing whack-a-mole when tests fail (I'm still laughing at myself for not realizing what that annotation does). The following changes since commit e9e60c82fe391d04db55a91c733df4a017c28b2f: selftests/kvm: fix compilation on non-x86_64 platforms (2023-11-21 11:58:25 -0500) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.7-rcN for you to fetch changes up to 1b2658e4c709135fe1910423d3216632f641baf9: KVM: selftests: Annotate guest ucall, printf, and assert helpers with __printf() (2023-12-01 08:15:41 -0800) ---------------------------------------------------------------- KVM selftests fixes for 6.7-rcN: - Fix an annoying goof where the NX hugepage test prints out garbage instead of the magic token needed to run the text. - Fix build errors when a header is delete/moved due to a missing flag in the Makefile. - Detect if KVM bugged/killed a selftest's VM and print out a helpful message instead of complaining that a random ioctl() failed. - Annotate the guest printf/assert helpers with __printf(), and fix the various bugs that were lurking due to lack of said annotation. ---------------------------------------------------------------- David Woodhouse (1): KVM: selftests: add -MP to CFLAGS Sean Christopherson (7): KVM: selftests: Drop the single-underscore ioctl() helpers KVM: selftests: Add logic to detect if ioctl() failed because VM was killed KVM: selftests: Remove x86's so called "MMIO warning" test KVM: selftests: Fix MWAIT error message when guest assertion fails KVM: selftests: Fix benign %llx vs. %lx issues in guest asserts KVM: selftests: Fix broken assert messages in Hyper-V features test KVM: selftests: Annotate guest ucall, printf, and assert helpers with __printf() angquan yu (1): KVM: selftests: Actually print out magic token in NX hugepages skip message tools/testing/selftests/kvm/Makefile | 3 +- .../testing/selftests/kvm/include/kvm_util_base.h | 75 ++++++++----- tools/testing/selftests/kvm/include/test_util.h | 2 +- tools/testing/selftests/kvm/include/ucall_common.h | 7 +- tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- .../testing/selftests/kvm/set_memory_region_test.c | 6 +- .../testing/selftests/kvm/x86_64/hyperv_features.c | 10 +- .../selftests/kvm/x86_64/mmio_warning_test.c | 121 --------------------- .../selftests/kvm/x86_64/monitor_mwait_test.c | 6 +- .../selftests/kvm/x86_64/nx_huge_pages_test.c | 2 +- .../kvm/x86_64/private_mem_conversions_test.c | 2 +- .../kvm/x86_64/svm_nested_soft_inject_test.c | 4 +- .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 2 +- .../testing/selftests/kvm/x86_64/xcr0_cpuid_test.c | 8 +- 14 files changed, 78 insertions(+), 172 deletions(-) delete mode 100644 tools/testing/selftests/kvm/x86_64/mmio_warning_test.c