Message ID | 20230221163655.920289-1-mizhang@google.com |
---|---|
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 v21csp106276wrd; Tue, 21 Feb 2023 08:37:57 -0800 (PST) X-Google-Smtp-Source: AK7set+f08h2rrOm5vSID0/3nz0W8no5Zyi6pOJdGNaVQyL8NCVO0RwLTnfAOfXgTMXWEwm/KQ4o X-Received: by 2002:aa7:c655:0:b0:4ac:d925:ee82 with SMTP id z21-20020aa7c655000000b004acd925ee82mr6561317edr.28.1676997477451; Tue, 21 Feb 2023 08:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676997477; cv=none; d=google.com; s=arc-20160816; b=p9X7uCMq4GTSg2fyqSaIl06Todi61yt3iu2jJ5Os8cGanpDZ6K88URQRZfWYHCAZpo u3qYGOQJR155qCEc2BcOsGUCyc26ac/S4DN6Phj7A3gQIO61JYgFx+BE9leoQvCupkS/ 3hYFEEHpkWZAwhr1WKCOr+V0cWCd7wcXQUQKgtcaHAwRzJhi4XyzuAfVcmYbeNAh0Dtv 6aPeRk8BNPpa7XIiTsErv7DTdLwZ3FYhONi+5Ms/IBdHaooE6nIZ0Fw+l1zhYYyyya+h 3YGVoPotS9ynGXNRLxqntnUFvgVvpOQIlfXezE5CqbLgestS3E+ilce8obIR41J5Ygrq wReA== 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=r9GngjfEiO2YdAiq4afzZtr0guJMgojljVZUby60vN8=; b=KhCptorUXMvIC7KotTe3/lAxLEF9FKy+pegT6Lok2WXQ/CRZe+Hlk/63GjREHwdgC4 GlHAn9O4hP5LlbmD+H+tPCkRn71q/9mNNldE/yE/Ch4yl7HiTYhQDAWXgl59pi1y+WZZ xJs6mqhS9jBgDNYtY8t3FP0qGGGR3rMecejibvd+uKuEi3KOl5SFdIBYsVzfUZk5zox3 lAHlLn595j43G8gDHYgeYKFL6C0KPqZTqJnCMBtaX01lwpwjWsIjCMGh7zoWopkGrN9b CgHtxLSxob9lUyyyM4XS1jLlh5ss5UibqktjD9fdz7zTgR/GA//qSY1Qlot3/a35zUF9 EBiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mAn0vFk+; 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 r13-20020a056402034d00b004ad7c43aa20si15091890edw.39.2023.02.21.08.37.34; Tue, 21 Feb 2023 08:37:57 -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=mAn0vFk+; 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 S234642AbjBUQhT (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Tue, 21 Feb 2023 11:37:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233464AbjBUQhS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Feb 2023 11:37:18 -0500 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64853279AB for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 08:37:17 -0800 (PST) Received: by mail-pl1-x649.google.com with SMTP id t18-20020a170902e85200b0019c91fd0967so1300047plg.20 for <linux-kernel@vger.kernel.org>; Tue, 21 Feb 2023 08:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=r9GngjfEiO2YdAiq4afzZtr0guJMgojljVZUby60vN8=; b=mAn0vFk+ChTStIeaeuUZlb6J63gdV5C2oabXyKkoizXVxjcJvry0jEzZjeab3B0reB rW1OyjgkgRMEodBTmTl732oY1idaSQYNoLoVzQQYe6gcq70V8wBgWRyji6Sd5miDXnk5 En3GD/SM7Xjx3FIFrJhfqNqbfE08LqNJMsPbMroF5pQjsicLJ6faGW9cKZGnirEyDpxk wxj/DLJbeuvdIuELOOzZn0dBx+2c/hyPjWHBEhGu2UYVWf9AhcU8waBl7NqyI6+rEu+4 AtmXPiN7wX+zF16ZMyP224jrc6LEyWegXd4Z5DBIPfoNQKuUceTZNAfdmMhZc3pKPY4D rWvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=r9GngjfEiO2YdAiq4afzZtr0guJMgojljVZUby60vN8=; b=P3Z9+PusuYEakgn7X8eYPmm7owyXEG8u3qjnNJKSkUNHU58Jylp6O7thKu0VEqKyw5 KGny1z1uyQ1v0M7f4NzXSlDTOb2n78ZAN9XSYy2ve/g4KoefIHYSIvA8+l1LfRsPco6o Ubn1EtXa0N0A3Zvy8RIwxGs6wPHOcbr8Vg8dNqJ/wrd6WGKWWrfwN5Cjut1wfTWuv7cH yjhcN3UCnXUqRwZ2SLCvKFt/RaTpLW+EhRmi7qhBg97mGmWTMYqJYY/FG4mfKzGAnEDi UrBcHqNwIiB/DUIKwFni8r3+AGaKegw/jfkhD66mpiPHsB5JvddSnNxhcOaqqZF97qQL OFYw== X-Gm-Message-State: AO0yUKWD1oHphc/C6o+nTfRuoIJJJsXx3qgVp0xC6IASwm6qz8UG0zcU TizuXdP5Rbq9M1x5gC90Dm4XwCn/i487 X-Received: from mizhang-super.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1071]) (user=mizhang job=sendgmr) by 2002:a17:903:551:b0:19a:81a0:4f7 with SMTP id jo17-20020a170903055100b0019a81a004f7mr742552plb.35.1676997436891; Tue, 21 Feb 2023 08:37:16 -0800 (PST) Reply-To: Mingwei Zhang <mizhang@google.com> Date: Tue, 21 Feb 2023 16:36:42 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Message-ID: <20230221163655.920289-1-mizhang@google.com> Subject: [PATCH v3 00/13] Overhauling amx_test 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=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: <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?1758459307176465610?= X-GMAIL-MSGID: =?utf-8?q?1758459307176465610?= |
Series |
Overhauling amx_test
|
|
Message
Mingwei Zhang
Feb. 21, 2023, 4:36 p.m. UTC
In this version, I have integrated Aaron's changes to the amx_test. In addition, we also integrated one fix patch for a kernel warning due to xsave address issue. Patch 1: Fix a host FPU kernel warning due to missing XTILEDATA in xinit. Patch 2-8: Overhaul amx_test. These patches were basically from v2. Patch 9-13: Overhaul amx_test from Aaron. I modified the changelog a little bit. v2 -> v3: - integrate Aaron's 5 commits with minor changes on commit message. - Add one fix patch for a kernel warning. v2: https://lore.kernel.org/all/20230214184606.510551-1-mizhang@google.com/ Aaron Lewis (5): KVM: selftests: x86: Assert that XTILE is XSAVE-enabled KVM: selftests: x86: Assert that both XTILE{CFG,DATA} are XSAVE-enabled KVM: selftests: x86: Remove redundant check that XSAVE is supported KVM: selftests: x86: Check that the palette table exists before using it KVM: selftests: x86: Check that XTILEDATA supports XFD Mingwei Zhang (8): x86/fpu/xstate: Avoid getting xstate address of init_fpstate if fpstate contains the component KVM: selftests: x86: Add a working xstate data structure KVM: selftests: x86: Fix an error in comment of amx_test KVM: selftests: x86: Add check of CR0.TS in the #NM handler in amx_test KVM: selftests: x86: Add the XFD check to IA32_XFD in #NM handler KVM: selftests: x86: Fix the checks to XFD_ERR using and operation KVM: selftests: x86: Enable checking on xcomp_bv in amx_test KVM: selftests: x86: Repeat the checking of xheader when IA32_XFD[XTILEDATA] is set in amx_test arch/x86/kernel/fpu/xstate.c | 10 ++- .../selftests/kvm/include/x86_64/processor.h | 14 ++++ tools/testing/selftests/kvm/x86_64/amx_test.c | 80 +++++++++---------- 3 files changed, 59 insertions(+), 45 deletions(-)
Comments
On Tue, 21 Feb 2023 16:36:42 +0000, Mingwei Zhang wrote: > In this version, I have integrated Aaron's changes to the amx_test. In > addition, we also integrated one fix patch for a kernel warning due to > xsave address issue. > > Patch 1: > Fix a host FPU kernel warning due to missing XTILEDATA in xinit. > > [...] Applied everything except patch 7 to kvm-x86 selftests. Please holler if I missed something subtle about patch 7 (using & vs. ==). This is at the head of kvm-x86/selftests, i.e. I can fix it up if necessary. [01/13] x86/fpu/xstate: Avoid getting xstate address of init_fpstate if fpstate contains the component (no commit info) [02/13] KVM: selftests: x86: Add a working xstate data structure https://github.com/kvm-x86/linux/commit/03e8ddff78ac [03/13] KVM: selftests: x86: Fix an error in comment of amx_test https://github.com/kvm-x86/linux/commit/c23d3b210baf [04/13] KVM: selftests: x86: Enable checking on xcomp_bv in amx_test https://github.com/kvm-x86/linux/commit/1e2de0651567 [05/13] KVM: selftests: x86: Add check of CR0.TS in the #NM handler in amx_test https://github.com/kvm-x86/linux/commit/04f5d4539105 [06/13] KVM: selftests: x86: Add the XFD check to IA32_XFD in #NM handler https://github.com/kvm-x86/linux/commit/eeae141ddb54 [08/13] KVM: selftests: x86: Repeat the checking of xheader when IA32_XFD[XTILEDATA] is set in amx_test https://github.com/kvm-x86/linux/commit/cabed3f958e9 [09/13] KVM: selftests: x86: Assert that XTILE is XSAVE-enabled https://github.com/kvm-x86/linux/commit/44217830267d [10/13] KVM: selftests: x86: Assert that both XTILE{CFG,DATA} are XSAVE-enabled https://github.com/kvm-x86/linux/commit/7b328195c462 [11/13] KVM: selftests: x86: Remove redundant check that XSAVE is supported https://github.com/kvm-x86/linux/commit/08f63d826980 [12/13] KVM: selftests: x86: Check that the palette table exists before using it https://github.com/kvm-x86/linux/commit/7042ef575496 [13/13] KVM: selftests: x86: Check that XTILEDATA supports XFD https://github.com/kvm-x86/linux/commit/564435d346ff -- https://github.com/kvm-x86/linux/tree/next https://github.com/kvm-x86/linux/tree/fixes
On Fri, Mar 24, 2023, Sean Christopherson wrote: > On Tue, 21 Feb 2023 16:36:42 +0000, Mingwei Zhang wrote: > > In this version, I have integrated Aaron's changes to the amx_test. In > > addition, we also integrated one fix patch for a kernel warning due to > > xsave address issue. > > > > Patch 1: > > Fix a host FPU kernel warning due to missing XTILEDATA in xinit. > > > > [...] > > Applied everything except patch 7 to kvm-x86 selftests. Please holler if I > missed something subtle about patch 7 (using & vs. ==). This is at the head > of kvm-x86/selftests, i.e. I can fix it up if necessary. > > [01/13] x86/fpu/xstate: Avoid getting xstate address of init_fpstate if fpstate contains the component > (no commit info) *sigh* And by "everything" I meant "all of the selftests patches".
On Fri, Mar 24, 2023, Sean Christopherson wrote: > On Fri, Mar 24, 2023, Sean Christopherson wrote: > > On Tue, 21 Feb 2023 16:36:42 +0000, Mingwei Zhang wrote: > > > In this version, I have integrated Aaron's changes to the amx_test. In > > > addition, we also integrated one fix patch for a kernel warning due to > > > xsave address issue. > > > > > > Patch 1: > > > Fix a host FPU kernel warning due to missing XTILEDATA in xinit. > > > > > > [...] > > > > Applied everything except patch 7 to kvm-x86 selftests. Please holler if I > > missed something subtle about patch 7 (using & vs. ==). This is at the head > > of kvm-x86/selftests, i.e. I can fix it up if necessary. > > > > [01/13] x86/fpu/xstate: Avoid getting xstate address of init_fpstate if fpstate contains the component > > (no commit info) > > *sigh* And by "everything" I meant "all of the selftests patches". Continuing my circus of goofs, I already force pushed selftests due to an unrelated mixup. New hashes below (the comment above still stands in case another overwrite is necessary). [1/11] KVM: selftests: Add a fully functional "struct xstate" for x86 https://github.com/kvm-x86/linux/commit/5de4a3765b7e [2/11] KVM: selftests: Fix an error in comment of amx_test https://github.com/kvm-x86/linux/commit/bec357a4af55 [3/11] KVM: selftests: Enable checking on xcomp_bv in amx_test https://github.com/kvm-x86/linux/commit/48ad4222c43c [4/11] KVM: selftests: Add check of CR0.TS in the #NM handler in amx_test https://github.com/kvm-x86/linux/commit/0aeb9729486a [5/11] KVM: selftests: Assert that XTILE_DATA is set in IA32_XFD on #NM https://github.com/kvm-x86/linux/commit/9cbd9aaa670f [6/11] KVM: selftests: Verify XTILE_DATA in XSTATE isn't affected by IA32_XFD https://github.com/kvm-x86/linux/commit/bfc5afc37c9d [7/11] KVM: selftests: Assert that XTILE is XSAVE-enabled https://github.com/kvm-x86/linux/commit/7e1075f05078 [8/11] KVM: selftests: Assert that both XTILE{CFG,DATA} are XSAVE-enabled https://github.com/kvm-x86/linux/commit/2ab3991b0b9b [9/11] KVM: selftests: Move XSAVE and OSXSAVE CPUID checks into AMX's init_regs() https://github.com/kvm-x86/linux/commit/d01d4a4f7bd2 [10/11] KVM: selftests: Check that the palette table exists before using it https://github.com/kvm-x86/linux/commit/d32fb0714293 [11/11] KVM: selftests: Check that XTILEDATA supports XFD https://github.com/kvm-x86/linux/commit/d563164eaeb1