Message ID | cover.1690273969.git.haibo1.xu@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2329150vqg; Tue, 25 Jul 2023 01:50:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlErN0XVDK6ZHmr7jFUfvnWxAVhPOOdIzLosbMnOHaSopn8z/0AymATUe6oxlXXlDtnreLRV X-Received: by 2002:a17:907:75ed:b0:993:f349:c98d with SMTP id jz13-20020a17090775ed00b00993f349c98dmr10606317ejc.1.1690275012063; Tue, 25 Jul 2023 01:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690275012; cv=none; d=google.com; s=arc-20160816; b=WAvGuWD6Lynf55Dp5ZAz986GlyUVSYJ6dTFziiymDx3KaF+BF09EXRN+48YTTfHXQp bLHklYGXi4p7A1PvgrWGt4corAbs2FGd1q7KCuoQY395+htQxdRuW91AM3ekNE7v39GL eiD6pOBhd8Vm6BkYGBsLRVyylEEk4oLZ0X1fu/NSRi3fEm2ToFyXRSfTMox2Kak/lMI3 +96QlBjH3pR44eQdFHHgoC+HQV4U8htf8ydh4lz85E0WdJ5DhU2vPNbR498ljrts4yNH vQmZk7zQjGAxD0RjaYu/KynLreBEcsY+lrXYqPuV7qgFwKmqJ4oygHKFoxlXwW4llY4X CI6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=DqJnp444zT0VaMmuonpgAeMGVSsk+kGPly2kJOi1/UQ=; fh=pxd9OMjSIsKAAccYYT3copIeBdeF89shlOoK4+7nRJk=; b=FrBPW0YQwvanaN4hxRual8hGv/j1oh+qNrcg9c7bX5D2cmL1ONPsGfn7SsW5SlZ/xo IaAjD4S4oIOSOA5doInaN3zF6WQ6tgOuMbVg0m8Eq+N78du84OhvSPrhpfZtnAG2uAXe 67rMrAXv0521e7BiADLie0haC9fmLsVTLPlvDseetw7rDqH1g9YPOkUOaYIsug9kloxL 2mfLoCq5q6aiUS5LGBQIyGhne2hujb3CR8a0U0szTdIqBbBEme9oJdFmN8u5fkCeTCbB BPhIRMT+VE9LnT7sY9Hq4S/3fBenh1C+UHs9O+a07cAf4N6tsLPQSMt/NACxcBXXW8jX /rNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=RZL65WFy; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v19-20020a170906339300b00988892c4fe4si7518975eja.903.2023.07.25.01.49.47; Tue, 25 Jul 2023 01:50:12 -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=fail header.i=@intel.com header.s=Intel header.b=RZL65WFy; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229558AbjGYIgA (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Tue, 25 Jul 2023 04:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbjGYIf5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 04:35:57 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB4919C; Tue, 25 Jul 2023 01:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690274156; x=1721810156; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Oi5o0PQk3nmBZgGrsnz6JWHqLdL0Xutih7n1mhmf6sQ=; b=RZL65WFyvfiOHJ0apQgV9QtLBlxh76m1BkpmlvHgzpeI0SFWokWh/BHA qxc6gnDE/M6FF5wox1pi261Dg1ZYB77VAUgsXiO3Ud5UsX1rFc5OOLDph Jb4KG9U12j20/sJEjGOHsZQVkEYAeo2yp0N4YKVfbEUqA9Ufkzxotv+Ak R2kp3v5lQs1x9ZbQrxTOQ18JM8LTF5h/cJAIfjM90xHpJPaPvFcqa2QbQ fnm4D5K8OAuDd9disW469guxi74//Bk2FfwcaEjXgvGRA3PejZJSbNAn+ UxXMfRvQsDAeLar+6V3B4Nx98IzQ0cCmwloLejDBS7DhxAPElrBmoOg1E w==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="371264137" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="371264137" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:35:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="761129972" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="761129972" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:35:45 -0700 From: Haibo Xu <haibo1.xu@intel.com> Cc: xiaobo55x@gmail.com, haibo1.xu@intel.com, ajones@ventanamicro.com, maz@kernel.org, oliver.upton@linux.dev, seanjc@google.com, Paolo Bonzini <pbonzini@redhat.com>, Jonathan Corbet <corbet@lwn.net>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Shuah Khan <shuah@kernel.org>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Ricardo Koller <ricarkol@google.com>, Vishal Annapurve <vannapurve@google.com>, Like Xu <likexu@tencent.com>, Vipin Sharma <vipinsh@google.com>, David Matlack <dmatlack@google.com>, Colton Lewis <coltonlewis@google.com>, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: [PATCH v6 00/13] RISCV: Add KVM_GET_REG_LIST API Date: Tue, 25 Jul 2023 16:41:26 +0800 Message-Id: <cover.1690273969.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772381810778076913 X-GMAIL-MSGID: 1772381810778076913 |
Series |
RISCV: Add KVM_GET_REG_LIST API
|
|
Message
Haibo Xu
July 25, 2023, 8:41 a.m. UTC
KVM_GET_REG_LIST will dump all register IDs that are available to KVM_GET/SET_ONE_REG and It's very useful to identify some platform regression issue during VM migration. Patch 1-7 re-structured the get-reg-list test in aarch64 to make some of the code as common test framework that can be shared by riscv. Patch 8 move reject_set check logic to a function so as to check for different errno for different registers. Patch 9 move finalize_vcpu back to run_test so that riscv can implement its specific operation. Patch 10 change to do the get/set operation only on present-blessed list. Patch 11 add the skip_set facilities so that riscv can skip set operation on some registers. Patch 12 enabled the KVM_GET_REG_LIST API in riscv. patch 13 added the corresponding kselftest for checking possible register regressions. The get-reg-list kvm selftest was ported from aarch64 and tested with Linux v6.5-rc3 on a Qemu riscv64 virt machine. --- Changed since v5: * Rebase to v6.5-rc3 * Minor fix for Andrew's comments Andrew Jones (7): KVM: arm64: selftests: Replace str_with_index with strdup_printf KVM: arm64: selftests: Drop SVE cap check in print_reg KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h KVM: arm64: selftests: Delete core_reg_fixup KVM: arm64: selftests: Split get-reg-list test code KVM: arm64: selftests: Finish generalizing get-reg-list Haibo Xu (6): KVM: arm64: selftests: Move reject_set check logic to a function KVM: arm64: selftests: Move finalize_vcpu back to run_test KVM: selftests: Only do get/set tests on present blessed list KVM: selftests: Add skip_set facility to get_reg_list test KVM: riscv: Add KVM_GET_REG_LIST API support KVM: riscv: selftests: Add get-reg-list test Documentation/virt/kvm/api.rst | 2 +- arch/riscv/kvm/vcpu.c | 375 +++++++++ tools/testing/selftests/kvm/Makefile | 13 +- .../selftests/kvm/aarch64/get-reg-list.c | 554 ++----------- tools/testing/selftests/kvm/get-reg-list.c | 401 +++++++++ .../selftests/kvm/include/kvm_util_base.h | 21 + .../selftests/kvm/include/riscv/processor.h | 3 + .../testing/selftests/kvm/include/test_util.h | 2 + tools/testing/selftests/kvm/lib/test_util.c | 15 + .../selftests/kvm/riscv/get-reg-list.c | 780 ++++++++++++++++++ 10 files changed, 1670 insertions(+), 496 deletions(-) create mode 100644 tools/testing/selftests/kvm/get-reg-list.c create mode 100644 tools/testing/selftests/kvm/riscv/get-reg-list.c
Comments
Hi Marc, Hi Oliver, On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > KVM_GET_REG_LIST will dump all register IDs that are available to > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > regression issue during VM migration. > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > of the code as common test framework that can be shared by riscv. > > Patch 8 move reject_set check logic to a function so as to check for > different errno for different registers. > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > its specific operation. > Patch 10 change to do the get/set operation only on present-blessed list. > Patch 11 add the skip_set facilities so that riscv can skip set operation > on some registers. > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > patch 13 added the corresponding kselftest for checking possible > register regressions. > > The get-reg-list kvm selftest was ported from aarch64 and tested with > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > --- > Changed since v5: > * Rebase to v6.5-rc3 > * Minor fix for Andrew's comments > > Andrew Jones (7): > KVM: arm64: selftests: Replace str_with_index with strdup_printf > KVM: arm64: selftests: Drop SVE cap check in print_reg > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > KVM: arm64: selftests: Delete core_reg_fixup > KVM: arm64: selftests: Split get-reg-list test code > KVM: arm64: selftests: Finish generalizing get-reg-list > > Haibo Xu (6): > KVM: arm64: selftests: Move reject_set check logic to a function > KVM: arm64: selftests: Move finalize_vcpu back to run_test > KVM: selftests: Only do get/set tests on present blessed list > KVM: selftests: Add skip_set facility to get_reg_list test > KVM: riscv: Add KVM_GET_REG_LIST API support > KVM: riscv: selftests: Add get-reg-list test Are you okay for this series to go through the KVM RISC-V tree ? Regards, Anup > > Documentation/virt/kvm/api.rst | 2 +- > arch/riscv/kvm/vcpu.c | 375 +++++++++ > tools/testing/selftests/kvm/Makefile | 13 +- > .../selftests/kvm/aarch64/get-reg-list.c | 554 ++----------- > tools/testing/selftests/kvm/get-reg-list.c | 401 +++++++++ > .../selftests/kvm/include/kvm_util_base.h | 21 + > .../selftests/kvm/include/riscv/processor.h | 3 + > .../testing/selftests/kvm/include/test_util.h | 2 + > tools/testing/selftests/kvm/lib/test_util.c | 15 + > .../selftests/kvm/riscv/get-reg-list.c | 780 ++++++++++++++++++ > 10 files changed, 1670 insertions(+), 496 deletions(-) > create mode 100644 tools/testing/selftests/kvm/get-reg-list.c > create mode 100644 tools/testing/selftests/kvm/riscv/get-reg-list.c > > -- > 2.34.1 >
On Mon, 07 Aug 2023 04:48:33 +0100, Anup Patel <anup@brainfault.org> wrote: > > Hi Marc, Hi Oliver, > > On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > > > KVM_GET_REG_LIST will dump all register IDs that are available to > > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > > regression issue during VM migration. > > > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > > of the code as common test framework that can be shared by riscv. > > > > Patch 8 move reject_set check logic to a function so as to check for > > different errno for different registers. > > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > > its specific operation. > > Patch 10 change to do the get/set operation only on present-blessed list. > > Patch 11 add the skip_set facilities so that riscv can skip set operation > > on some registers. > > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > > patch 13 added the corresponding kselftest for checking possible > > register regressions. > > > > The get-reg-list kvm selftest was ported from aarch64 and tested with > > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > --- > > Changed since v5: > > * Rebase to v6.5-rc3 > > * Minor fix for Andrew's comments > > > > Andrew Jones (7): > > KVM: arm64: selftests: Replace str_with_index with strdup_printf > > KVM: arm64: selftests: Drop SVE cap check in print_reg > > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > > KVM: arm64: selftests: Delete core_reg_fixup > > KVM: arm64: selftests: Split get-reg-list test code > > KVM: arm64: selftests: Finish generalizing get-reg-list > > > > Haibo Xu (6): > > KVM: arm64: selftests: Move reject_set check logic to a function > > KVM: arm64: selftests: Move finalize_vcpu back to run_test > > KVM: selftests: Only do get/set tests on present blessed list > > KVM: selftests: Add skip_set facility to get_reg_list test > > KVM: riscv: Add KVM_GET_REG_LIST API support > > KVM: riscv: selftests: Add get-reg-list test > > Are you okay for this series to go through the KVM RISC-V tree ? Sure, seems fine from my point of view. But please put it on an immutable topic branch so that we can also merge it in the arm64 tree, should we need to resolve any conflicts. Thanks, M.
On Tue, Aug 8, 2023 at 7:12 PM Marc Zyngier <maz@kernel.org> wrote: > > On Mon, 07 Aug 2023 04:48:33 +0100, > Anup Patel <anup@brainfault.org> wrote: > > > > Hi Marc, Hi Oliver, > > > > On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > > > > > KVM_GET_REG_LIST will dump all register IDs that are available to > > > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > > > regression issue during VM migration. > > > > > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > > > of the code as common test framework that can be shared by riscv. > > > > > > Patch 8 move reject_set check logic to a function so as to check for > > > different errno for different registers. > > > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > > > its specific operation. > > > Patch 10 change to do the get/set operation only on present-blessed list. > > > Patch 11 add the skip_set facilities so that riscv can skip set operation > > > on some registers. > > > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > > > patch 13 added the corresponding kselftest for checking possible > > > register regressions. > > > > > > The get-reg-list kvm selftest was ported from aarch64 and tested with > > > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > > > --- > > > Changed since v5: > > > * Rebase to v6.5-rc3 > > > * Minor fix for Andrew's comments > > > > > > Andrew Jones (7): > > > KVM: arm64: selftests: Replace str_with_index with strdup_printf > > > KVM: arm64: selftests: Drop SVE cap check in print_reg > > > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > > > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > > > KVM: arm64: selftests: Delete core_reg_fixup > > > KVM: arm64: selftests: Split get-reg-list test code > > > KVM: arm64: selftests: Finish generalizing get-reg-list > > > > > > Haibo Xu (6): > > > KVM: arm64: selftests: Move reject_set check logic to a function > > > KVM: arm64: selftests: Move finalize_vcpu back to run_test > > > KVM: selftests: Only do get/set tests on present blessed list > > > KVM: selftests: Add skip_set facility to get_reg_list test > > > KVM: riscv: Add KVM_GET_REG_LIST API support > > > KVM: riscv: selftests: Add get-reg-list test > > > > Are you okay for this series to go through the KVM RISC-V tree ? > > Sure, seems fine from my point of view. But please put it on an > immutable topic branch so that we can also merge it in the arm64 tree, > should we need to resolve any conflicts. > Hi Marc, Thanks for your review! Which topic branch do you prefer or suggest to use? I can do a rebase on it and fix any potential conflicts. Regards, Haibo > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible.
On Wed, Aug 9, 2023 at 8:56 AM Haibo Xu <xiaobo55x@gmail.com> wrote: > > On Tue, Aug 8, 2023 at 7:12 PM Marc Zyngier <maz@kernel.org> wrote: > > > > On Mon, 07 Aug 2023 04:48:33 +0100, > > Anup Patel <anup@brainfault.org> wrote: > > > > > > Hi Marc, Hi Oliver, > > > > > > On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > > > > > > > KVM_GET_REG_LIST will dump all register IDs that are available to > > > > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > > > > regression issue during VM migration. > > > > > > > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > > > > of the code as common test framework that can be shared by riscv. > > > > > > > > Patch 8 move reject_set check logic to a function so as to check for > > > > different errno for different registers. > > > > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > > > > its specific operation. > > > > Patch 10 change to do the get/set operation only on present-blessed list. > > > > Patch 11 add the skip_set facilities so that riscv can skip set operation > > > > on some registers. > > > > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > > > > patch 13 added the corresponding kselftest for checking possible > > > > register regressions. > > > > > > > > The get-reg-list kvm selftest was ported from aarch64 and tested with > > > > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > > > > > --- > > > > Changed since v5: > > > > * Rebase to v6.5-rc3 > > > > * Minor fix for Andrew's comments > > > > > > > > Andrew Jones (7): > > > > KVM: arm64: selftests: Replace str_with_index with strdup_printf > > > > KVM: arm64: selftests: Drop SVE cap check in print_reg > > > > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > > > > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > > > > KVM: arm64: selftests: Delete core_reg_fixup > > > > KVM: arm64: selftests: Split get-reg-list test code > > > > KVM: arm64: selftests: Finish generalizing get-reg-list > > > > > > > > Haibo Xu (6): > > > > KVM: arm64: selftests: Move reject_set check logic to a function > > > > KVM: arm64: selftests: Move finalize_vcpu back to run_test > > > > KVM: selftests: Only do get/set tests on present blessed list > > > > KVM: selftests: Add skip_set facility to get_reg_list test > > > > KVM: riscv: Add KVM_GET_REG_LIST API support > > > > KVM: riscv: selftests: Add get-reg-list test > > > > > > Are you okay for this series to go through the KVM RISC-V tree ? > > > > Sure, seems fine from my point of view. But please put it on an > > immutable topic branch so that we can also merge it in the arm64 tree, > > should we need to resolve any conflicts. > > > > Hi Marc, > > Thanks for your review! > > Which topic branch do you prefer or suggest to use? > I can do a rebase on it and fix any potential conflicts. I will share a branch with a stable commit history. I have already resolved conflicts at my end. Regards, Anup > > Regards, > Haibo > > > Thanks, > > > > M. > > > > -- > > Without deviation from the norm, progress is not possible.
On Wed, Aug 9, 2023 at 11:48 AM Anup Patel <anup@brainfault.org> wrote: > > On Wed, Aug 9, 2023 at 8:56 AM Haibo Xu <xiaobo55x@gmail.com> wrote: > > > > On Tue, Aug 8, 2023 at 7:12 PM Marc Zyngier <maz@kernel.org> wrote: > > > > > > On Mon, 07 Aug 2023 04:48:33 +0100, > > > Anup Patel <anup@brainfault.org> wrote: > > > > > > > > Hi Marc, Hi Oliver, > > > > > > > > On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > > > > > > > > > KVM_GET_REG_LIST will dump all register IDs that are available to > > > > > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > > > > > regression issue during VM migration. > > > > > > > > > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > > > > > of the code as common test framework that can be shared by riscv. > > > > > > > > > > Patch 8 move reject_set check logic to a function so as to check for > > > > > different errno for different registers. > > > > > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > > > > > its specific operation. > > > > > Patch 10 change to do the get/set operation only on present-blessed list. > > > > > Patch 11 add the skip_set facilities so that riscv can skip set operation > > > > > on some registers. > > > > > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > > > > > patch 13 added the corresponding kselftest for checking possible > > > > > register regressions. > > > > > > > > > > The get-reg-list kvm selftest was ported from aarch64 and tested with > > > > > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > > > > > > > --- > > > > > Changed since v5: > > > > > * Rebase to v6.5-rc3 > > > > > * Minor fix for Andrew's comments > > > > > > > > > > Andrew Jones (7): > > > > > KVM: arm64: selftests: Replace str_with_index with strdup_printf > > > > > KVM: arm64: selftests: Drop SVE cap check in print_reg > > > > > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > > > > > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > > > > > KVM: arm64: selftests: Delete core_reg_fixup > > > > > KVM: arm64: selftests: Split get-reg-list test code > > > > > KVM: arm64: selftests: Finish generalizing get-reg-list > > > > > > > > > > Haibo Xu (6): > > > > > KVM: arm64: selftests: Move reject_set check logic to a function > > > > > KVM: arm64: selftests: Move finalize_vcpu back to run_test > > > > > KVM: selftests: Only do get/set tests on present blessed list > > > > > KVM: selftests: Add skip_set facility to get_reg_list test > > > > > KVM: riscv: Add KVM_GET_REG_LIST API support > > > > > KVM: riscv: selftests: Add get-reg-list test > > > > > > > > Are you okay for this series to go through the KVM RISC-V tree ? > > > > > > Sure, seems fine from my point of view. But please put it on an > > > immutable topic branch so that we can also merge it in the arm64 tree, > > > should we need to resolve any conflicts. > > > > > > > Hi Marc, > > > > Thanks for your review! > > > > Which topic branch do you prefer or suggest to use? > > I can do a rebase on it and fix any potential conflicts. > > I will share a branch with a stable commit history. > I have already resolved conflicts at my end. > Cool! Thanks for your help! > Regards, > Anup > > > > > Regards, > > Haibo > > > > > Thanks, > > > > > > M. > > > > > > -- > > > Without deviation from the norm, progress is not possible.
Hi Marc, On Tue, Aug 8, 2023 at 4:42 PM Marc Zyngier <maz@kernel.org> wrote: > > On Mon, 07 Aug 2023 04:48:33 +0100, > Anup Patel <anup@brainfault.org> wrote: > > > > Hi Marc, Hi Oliver, > > > > On Tue, Jul 25, 2023 at 2:05 PM Haibo Xu <haibo1.xu@intel.com> wrote: > > > > > > KVM_GET_REG_LIST will dump all register IDs that are available to > > > KVM_GET/SET_ONE_REG and It's very useful to identify some platform > > > regression issue during VM migration. > > > > > > Patch 1-7 re-structured the get-reg-list test in aarch64 to make some > > > of the code as common test framework that can be shared by riscv. > > > > > > Patch 8 move reject_set check logic to a function so as to check for > > > different errno for different registers. > > > Patch 9 move finalize_vcpu back to run_test so that riscv can implement > > > its specific operation. > > > Patch 10 change to do the get/set operation only on present-blessed list. > > > Patch 11 add the skip_set facilities so that riscv can skip set operation > > > on some registers. > > > Patch 12 enabled the KVM_GET_REG_LIST API in riscv. > > > patch 13 added the corresponding kselftest for checking possible > > > register regressions. > > > > > > The get-reg-list kvm selftest was ported from aarch64 and tested with > > > Linux v6.5-rc3 on a Qemu riscv64 virt machine. > > > > > > --- > > > Changed since v5: > > > * Rebase to v6.5-rc3 > > > * Minor fix for Andrew's comments > > > > > > Andrew Jones (7): > > > KVM: arm64: selftests: Replace str_with_index with strdup_printf > > > KVM: arm64: selftests: Drop SVE cap check in print_reg > > > KVM: arm64: selftests: Remove print_reg's dependency on vcpu_config > > > KVM: arm64: selftests: Rename vcpu_config and add to kvm_util.h > > > KVM: arm64: selftests: Delete core_reg_fixup > > > KVM: arm64: selftests: Split get-reg-list test code > > > KVM: arm64: selftests: Finish generalizing get-reg-list > > > > > > Haibo Xu (6): > > > KVM: arm64: selftests: Move reject_set check logic to a function > > > KVM: arm64: selftests: Move finalize_vcpu back to run_test > > > KVM: selftests: Only do get/set tests on present blessed list > > > KVM: selftests: Add skip_set facility to get_reg_list test > > > KVM: riscv: Add KVM_GET_REG_LIST API support > > > KVM: riscv: selftests: Add get-reg-list test > > > > Are you okay for this series to go through the KVM RISC-V tree ? > > Sure, seems fine from my point of view. But please put it on an > immutable topic branch so that we can also merge it in the arm64 tree, > should we need to resolve any conflicts. I have created topic branch riscv_kvm_get_reg_list in the KVM RISC-V repo https://github.com/kvm-riscv/linux.git. This branch is based upon Linux-6.5-rc5 and also merged into the riscv_kvm_next branch for the upcoming merge window. Regards, Anup