From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f181.google.com (mail-dy1-f181.google.com [74.125.82.181]) (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 2B2A23B27F6 for ; Tue, 6 Oct 2026 09:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791278663; cv=none; b=gWMK3YAtzYd56GHTbCakFLT/TQd1FP7473diRft4j4fI5JJM5oyhKbUF8SESE9nLT9NUMQxiW54E05B8ISpWxSZiVJM+VYdj/754dxTBGwFn5eAACU+p2pCVQLXhbRlZqXfnm49CWKgVGIAKt1iRr3haCiZDQtVYpe+VwSHbUl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791278663; c=relaxed/simple; bh=srB8N8qCbjn8OYCn/cFHQPSvjruCyxi1S8AXEXH/ON4=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:References; b=an+SFCgoNR8vZ6LLNdAQKo5DYtg3d56vHiZ46v+dMr1YaOVyT/jvDmZV2f0eZ3R+DKFt8z/upgx07gw2LqU0xgB4jv1BAvEq0nGrN/cAj4ROUQY5nx3kRG1/kGnyxfGIb0X0iYwvhqCeHkwvulZCcEehCggoW9fWrOte0NgpAZc= 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=QYIQH0Mq; arc=none smtp.client-ip=74.125.82.181 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="QYIQH0Mq" Received: by mail-dy1-f181.google.com with SMTP id 5a478bee46e88-33e6279a1d7so1447162eec.1 for ; Tue, 06 Oct 2026 02:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791278660; x=1791883460; darn=vger.kernel.org; h=references:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=ohmud8dlW/23qmDZSut2G/bzXusBDFIZZACFjcnqkos=; b=QYIQH0Mqp2AdDZi/sW2pklYv9BKhZvaF/vulbuxItdCqEWdCsBDegt126qtDl5k6cs iqPEIHyBGQC2imrA8VaQjRmgjzw/oD1Fs2ed5W36WNXpouteNCnzKJUSENCI+UOkIn6/ OeXIZ/u8QBm+/FGQl1qc4Kls7u0sb+F3P2Pysz37tzGfpjcYsj7VqXopTA34t6CBtpGP ZK7+eTqCxytlVv2/z6uKHhR+WnT58ieKyaGzi0AT2UnfeiYbdzvY4h6Z/P7585o1VNL7 Fx1Zu+uyYvrqxCi9kbljH58ljg2CGe1VCBfW+2ICBiOGGR/UCw5WHc3q/lPWTj4axGho nfvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791278660; x=1791883460; h=references:message-id:date:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ohmud8dlW/23qmDZSut2G/bzXusBDFIZZACFjcnqkos=; b=Zd0Dx2a3Eo6z2YW0976mliSuXN5qQtXL9eHDNS8+2SibedKaXHqLh/pjHkEuodJjnT NhutUJKWh0PEdSm/6kgW45NWmKY3lnSh8rra6bEdD/OgDUglr6MyTEebUvV1OSomIk3C wVJ/wilc/o/D/nsNRxkE4+oQXXLj3GIZd4DLtXr08rf/q1nATd6lL6U3O1HilP+GWt4m mWPbuoqg0x2n8I1x7m5KASeTahCf1APG1MzsI2S8g45Goh4FsgcuCO5H6H8TfvjYPgNg XIRPJd3G9TDx+hWsHsYlHEK35zuQgYKIZS1GKndOwUv9qPQTIuNGjO4Qx0epbhoboYI8 S55g== X-Forwarded-Encrypted: i=1; AKwUvBzX7O74hHa5p5ZxfTIIzFWRPEZwONTlCR6HvfofK4AYOb64V3eH/2tqeqnyunZR9cxvNOpRcKacpLrs7yY=@vger.kernel.org X-Gm-Message-State: AFuF++k60FZAlVxDQliDVSj9zUot8lShZnHcluGJ5au3HFkjUFitNyKj 8kbbWJuKrpJ7WuQTrpkHbng4j3Z7z+z5pZfqvjSh+Dp/8/KKYzz3bsFwVraI7Q== X-Gm-Gg: AYBFou06Npsvnii+5CINsO8B0y82kjMlaGnWCHJOmFYXgto4IhZ5V++hTvfNGZgPKN6 NJSbqe7/zYyAgu+NAkO3QcW2S5/eG9XUj2uiNtrK9bmXaaWkfwz3Wm7EwOkInjJ0lvg/9EWYL7C 2/NX8g5FSWqsgfqHioemAOFhRVXnUpNE5BAsxEPzZ+2WdRMzUdvsIh5JwKaCAH8MAYbGJBL6+JE HIVKh0tJ2yzhLmXzbO0CP7DfoCjAp0xpqq/LuIogfbF54i7svNLpW2TTB3i6D5DIoOW9+xcbXtw 1GN7b4JKXVIeqiS3sIdU/qdLU1rMpg1KY9TGiXYZdhAS10aLocFFEvvO85yHe0NDELH5/yFYGxz jUd0Qyex5wI9Z92G50oRGAQ0LclxMpYJOgbbRZSn4XHYMu8ghLMMVX2k2B+GGYuybj4ycjCmR8S xXZ39xHzguJDiLcIh1VtYAbeTj326grzREZe6PDlyyCHl/m5+G74/pKzYo5U2dc7yZRZIAJUwPk IwDKSg9b3jp+vAhG5KiAGlIXlMOZtpoaj/pBNSrzlB1AYA1H0xKRA== X-Received: by 2002:a05:7300:51e9:b0:351:52ec:60ee with SMTP id 5a478bee46e88-35152ec672fmr48303eec.28.1791278659872; Tue, 06 Oct 2026 02:24:19 -0700 (PDT) Received: from pve-server ([49.205.216.49]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-351469f73fcsm6424655eec.10.2026.10.06.02.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2026 02:24:18 -0700 (PDT) From: Ritesh Harjani (IBM) To: Sean Christopherson Cc: kvm@vger.kernel.org, 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 Subject: Re: [PATCH v5 0/9] KVM: selftests: add powerpc support In-Reply-To: Date: Tue, 06 Oct 2026 08:13:01 +0530 Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Sean Christopherson writes: > On Mon, Oct 05, 2026, Ritesh Harjani wrote: > > I think I'd even prefer to take on an #ifdef (to scope it to PPC if necessary) >> > over open coding TEST_GEN_PROGS_COMMON. >> >> Sure, so will add this check for kvm_create_max_vcpus() >> >> #ifdef __powerpc64__ >> TEST_REQUIRE(!is_pseries_lpar()); >> #endif > > Or maybe to avoid too many ifdefs, something like: > > static inline kvm_is_ppc_pseries_lpar(void) > { > /* > * Comment about how this setup has unique limitations and isn't > * compatible with tests that create many VMs and/or vCPUs. > */ > #ifdef __powerpc64___ > return !access("/proc/device-tree/rtas/ibm,hypertas-functions", F_OK); > #else > return false; > #endif > } > > Probably redundant naming to some extent, but having "ppc" in there would make it > super obvious it's a PPC-only check. > Sure. So I will get this definition added into kvm_util.h header file. >> Actually I was thinking we may as well use the same check for now for >> skipping hardware_disable_test on pseries. Because there also we suffer >> from the same resource limitation. Let me know if that sounds ok to you >> or do you want us to skip kvm_create_max_vcpus() only for now, since it >> is part of TEST_GEN_PROGS_COMMON? >> >> > LoongArch open coded its full test list >> > for some reason, and in less than a year it has started missing out on new common >> > tests. >> > >> >> (& maybe few others like vm_types_test) from that in v6. >> > >> > What's wrong with VM types test? That one really should Just Work on all >> > architectures. It doesn't run on LoongArch, but I assume that's >> > oversight? >> >> So the test doesn't fail (it gets skipped). However this cap >> "KVM_CAP_VM_TYPES" is only supported on x86 and since I was planning to >> open code all common tests, hence I thought I may as well not add this >> in the first place. > > /facepalm > > I completely forgot KVM_CAP_VM_TYPES is x86-only. FWIW, I'd still say use > TEST_GEN_PROGS_COMMON if possible. > >> BTW, based on this discussion, I think I will re-arrange the patches in >> the following order and send a v7. (The Makefile.kvm changes will only >> get added after the main patch which adds powerpc support). >> >> cfabdb049bd7 2026-10-05 [Ritesh Harjani (IBM)] (HEAD -> feat-ppc-kvm-selftests-new-sean-v7) KVM: selftests: Skip hardware_disable_test on pseries >> 2b51fab87b95 2026-09-22 [Ritesh Harjani (IBM)] KVM: PPC: selftests: Skip idle-page check when running nested on pseries LPAR >> f5d1de1be4e9 2026-10-05 [Ritesh Harjani (IBM)] KVM: selftests: Skip kvm_create_max_vcpus on pseries >> e45ba15cea25 2026-10-03 [Ritesh Harjani (IBM)] KVM: PPC: selftests: Add helper for checking if running nested > > Doesn't this one need to come first? Or is this different than pseries LPAR? > That is correct. The patches are in the reverse order taken from the output of: git log --oneline ... >> 178c9bca0e20 2026-09-22 [Nicholas Piggin] KVM: PPC: selftests: add support for powerpc >> 22320662e776 2026-09-11 [Ritesh Harjani (IBM)] KVM: selftests: Fix kvm_create_max_vcpus test for powerpc > > This should come before "add support for powerpc", and should have a shortlog That is correct. The patches are in the reverse order taken from the output of: git log --oneline ... > more like "Skip max vCPU IDs test on PPC with " > Sure, I will change this to something like: KVM: selftests: Skip the max vCPU ID test when KVM_CAP_PPC_SMT is set kvm_create_max_vcpus creates vCPUs from 0..MAX_VCPUS-1, then again with ids at the top of KVM_CAP_MAX_VCPU_ID. On PowerPC the vCPU id is not a flat index: it encodes SMT thread plus core. So on powerpc maximum permitted vCPU ID depends on the VM's SMT mode and the maximum reported by KVM_CAP_MAX_VCPU_ID exceeds a simple non-SMT VM's limit. So, skip that second loop when KVM_CAP_PPC_SMT is non-zero. The cap is 0 on other arches, so they still run it. The 0..MAX_VCPUS pass is unchanged. >> 11b5712b213b 2026-09-22 [Ritesh Harjani (IBM)] KVM: selftests: Move memslot_perf_test off the 256M ELF load address >> 63c900860b5f 2026-09-22 [Ritesh Harjani (IBM)] KVM: selftests: Don't limit LE dirty-bitmap bitops to s390x >> >> >> Please let me know if this sounds ok? > > Ya, works for me! Thanks! Will send v7 shortly with the discussed changes. -ritesh