From patchwork Fri Dec 9 01:53:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 31587 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp529577wrr; Thu, 8 Dec 2022 17:57:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7qD1vCOx6JCi7f74Og+nFyaX6+Kz9mQm1iiRr3WC3jF1fJMRPNJ+6LGbIvr3dwRJM0rvRN X-Received: by 2002:a17:906:86ca:b0:7c0:f2cf:23fb with SMTP id j10-20020a17090686ca00b007c0f2cf23fbmr3521354ejy.52.1670551026038; Thu, 08 Dec 2022 17:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670551026; cv=none; d=google.com; s=arc-20160816; b=tD2hAVH62cEGL0LLxpDu9vHGfzgl0tO2KLoqaeSlZkMfmn71aGrumTMp9/Q5hILp1F 6lOrXoyVtZ1TdCv8e20eDep8Qs2ehmewff2uHl2xKSQK9lnlxitaJabLGZHNDmSQ+lnA YPI68AevU9NURKs0SFpOGLb5aCD01QULyl+5N2yXLa58LSS76umTa0+KuK7L58Oy+tbF fAAt1QEtf6x8429x4cx9O1wJQjsxLUXVT2k57kdeGG8nFX512ocxyl/SSd7EjP4h2Zst 1ONuyZcYczAD7ofh72WvuM9a681mcoZ4e1nlCUEmzhOz2QdrxEXJF6i5BZ5/1hzvq0UB 3ayA== 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; bh=W5GuQXMbrC3IysNjrIOVqfKPv5wEvVUNlxTgUAZczI8=; b=D+ljie/k/FwkCBMRGXMpG9jqo9xgAjDknraMMBmxvDL6BJ9aJA2g8SDRRpo2yJP8gY /ZPX+ESxg8qbtjP4A39LHLx2PeUmNDAkCob5VHBQNkzQZQxi7TNc+Ot48IewBp3h/+K0 9z4W22M/HZqx53A6RIKZtUfmbF7f1iECl7VJ2ssQ7jtyPpBmtgAN9cV2A5G0rlFLYSwF AW/XcEFQJHqhL2ux3UALRpe7GMHDPgBkQBAE1s6bXC+77oHjjXU+mK8WmRyg2D8lixpT xad+V2NZCjvVoHu1qs7Z7xwaEx1IFrUZ5ex+0S8QRkHAqHiVGNpaoIIxsC3eDZnuK1P+ VmkQ== ARC-Authentication-Results: i=1; mx.google.com; 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=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a1709063c4600b007c0a70496desi22745ejg.724.2022.12.08.17.56.42; Thu, 08 Dec 2022 17:57:06 -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; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbiLIByW (ORCPT + 99 others); Thu, 8 Dec 2022 20:54:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbiLIBxy (ORCPT ); Thu, 8 Dec 2022 20:53:54 -0500 Received: from out-116.mta0.migadu.com (out-116.mta0.migadu.com [91.218.175.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75B29AE4E5 for ; Thu, 8 Dec 2022 17:53:45 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei , Paolo Bonzini , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kvmarm@lists.linux.dev, Ricardo Koller , Sean Christopherson , Oliver Upton , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] KVM: selftests: Allocate ucall pool from MEM_REGION_DATA Date: Fri, 9 Dec 2022 01:53:05 +0000 Message-Id: <20221209015307.1781352-7-oliver.upton@linux.dev> In-Reply-To: <20221209015307.1781352-1-oliver.upton@linux.dev> References: <20221209015307.1781352-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751699712321747089?= X-GMAIL-MSGID: =?utf-8?q?1751699712321747089?= 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. Reviewed-by: Sean Christopherson Signed-off-by: Oliver Upton --- tools/testing/selftests/kvm/lib/ucall_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));