From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A79C841D655 for ; Tue, 22 Sep 2026 18:29:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790101757; cv=none; b=FHPVjaBca5Z0JESOE/Aip2+n4NqNe6rekISnKhdlghkMxQcge7zZ/GzWVHjW+48t43bvtGTomWrEqv8oa4wiymJjiJVUUowv2IsjX7rUMdB4kkuz8q8f0KhEdclQWJSqSDC//k9ufGGNyilZ2cp1P4FBz2qS6lboPte7ndWXo6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790101757; c=relaxed/simple; bh=aFAuN6Oq4Zw4ipPVDHTfDM24/NOJlJiRcfxatgz4T+8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bpyJm/uydz6niMK4r2ogCjuaqzwEC5IMO5X//fRtEbL+TpPiGXIMPJwb0WmOG9hZwCQKa2FL1M5xyZq0n4NZ56bcmL/pyGQMtfQevQNS5nOHiwG1FNadOdrrR70b71Khj0neJaLzvAUjViHzs8z7f1kLTWWRswPOJx4uZBI4Sh0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HTyc4tA0; arc=none smtp.client-ip=74.125.82.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HTyc4tA0" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-3115c4451c8so69048eec.1 for ; Tue, 22 Sep 2026 11:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790101755; x=1790706555; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=boc46Sj1HOU4tKyVBAaYU0tHsUhuDqMurhOITlCOjEQ=; b=HTyc4tA05qQlWJCA+Mr9M1LLGWpjMvFDTfNtt728sKf9BiJz2L+QQg4V4lXQ7o2AYs ntxzHAMk4uX/PHP2fHkeVYq8YdUi1pPnimTPyYKJGb83rcuVPaG2Dn3s9LUyBCAdMZOb nAg67JoNYnD4Oxu82/3skMt0uB/HW1LJHDAJVLF6Ayg4ciASKbxEylsxOreeWXf7Hbk1 Bgp264cnKhZwpHqdBAGukrmnty3PsSEI2BJng0Lz1gfDl4HKnRjTG3LWCX5WhexehgUU uxEDASNTk6GdLbZgukuymXqyjBUcNUYwAwKKQHnw+2tJjFAaFW7jwxEerqn8zwRzl8HF uFeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790101755; x=1790706555; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=boc46Sj1HOU4tKyVBAaYU0tHsUhuDqMurhOITlCOjEQ=; b=dlzgGQxj1LjkC0n4D609CcJqgkae5YlyLJ1WillEB2LmCzsbEBPe3ib8TgnPWlkSlJ IMOvPSwlX7thX/GGUyrUXAvrvxLLX57Yu8/F47+UC9Hqp71VSWusCln8QLVH9Y3DrH0Q 3e1Q2c9bsWfYEm38C+vxdOZ4UL8kn2H9BUAeN31FHuPiUDrPzaa40DK6A7WltqHMZGtV 9s0ZIdFtBiz+bqPBt3U7Yma6WnulkXkMM5IJ2hmhuVTd1tM/jG1uHAqPDwleH2+XF9U0 f7KYNWxE4MKgDPCceZCUMPOgvX+eN84ftMutXspiYhZJVo6QsrrciWVU2eGrg6Nt1AjE 64mg== X-Forwarded-Encrypted: i=1; AKwUvBzr1iz40lMSEnUk69cBKMGnE9KEJE5dWIDSgF143zAT3z6RsrtrTSd3WW1l0fHAeC7D+rQ50rQMFoODPmU=@vger.kernel.org X-Gm-Message-State: AFuF++m384woj45/jTXWwN7iXS8QxzMxQcl26SElo+/3o+ohcVD+H9vM 22jItFLNZGC62R5epXjzDcKaow2zRrzHoTtH6WO2sVmguA8nFzlua+fe X-Gm-Gg: AYBFou06fYmXCmMyvhuj8xvKcEREYZctSbZUKKi3vWj1sR3prxQz7v3bzsgYfNcuj/a R8FLepAUwvb+An4KeFFRqDqoCJiW2J4HRaCfqlu1AI8mq9dLWrprjw5JFChgOHIV9heNgQK8v7d IJhP4CpisSRlYsoU0nEH4s37rXXz3AOGX5NZNE7Thbwr+M2iXSkibdc94uMNrCkii19jRPK/JZb 6Av4mzFHru3u0Bt6bhpeDuVBwg2Bvj+q+AZ2RtNgs8bkRvNCRA6zanSKkZdIvjZu4JEJ94nZEoT ab1BQgbe1D5nlUOiEyLbF5W1njOkl6AQ3+CNTS77UiquwLa3jrFJ9Rarxgt7JPY9wpum3sXbNRC qVJi09THr1GdBg1udyWWsfG1faTfc4o0NWkbbGEh+FE2lNJUCLQvk2h6FRFQwTVWui5dS6EFU1T CWw4eMMw/Q894VuKCsawPSzKLikcssefuSKraj9Ao2UGMIEV2DH11vgW5Q2qFiHng2FbsCSzrVj z6fN+IdZnGsAZGFRpR51Ki66jmAhGXUjHvStBc9hckcEyUisZe8/qYVPNrI X-Received: by 2002:a05:693c:8201:b0:332:946c:477a with SMTP id 5a478bee46e88-33e5ca9fe0cmr241891eec.16.1790101753804; Tue, 22 Sep 2026 11:29:13 -0700 (PDT) Received: from pve-server.rlab ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33e939fdabcsm154315eec.3.2026.09.22.11.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2026 11:29:12 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: kvm@vger.kernel.org Cc: Sean Christopherson , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Christophe Leroy , Anushree Mathur , Venkat Rao Bagalkote , Harsh Prateek Bora , Madhavan Srinivasan , Shrikanth Hegde , linux-kernel@vger.kernel.org, "Ritesh Harjani (IBM)" Subject: [PATCH v5 0/9] KVM: selftests: add powerpc support Date: Tue, 22 Sep 2026 23:58:44 +0530 Message-Id: X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Patch v4 -> v5: ============== - Fixed the issues reported by Anushree while running on kvm on powervm (nested). - Fixed memslot_perf_test on powerpc. PATCH v3 -> PATCH v4: ================== - Rebased on top of Sean's new page allocator patch series v2 [1] This allowed to drop and patch-2 since it will now come from Sean's v2. - Addressed review comments from Sean - squashed patches 6-10 in patch-1 of this. - Dropped patch-5 to print vcpu_id when KVM_CREATE_VCPU ioctl fails. - Added additional patch-3 to this series to allow dirty_log_test to run on all big-endian machines. [1]: https://lore.kernel.org/kvm/20260902164123.2546762-1-seanjc@google.com/ [v3]: https://lore.kernel.org/linuxppc-dev/2d2c46be7f051c7f1c645afaec67f57067d37a81.1781093720.git.ritesh.list@gmail.com/ Testing updates: ================ I have done some fair amount of testing of the selftests both on real HW and using various combinations on qemu (powernv+LE (default), pseries+cap-nested-hv, pseries+cap-nested-papr, powernv+BE). There were few powerpc kvm kernel fixes which were identified as part of this work. I will send those patches separately as those anyway needs to go in separately. ======================================================= Hi All, This series primarly adds KVM selftests support for powerpc (64-bit, BookS, radix MMU). This patch series is originally Nick's work. I have mainly only rebased it on the latest upstream tree. Since the rebase required few changes to all the four patches (Patch 1-4), I have dropped the earlier Acked-by from Michael Ellerman. Since the last series was posted three years ago [1], I am resetting the version to RFC. This rebase was done as part of a larger effort to improve the selftests infrastructure for Linux on PowerPC tree. Thanks to Harsh and Maddy for their help on this. Nicholas Piggin (1): KVM: PPC: selftests: add support for powerpc Ritesh Harjani (IBM) (8): KVM: selftests: Enable kvm_create_max_vcpus test for powerpc KVM: selftests: Don't limit LE dirty-bitmap bitops to s390x KVM: selftests: Split out a KVM_CREATE_VCPU helper that can fail KVM: selftests: Make kvm_create_max_vcpus tolerate ENOMEM KVM: selftests: Limit the number of VM creates in hardware_disable_test KVM: PPC: selftests: Make nested case on pseries LPARs as resource constrained KVM: PPC: selftests: Skip idle-page check when running nested on pseries LPAR KVM: selftests: Move memslot_perf_test off the 256M ELF load address MAINTAINERS | 2 + tools/testing/selftests/kvm/Makefile | 2 +- tools/testing/selftests/kvm/Makefile.kvm | 10 + .../selftests/kvm/access_tracking_perf_test.c | 11 + tools/testing/selftests/kvm/dirty_log_test.c | 12 +- .../selftests/kvm/hardware_disable_test.c | 7 +- .../testing/selftests/kvm/include/kvm_util.h | 13 + .../selftests/kvm/include/powerpc/hcall.h | 17 + .../kvm/include/powerpc/kvm_util_arch.h | 22 + .../selftests/kvm/include/powerpc/ppc_asm.h | 32 ++ .../selftests/kvm/include/powerpc/processor.h | 46 ++ .../selftests/kvm/include/powerpc/ucall.h | 21 + .../selftests/kvm/kvm_create_max_vcpus.c | 29 +- tools/testing/selftests/kvm/lib/guest_modes.c | 20 +- tools/testing/selftests/kvm/lib/kvm_util.c | 39 +- .../selftests/kvm/lib/powerpc/handlers.S | 93 ++++ .../testing/selftests/kvm/lib/powerpc/hcall.c | 45 ++ .../selftests/kvm/lib/powerpc/processor.c | 522 ++++++++++++++++++ .../testing/selftests/kvm/lib/powerpc/ucall.c | 22 + .../testing/selftests/kvm/memslot_perf_test.c | 2 +- 20 files changed, 942 insertions(+), 25 deletions(-) create mode 100644 tools/testing/selftests/kvm/include/powerpc/hcall.h create mode 100644 tools/testing/selftests/kvm/include/powerpc/kvm_util_arch.h create mode 100644 tools/testing/selftests/kvm/include/powerpc/ppc_asm.h create mode 100644 tools/testing/selftests/kvm/include/powerpc/processor.h create mode 100644 tools/testing/selftests/kvm/include/powerpc/ucall.h create mode 100644 tools/testing/selftests/kvm/lib/powerpc/handlers.S create mode 100644 tools/testing/selftests/kvm/lib/powerpc/hcall.c create mode 100644 tools/testing/selftests/kvm/lib/powerpc/processor.c create mode 100644 tools/testing/selftests/kvm/lib/powerpc/ucall.c -- 2.39.5