From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5941C433EF for ; Thu, 16 Dec 2021 13:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HQaOsXsdD+Y96tsPWwqHW1AsbtZtGRDJfZi2+OVd8Rc=; b=qLL2CmVC9Ozz3n QYlKC7knIOx846QWRvCPwqwAStkfL0trnUpSY3oVtoBfWeIwzzB/L/4dqAmjZkWAn+ImmaGM4sRTj rYfQzcoNSpAvQC7phWeS9HGBl6wOXhTIwqsQo1Hr9xJQDw+mK+Ou5MlODAPn3HYOMU7LL9M7+tp14 ZvR91qsiSSagUZJCmuXX13XKUboxSWuEGADSToU+O+KQhs8jWepGofc97EPFo/wmQeN3pyjf3ydTA +xPZLe2eXMGKOiv04I09xvi2QwqgMDtw7Wr2S99bgnMrGCDy+gvGuxiPxektzyq+D1oill0gtknrc zYohWn3HQLOGnn6+pP0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqSD-005d6w-KY; Thu, 16 Dec 2021 13:05:50 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxpvC-005Rqz-K4 for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:31:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 32B09B823F6; Thu, 16 Dec 2021 12:31:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06494C36AE3; Thu, 16 Dec 2021 12:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639657900; bh=IGI05xEydLFA7YrmGD5I1ifkR6B6NdpQ0RaNjnKoW8I=; h=From:To:Cc:Subject:Date:From; b=iYGz4qU1gAFa7o40PdxHRf+5HnrXaTdYBxF6Z1Ax0sP6D47Nikx9gagdhCV9OvwHO bgSGDefW7CuNwCfl3ykGgYbrTTwMIroqLBazoN/+ilGVICsqNv1pKnt7LeecgF01PW 3L3C20yM1Rn++m+Sn9f5ZGw5MHPkBDpl2YKQ6+IPSAACImaNeZkgi+ufGFK3SLhnCa QseS7wW9yhMcIE4teaPqh4WkFLaWWgX63LGGLQ6Jsc6ejGl0sgy1lPCb3Fu9py16G9 z8FVua5mCIDlazVQCgrLd6Ghp8TMvuZLfy6VKdM3myrF5TxOQKfTBV6WmS4hoFaKO9 9mft/oQGV0fHw== Received: from cfbb000407.r.cam.camfibre.uk ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mxpv8-00CWIB-0O; Thu, 16 Dec 2021 12:31:38 +0000 From: Marc Zyngier To: Paolo Bonzini , Andrew Jones Cc: James Morse , Suzuki K Poulose , Alexandru Elisei , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: [PATCH 0/5] KVM: arm64: Selftest IPA fixes Date: Thu, 16 Dec 2021 12:31:30 +0000 Message-Id: <20211216123135.754114-1-maz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, drjones@redhat.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_043142_980983_BE15E858 X-CRM114-Status: GOOD ( 14.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that the common variety of fruity arm64 systems makes a pretty remarkable KVM host, I have decided to run the collection of selftests on it. Nothing works. Oh no! As it turns out, the tests have a notion of "default mode" (36bit PA, 4kB), which cannot work in general on arm64 because there no such thing as an IPA size that would be valid everywhere (apart from the minimal 32bit), nor a guaranteed to be supported page size. This small series is a first attempt at making these things computed at runtime by making the default something else on systems that do not support it. It also makes the supported page sizes dynamically discovered. The initial patch addresses an issue that has already been addressed separately, and is only there so that I don't get shouted at by some robot. With that, the selftests do run on the M1, with the exception of the memslot tests that are freaked out by the use of 16kB pages on the host and 4kB in the guest. Maybe I'll implement some form of 16kB support in the future. Marc Zyngier (5): KVM: selftests: Fix vm_compute_max_gfn on !x86 KVM: selftests: Initialise default mode in each test KVM: selftests: arm64: Introduce a variable default IPA size KVM: selftests: arm64: Check for supported page sizes KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K} .../selftests/kvm/aarch64/arch_timer.c | 3 + .../selftests/kvm/aarch64/debug-exceptions.c | 3 + .../selftests/kvm/aarch64/get-reg-list.c | 3 + .../selftests/kvm/aarch64/psci_cpu_on_test.c | 3 + .../testing/selftests/kvm/aarch64/vgic_init.c | 3 + .../testing/selftests/kvm/include/kvm_util.h | 15 ++-- .../selftests/kvm/kvm_binary_stats_test.c | 3 + .../selftests/kvm/kvm_create_max_vcpus.c | 3 + .../selftests/kvm/lib/aarch64/processor.c | 8 ++ tools/testing/selftests/kvm/lib/guest_modes.c | 77 +++++++++++++++++-- tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++ .../testing/selftests/kvm/memslot_perf_test.c | 4 + tools/testing/selftests/kvm/rseq_test.c | 3 + .../selftests/kvm/set_memory_region_test.c | 4 + tools/testing/selftests/kvm/steal_time.c | 3 + 15 files changed, 131 insertions(+), 10 deletions(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel