Message ID | 20230221163655.920289-11-mizhang@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp106878wrd; Tue, 21 Feb 2023 08:39:10 -0800 (PST) X-Google-Smtp-Source: AK7set9yr7R/44Nv0bbR509/olxFBvARY51j6v7/MJhnIqZh0aednIv/wghS5a4zuqyRN2nN9J9i X-Received: by 2002:aa7:db82:0:b0:4ad:5217:a191 with SMTP id u2-20020aa7db82000000b004ad5217a191mr4555108edt.42.1676997550632; Tue, 21 Feb 2023 08:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676997550; cv=none; d=google.com; s=arc-20160816; b=R+qoTLKg6AO4BkCy0Hnzbv910EgJf5g8bm7Y+UhJQaBdLwGbng2m/Fp4hATHU6+KUs l1H1UoINx++Iww9uBN0U/BYBqhHHZzbTFzQMmLAAYdHTyAOQ1SZqxsWCzqExPHdQ/6l6 ovC6luJXl3DhJWYwkOD8yVptLHrct82oxsfgkZxOPYg19oDnEVhumPdFSYW76G11ghlF uIbzmjsj5dCqiB4jyYDeZsafGG2TMW3I5NHtsoV7ebsUa9g489JRKmX2mYGhfz72yQhY b168HLw1133SR3NhfksveER0nUwiydIODGcBzWa2NjVq2WRktCQERKMmzS6kkoJW+qlQ kjsw== 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:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=zK45IqxP1dNnwcbmnxiq3xISvws3WCC9xNptFeG9RGY=; b=pSy/O4jybYE+TYngzbnXnhZ733LXBpKdz78dsKeuiDku4M+dnkyv+VHlyOB5jnimkp /NbhAYDeoslMUkBjNVen7wUu2yyOneXMqpMwmWU+BekRPNCA/hANkHxmsiFCOACEcOI1 SDdzOA5S8nuY6l1EIEC8A0GBe+6pqPyBYStuIS2m9WxJPDYxbuFm5kwDfpMahwQTlzoR Ioc2uPYRAAxXlVDaFlSjSUSScxe70v/Ap98N7va0+wwZUZO0SbOcnKC7SB9NYuHHg57S O0p6P0A2QpIZjSoV+7w+EPJs5d7tjUig/7TMOciPPzDd/llC2ZBIMhYKj/Xs0RCtRDiP XXxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Gat5zcpI; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a50ed0c000000b004a05aed2d1fsi651344eds.197.2023.02.21.08.38.47; Tue, 21 Feb 2023 08:39:10 -0800 (PST) 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=20210112 header.b=Gat5zcpI; 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 S234839AbjBUQiU (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Tue, 21 Feb 2023 11:38:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234832AbjBUQh7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Feb 2023 11:37:59 -0500 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDB12DE4E for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 08:37:36 -0800 (PST) Received: by mail-pj1-x1049.google.com with SMTP id s6-20020a17090aba0600b00230ffd3f340so1622792pjr.9 for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 08:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=zK45IqxP1dNnwcbmnxiq3xISvws3WCC9xNptFeG9RGY=; b=Gat5zcpIdqxDUUs9rI3U/ZnYNeRDCgoLyPWphjHiI0NoTTfVzwEtdYFnegIry5t6Bp whgGCn3+2SGGQhoJ/Ak0JM25nAjVuGShFnUeP746rfB5ELk7VYHyBlGXNw+bWuGAbNpU Z525o6MWE7QbLXs3z2fVNZ4J51w6z4iKnak8a42nQwmn1v8qeLPWnihkqbYvcUxT7vhr giL415jit6jUW/p7Vpsl22Ngx/8PNouqTuGxAAKzF7lGNpwMdmK+XhAKYNCUkyIcIerb qLTyR4Yo/3lE6VnJT37dMOAG6/ZJdYn60tzqrpczNKX16BB4mcEUoWRZAguwPrJANmUd Ry7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zK45IqxP1dNnwcbmnxiq3xISvws3WCC9xNptFeG9RGY=; b=Z2RyS+7o/DOaz3s2ftVEBxtTvWaccEKW6UMA0hQUwHxrdlxDobJVg7Qtn2241RGIou oAG5RB0As/xEm8bbN5MGCAjhqDvjZXCVwLL9+I70H8oXfEkxjW2XMq7n6fOy3VfNf7qm OFmH3lX9TC1L5NHqmiGsHLtqu9xVvsmzxkG8ZAuE2IwKhSmjM8YlAg8IWD9DCWbLSJKb l8y7wo06L+Ph5e5XguTtkGshJSfNTwcOppCJJ/bmTkOVYWSneXRuQGehB0XDwl+DhviX gL4ujILvAh6RO+CX6HNoY1dY0ftmMCpJ27Px22VxxiWFd4GT2OK7XcWRmsQOOblV1/6E PfFw== X-Gm-Message-State: AO0yUKVsvUq9nM+w8Bd3DdT+PMG/RYWbpLX5ejuwBzgjtocfjBKTP7i2 /V6OVMRJBp4S5TVxYDbnLSUflBKmX+5J X-Received: from mizhang-super.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1071]) (user=mizhang job=sendgmr) by 2002:a05:6a00:450a:b0:593:d27e:10e0 with SMTP id cw10-20020a056a00450a00b00593d27e10e0mr792249pfb.3.1676997455081; Tue, 21 Feb 2023 08:37:35 -0800 (PST) Reply-To: Mingwei Zhang <mizhang@google.com> Date: Tue, 21 Feb 2023 16:36:52 +0000 In-Reply-To: <20230221163655.920289-1-mizhang@google.com> Mime-Version: 1.0 References: <20230221163655.920289-1-mizhang@google.com> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Message-ID: <20230221163655.920289-11-mizhang@google.com> Subject: [PATCH v3 10/13] KVM: selftests: x86: Assert that both XTILE{CFG,DATA} are XSAVE-enabled From: Mingwei Zhang <mizhang@google.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com>, Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Mingwei Zhang <mizhang@google.com>, Jim Mattson <jmattson@google.com>, Venkatesh Srinivas <venkateshs@google.com>, Aaron Lewis <aaronlewis@google.com>, "Chang S. Bae" <chang.seok.bae@intel.com>, Chao Gao <chao.gao@intel.com> 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_NONE, SPF_HELO_NONE,SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758459383923883844?= X-GMAIL-MSGID: =?utf-8?q?1758459383923883844?= |
Series |
Overhauling amx_test
|
|
Commit Message
Mingwei Zhang
Feb. 21, 2023, 4:36 p.m. UTC
From: Aaron Lewis <aaronlewis@google.com> Assert that both XTILE{CFG,DATA} are XSAVE-enabled. The original check in amx_test only ensures at least one of the XTILE bits are set, XTILECFG or XTILEDATA, when it really should be checking that both are set. Assert that both XTILECFG and XTILEDATA a set. Fixes: bf70636d9443 ("selftest: kvm: Add amx selftest") Signed-off-by: Aaron Lewis <aaronlewis@google.com> Signed-off-by: Mingwei Zhang <mizhang@google.com> --- tools/testing/selftests/kvm/x86_64/amx_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/selftests/kvm/x86_64/amx_test.c index d1fbf8936192..1a1565126255 100644 --- a/tools/testing/selftests/kvm/x86_64/amx_test.c +++ b/tools/testing/selftests/kvm/x86_64/amx_test.c @@ -161,7 +161,7 @@ static void init_regs(void) xcr0 = __xgetbv(0); xcr0 |= XFEATURE_MASK_XTILE; __xsetbv(0x0, xcr0); - GUEST_ASSERT(__xgetbv(0) & XFEATURE_MASK_XTILE); + GUEST_ASSERT((__xgetbv(0) & XFEATURE_MASK_XTILE) == XFEATURE_MASK_XTILE); } static void __attribute__((__flatten__)) guest_code(struct tile_config *amx_cfg,