From nobody Mon Feb 9 07:09:04 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A36B1C43334 for ; Mon, 13 Jun 2022 17:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243326AbiFMR5I (ORCPT ); Mon, 13 Jun 2022 13:57:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243287AbiFMRzv (ORCPT ); Mon, 13 Jun 2022 13:55:51 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 970AF77F24 for ; Mon, 13 Jun 2022 06:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655127650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G0kM9EEZwe0ifygaIGxX4bsHaQPTEAaslXmPb2cToLk=; b=GoRf26GmimtI0CAjSwnDOoTcOOvkqC7xqXi/oTtLeOBd0IiQn3hjDC9noR/c5kPbckimEV BBo8T7Q7hCJRID/RgxPRAthE2r2q5APrDhJNxEdVHMuHi8+QKoy1qM/I6ITNdPlEsREaLY y69ZdKrDZd29bENFg/JW7cPh08k6EdM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-iDCBhhVvMgSbsDH_oNfzpA-1; Mon, 13 Jun 2022 09:40:43 -0400 X-MC-Unique: iDCBhhVvMgSbsDH_oNfzpA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DB2F803B22; Mon, 13 Jun 2022 13:40:42 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.194.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02237492CA2; Mon, 13 Jun 2022 13:40:39 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Maxim Levitsky , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 28/39] KVM: selftests: Fill in vm->vpages_mapped bitmap in virt_map() too Date: Mon, 13 Jun 2022 15:39:11 +0200 Message-Id: <20220613133922.2875594-29-vkuznets@redhat.com> In-Reply-To: <20220613133922.2875594-1-vkuznets@redhat.com> References: <20220613133922.2875594-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Similar to vm_vaddr_alloc(), virt_map() needs to reflect the mapping in vm->vpages_mapped. Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/lib/kvm_util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/sel= ftests/kvm/lib/kvm_util.c index 39f2f5f1338f..aa42eeabdec9 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -1276,6 +1276,9 @@ void virt_map(struct kvm_vm *vm, uint64_t vaddr, uint= 64_t paddr, virt_pg_map(vm, vaddr, paddr); vaddr +=3D page_size; paddr +=3D page_size; + + sparsebit_set(vm->vpages_mapped, + vaddr >> vm->page_shift); } } =20 --=20 2.35.3