From patchwork Wed Oct 9 15:15:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1994960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XNxKZ005Nz1xvT for ; Thu, 10 Oct 2024 02:15:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1syYPX-0008Od-KB; Wed, 09 Oct 2024 15:15:35 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1syYPV-0008O4-UD for kernel-team@lists.ubuntu.com; Wed, 09 Oct 2024 15:15:33 +0000 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id ACD933F1F4 for ; Wed, 9 Oct 2024 15:15:33 +0000 (UTC) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6cbe3e4b288so2707096d6.1 for ; Wed, 09 Oct 2024 08:15:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728486932; x=1729091732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kfSx4Ab60ATS0ksTeV4PS5O2+lZB25sykQ02pKGVaHU=; b=FeXZ8Wgqdfp11evr38SU0B20OVLnKNEAWMvbrgZuFPS7W1f380kYRuxSLrjcKDmMoK dx5AjnxlR57x02cQTGL/tP6AdHe1T/wneJ6u1g6VgH08x5rliCdP0eFU72lPc171WoOZ rbOwCECb/8Yzrmv3ZPuwZFqcConYvJ2Ybag3obRkV7fSDSRlVCf6qxiqudkFb59CoE+G PeJ0/+Whz3sNEu8IYhW7i3bvPOhuAS4tagrEjTUuASNUx+F/VVBCHbRTT9Q6POcjsMBB CPtN/x51TpBlBHBdLJoTrFQpCg4MKCEubJZCHYWtT4R1866xgdNH7CrmpxRaUrKpAtmk BcoA== X-Gm-Message-State: AOJu0YzGxXIK/nYn9uriVQY/DafDt+MzvfqOWQocwQeJE9/B6Vc+JNNb A4u7dJEWe2IPfqE6to5IUi5WOkWUu5LxMhe7CkLOwqGom4b8KKBEj+3B8uccAkM+eXf0GhbtUpd TWaPSO80uY4pPGLbFKQuHYE+PoyAmlUrj0//aNitUqWGUNd/Ivyt/OGVtuyx7317OCFFCNF6Emw zjTdaF8q/E1w== X-Received: by 2002:a05:6214:46a1:b0:6cb:52dd:44cd with SMTP id 6a1803df08f44-6cbc95583ecmr52700456d6.25.1728486932472; Wed, 09 Oct 2024 08:15:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxwwzqZxj9BjvtkVseA2m0PEFatvKQn8culBQK+OIFMIhy648vRdkNVFBkAZZFqsFgCbSr7A== X-Received: by 2002:a05:6214:46a1:b0:6cb:52dd:44cd with SMTP id 6a1803df08f44-6cbc95583ecmr52700266d6.25.1728486932178; Wed, 09 Oct 2024 08:15:32 -0700 (PDT) Received: from smtp.gmail.com (h208-73-92-250.mdtnwi.broadband.dynamic.tds.net. [208.73.92.250]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45da755aa81sm47597671cf.53.2024.10.09.08.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 08:15:31 -0700 (PDT) From: John Cabaj To: kernel-team@lists.ubuntu.com Subject: [SRU][oracular:linux-azure][PATCH 2/2] RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page Date: Wed, 9 Oct 2024 10:15:23 -0500 Message-ID: <20241009151527.671047-3-john.cabaj@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241009151527.671047-1-john.cabaj@canonical.com> References: <20241009151527.671047-1-john.cabaj@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Long Li BugLink: https://bugs.launchpad.net/bugs/2084052 When mapping doorbell page from user-mode, the driver should use the system page size as this memory is allocated via mmap() from user-mode. Cc: stable@vger.kernel.org Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Long Li Link: https://patch.msgid.link/1725030993-16213-2-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky (cherry picked from commit 4a3b99bc04e501b816db78f70064e26a01257910) Signed-off-by: John Cabaj --- drivers/infiniband/hw/mana/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c index f68f54aea820..67c2d43135a8 100644 --- a/drivers/infiniband/hw/mana/main.c +++ b/drivers/infiniband/hw/mana/main.c @@ -511,13 +511,13 @@ int mana_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma) PAGE_SHIFT; prot = pgprot_writecombine(vma->vm_page_prot); - ret = rdma_user_mmap_io(ibcontext, vma, pfn, gc->db_page_size, prot, + ret = rdma_user_mmap_io(ibcontext, vma, pfn, PAGE_SIZE, prot, NULL); if (ret) ibdev_dbg(ibdev, "can't rdma_user_mmap_io ret %d\n", ret); else - ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %u, ret %d\n", - pfn, gc->db_page_size, ret); + ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %lu, ret %d\n", + pfn, PAGE_SIZE, ret); return ret; }