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 C92E1C624DB for ; Wed, 2 Sep 2026 16:42:35 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID :References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vftFdG07a3nchC+lg3FRPUFWLM/qxfRmP58xPI8DPYs=; b=1IWeBvUL8fhoUZ 4cR32KZ6c0yhAD/lr2iD3G4VArnq4A7v0gRIsK63PY18aj6PoQOyy42wmRjfnagZw2YN8i50i3yMR 1Ett0OPR5dT7XyJ6BuA2udHU/kDOx781eyKapX/oNYVAmlcwWg5op4SvfS0A3GtDJf0sUp7YguMm2 eJ9fuLO55me1NT6Rmf/1AtFUgMo2nxNOf1hcgKZihv8qdVUyk2MRA0rkblEoBADCbdi9CcnsCQ2z+ y7z6R5ThT+Z9Cx03/iO9iP53XcpkhQxxUAd7L5EV8Sv7qQ1POs8PgCFmQOob9hzMBFr3tXgTqeWrA r+mcm11TJoRJIVYPnggg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1o2X-0000000FG0W-0qqM; Wed, 02 Sep 2026 16:42:21 +0000 Received: from mail-pf1-x446.google.com ([2607:f8b0:4864:20::446]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x1o1w-0000000FEXB-1zoK for linux-riscv@lists.infradead.org; Wed, 02 Sep 2026 16:41:50 +0000 Received: by mail-pf1-x446.google.com with SMTP id d2e1a72fcca58-84859a64079so2080739b3a.3 for ; Wed, 02 Sep 2026 09:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1788367303; x=1788972103; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:from:to:cc:subject:date:message-id :reply-to:content-type; bh=F6KFth+wmNcPY6G4yAkPxQ/KQlcOGwTTAk9RODAHfTs=; b=TQI2ci+W6wYiWn7+qNKpeQ5PxVHe8tL91Ac20/V6h7SY32xdF3QEOnLQxN72k0khXF LQSbvO3MyMwgDrbTnQa52yDQDOBpZhMYPLy+xSMRuY8r/PEJvD5vG08+CjVzW6POXBvP NBZtRUrgUv8PNFFvK7uV08z0FV9uTXy33xrp+se+3+Bi7WkMpyI/2Fv7WUs9w8mmYYfC Mnhd24xRPXZw5SI+kqoWb40QLhLiSEBbS/5YAVtiOZbHFsoBTpODzZy6ToAQI7Hl12kW //bBI/rFWetiEk3O5gzfYGOiaZmR+B+CDW8A3lZ6bwA7qsDbff2TWJpj8wKjOJ/c2+qt Jjog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788367303; x=1788972103; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=F6KFth+wmNcPY6G4yAkPxQ/KQlcOGwTTAk9RODAHfTs=; b=OQWUyPp8kj/dOoUBvdGRceM8nY5J4g7rVp/y/vcgz0T7srqBe1PAiHF/XPaDOF3WrQ z0JwyBe7OnBdN6kixT0tJzNQb5I76oKb4K7KlAmOu8UTjv/6lKbFcTjndYAH9S3UuGF1 vPTv/mOZn0N2+3TuDl83nj++TySMQVE+GKt4XPlXNUmmme2N2mlqLpYsIgC1BjF90rd8 JhVUdqd5PB207twj8stqr4tIj8laoGswioOJranBJc8205g44X8hAZ5pJpij7j/EaUEC sRIcgsK8yBocW4On9pNA62nhonl6GHMBaN1NvRI7nTok4C9EkalREKvnJ2MEPkcBBow0 duzA== X-Forwarded-Encrypted: i=1; AKwUvBykGYT6JMZx8lAgPLwm10aTJznYp9yvWRN3HKyJ/Q8ukdt44/M5VYZGc7sPvOo6WiNwvc840EjFHG6sFg==@lists.infradead.org X-Gm-Message-State: AFuF++nHrM3xjncpFxEEZz9E2rUs6pAJ9QgkwmFNbEIC/MDi+TLhGxga FO0Bt+Q4jI4SiONJISCrwx6U9C1AZ4vIt1kbOZQbZkCbcSTLZwhd7X9ywljGOfCq4TctkQg1M1+ d0yzKFQ== X-Received: from pfux9.prod.google.com ([2002:a05:6a00:bc9:b0:847:82b3:aca]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:9295:b0:837:e9cc:d474 with SMTP id d2e1a72fcca58-85ed1d07a02mr8719333b3a.2.1788367302673; Wed, 02 Sep 2026 09:41:42 -0700 (PDT) Date: Wed, 2 Sep 2026 09:41:18 -0700 In-Reply-To: <20260902164123.2546762-1-seanjc@google.com> Mime-Version: 1.0 References: <20260902164123.2546762-1-seanjc@google.com> X-Mailer: git-send-email 2.55.0.966.g6673acef38-goog Message-ID: <20260902164123.2546762-16-seanjc@google.com> Subject: [PATCH v2 15/20] KVM: selftests: Use TEST_EXTRA region in x86's smaller MAXPHYADDR test From: Sean Christopherson To: Marc Zyngier , Oliver Upton , Sean Christopherson , Paolo Bonzini , Tianrui Zhao , Bibo Mao , Huacai Chen , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Atish Patra , Alexandre Ghiti , David Hildenbrand , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Itaru Kitayama , Nicholas Piggin , Ritesh Harjani X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260902_094144_582233_586C61E0 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Sean Christopherson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Use the TEST_EXTRA region/memslot for x86's smaller MAXPHYADDR test instead of a custom memslot, so that the primary vm_phy_pages_alloc() APIs can be reworked to take a region type instead of a raw memslot. For all intents and purposes, no functional change intended, as vm_add_extra_mem_region() is barely more than a wrapper for vm_userspace_mem_region_add(). Tested-by: Itaru Kitayama Signed-off-by: Sean Christopherson --- .../selftests/kvm/x86/smaller_maxphyaddr_emulation_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test.c b/tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test.c index 3dca85e95478..b21798a385ca 100644 --- a/tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test.c +++ b/tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test.c @@ -62,9 +62,10 @@ int main(int argc, char *argv[]) TEST_ASSERT(rc, "KVM_CAP_EXIT_ON_EMULATION_FAILURE is unavailable"); vm_enable_cap(vm, KVM_CAP_EXIT_ON_EMULATION_FAILURE, 1); - vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, - MEM_REGION_GPA, MEM_REGION_SLOT, - MEM_REGION_SIZE / PAGE_SIZE, 0); + vm_override_mem_region(vm, MEM_REGION_TEST_EXTRA, VM_MEM_SRC_ANONYMOUS, + MEM_REGION_GPA, MEM_REGION_SLOT, + MEM_REGION_SIZE / PAGE_SIZE); + gpa = vm_phy_pages_alloc(vm, MEM_REGION_SIZE / PAGE_SIZE, MEM_REGION_GPA, MEM_REGION_SLOT); TEST_ASSERT(gpa == MEM_REGION_GPA, "Failed vm_phy_pages_alloc"); -- 2.55.0.966.g6673acef38-goog _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv