Message ID | 20221207214809.489070-5-oliver.upton@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp419920wrr; Wed, 7 Dec 2022 13:50:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf7lGpqH/lbSjjfkFvTRiMeVYUwEyuG7rQEqZfzuX23r9pzW4IA6ORr/+hR2n63rAAYo7efv X-Received: by 2002:a17:902:b091:b0:189:e3b9:f13c with SMTP id p17-20020a170902b09100b00189e3b9f13cmr12523377plr.52.1670449824521; Wed, 07 Dec 2022 13:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670449824; cv=none; d=google.com; s=arc-20160816; b=d8uHLbp1dR4zNhFpP1A61q+JuKCHbJWRsdExHFBDc04SBirQ7c28flvaA80W6xed9u jJUmU0tHhGOsogO2WJEBdz+I3TdzL/gnpUKYhjwy+7F2WL+iRgUIiuoVgafgBIb1QjnF F4nmsT5tIWd8dfVarmZPo9Rk2tkrKtFrTWhVMw4n4253eFENHtYJJCpzCMmopLbJtGRY x/jjmMZTdSPrrtl5FyEA5ziA0zFx3wDTxe6wiBQdugZ+MN1bnJMcbtOEIjVTiplyf0GR Ul+5aNH7b4Bw5Ojuh+o5tWEfhPoKVfQLZxBcBY/nIc6tVpgUZ4P7BuEQaG0AWO00GLtg iSrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+DyLxs3HyIoF5wx9VX+BHFSEjjnbDaZ4BqGRsxySYTU=; b=fFjg3dowk31LwPUFnCt5bAbiMnj+swnxqInhhGWDY3wku7RJoZFYKg5sXl0tSTVIQu g2SIbVsHYbzBnDF/SHTn/ruT0DA/AEiw3dTWOWjJV67sTnn9oOtvMCEixm4tyNzL9+wd YgOps/hevk7TDW3tuZu72ypOrkiZaO+lu2S7GzhBimlDFAKC7VDZsyF3xcoWmD+GdpdN mMgmqnD9SsgexlyhlOFm26G+Kx3/+sfQnEDyRhLkZ8haC1pce38JPmnm3720VgYVutSa weQqfhtJGahIwL8cFOaiTK8kdTQIUsHWVRfDfrQYbpYARqNYNk2kRoOaBjw0PGQ5PA86 qVxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ezeBgIra; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a056a00158400b0056e8f32463esi23467260pfk.322.2022.12.07.13.50.10; Wed, 07 Dec 2022 13:50:24 -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=@linux.dev header.s=key1 header.b=ezeBgIra; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbiLGVsu (ORCPT <rfc822;foxyelen666@gmail.com> + 99 others); Wed, 7 Dec 2022 16:48:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbiLGVsh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Dec 2022 16:48:37 -0500 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 431F483EB6; Wed, 7 Dec 2022 13:48:36 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1670449714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+DyLxs3HyIoF5wx9VX+BHFSEjjnbDaZ4BqGRsxySYTU=; b=ezeBgIrapc0Yr+sy6EGzPWIC5Jvm36lxzF1ASa6A4Z3hmSRNYzMMaQSam4w8KPu85HkMXB fnAOl2c3FSG9VrCYbXt/O0Y1yj0US4HOM9g+eBr1nabRFom+i0iPi0WNhgUHF32YNirkYn B1AafIwUyT0gRbFNqHcwh/v+ZOnK/1A= From: Oliver Upton <oliver.upton@linux.dev> To: Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Paolo Bonzini <pbonzini@redhat.com>, Shuah Khan <shuah@kernel.org>, Andrew Jones <andrew.jones@linux.dev>, Sean Christopherson <seanjc@google.com>, Peter Gonda <pgonda@google.com> Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kvmarm@lists.linux.dev, Ricardo Koller <ricarkol@google.com>, Oliver Upton <oliver.upton@linux.dev>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] KVM: selftests: Allocate ucall pool from MEM_REGION_DATA Date: Wed, 7 Dec 2022 21:48:08 +0000 Message-Id: <20221207214809.489070-5-oliver.upton@linux.dev> In-Reply-To: <20221207214809.489070-1-oliver.upton@linux.dev> References: <20221207214809.489070-1-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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?1751593595138450721?= X-GMAIL-MSGID: =?utf-8?q?1751593595138450721?= |
Series |
[1/4] KVM: selftests: Fix build due to ucall_uninit() removal
|
|
Commit Message
Oliver Upton
Dec. 7, 2022, 9:48 p.m. UTC
MEM_REGION_TEST_DATA is meant to hold data explicitly used by a
selftest, not implicit allocations due to the selftests infrastructure.
Allocate the ucall pool from MEM_REGION_DATA much like the rest of the
selftests library allocations.
Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation")
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
tools/testing/selftests/kvm/lib/ucall_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Dec 07, 2022, Oliver Upton wrote: > MEM_REGION_TEST_DATA is meant to hold data explicitly used by a > selftest, not implicit allocations due to the selftests infrastructure. > Allocate the ucall pool from MEM_REGION_DATA much like the rest of the > selftests library allocations. > > Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation") Not that it really matters because no one will backport this verbatim, but this is the wrong commit to blame. As of commit 426729b2cf2e, MEM_REGION_DATA does not exist. And similarly, the common ucall code didn't exist when Ricardo's series introduced MEM_REGION_DATA. $ git show 426729b2cf2e:tools/testing/selftests/kvm/include/kvm_util_base.h | grep MEM_REGION_DATA $ git show 290c5b54012b7:tools/testing/selftests/kvm/lib/ucall_common.c fatal: path 'tools/testing/selftests/kvm/lib/ucall_common.c' exists on disk, but not in '290c5b54012b7' The commit where the two collided is: Fixes: cc7544101eec ("Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") > Signed-off-by: Oliver Upton <oliver.upton@linux.dev> > --- Fixes nit aside, Reviewed-by: Sean Christopherson <seanjc@google.com>
On Wed, Dec 07, 2022 at 11:44:50PM +0000, Sean Christopherson wrote: > On Wed, Dec 07, 2022, Oliver Upton wrote: > > MEM_REGION_TEST_DATA is meant to hold data explicitly used by a > > selftest, not implicit allocations due to the selftests infrastructure. > > Allocate the ucall pool from MEM_REGION_DATA much like the rest of the > > selftests library allocations. > > > > Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation") > > Not that it really matters because no one will backport this verbatim, but this > is the wrong commit to blame. As of commit 426729b2cf2e, MEM_REGION_DATA does not > exist. And similarly, the common ucall code didn't exist when Ricardo's series > introduced MEM_REGION_DATA. > > $ git show 426729b2cf2e:tools/testing/selftests/kvm/include/kvm_util_base.h | grep MEM_REGION_DATA > $ git show 290c5b54012b7:tools/testing/selftests/kvm/lib/ucall_common.c > fatal: path 'tools/testing/selftests/kvm/lib/ucall_common.c' exists on disk, but not in '290c5b54012b7' > > The commit where the two collided is: > > Fixes: cc7544101eec ("Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") Yeah, this Fixes is garbage, apologies. I imagine Paolo is going to squash some things into the kvmarm merge, so the Fixes tag ought to be dropped altogether. > > Signed-off-by: Oliver Upton <oliver.upton@linux.dev> > > --- > > Fixes nit aside, > > Reviewed-by: Sean Christopherson <seanjc@google.com> Thanks! -- Best, Oliver
diff --git a/tools/testing/selftests/kvm/lib/ucall_common.c b/tools/testing/selftests/kvm/lib/ucall_common.c index 820ce6c82829..0cc0971ce60e 100644 --- a/tools/testing/selftests/kvm/lib/ucall_common.c +++ b/tools/testing/selftests/kvm/lib/ucall_common.c @@ -22,7 +22,7 @@ void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa) vm_vaddr_t vaddr; int i; - vaddr = vm_vaddr_alloc(vm, sizeof(*hdr), KVM_UTIL_MIN_VADDR); + vaddr = __vm_vaddr_alloc(vm, sizeof(*hdr), KVM_UTIL_MIN_VADDR, MEM_REGION_DATA); hdr = (struct ucall_header *)addr_gva2hva(vm, vaddr); memset(hdr, 0, sizeof(*hdr));