From patchwork Thu Mar 14 18:31:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1056653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Ky3c0PPfz9s3q; Fri, 15 Mar 2019 05:31:56 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1h4V8w-0007jm-Dc; Thu, 14 Mar 2019 18:31:50 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1h4V8u-0007hH-5P for kernel-team@lists.ubuntu.com; Thu, 14 Mar 2019 18:31:48 +0000 Received: from mail-qt1-f197.google.com ([209.85.160.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1h4V8t-0004Xp-MJ for kernel-team@lists.ubuntu.com; Thu, 14 Mar 2019 18:31:47 +0000 Received: by mail-qt1-f197.google.com with SMTP id b40so6314906qte.1 for ; Thu, 14 Mar 2019 11:31:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=F2frQCuK5dYQ4n/CQZCkfXrg989ZccauwnvvQlovM2c=; b=rX7fDVMxw8RuBrYvbUgdXnueiuEUb3fZ9mWOMCsvoE4ikFqJ24Tzjvp2emvtRyQo9s qQwBXk4WBNITa6R+s5xcxKsvNkCMQQzlbpb60f73jYDUv8NW3QqomWjWLH5RYwljigfp pQL7CMzI5oLCC/VrnBSWlAEvZT31skeLBo0TyceGebJkk2pxIozFNHYhAST3VpRglneJ HyyqsK8k20T//BZjATGVQf77D9u+D/3qCKIlRWmz+i1oDWMryDzhc3DcCHkFDSwRGJjt akCmphxIzVrzb7WxpqSMhZfF0NEM6S2Nvoldha4MhS8eZRX7D+wHityVACuNijJuLPZt X0OA== X-Gm-Message-State: APjAAAWGjdKBwjc58LNZ5DouKiXyx1NLlDOEfpoCJHu+Lldekc4DQvtT q30oEqr2xiEoO6VqSx6eIhKBTwBc6zsPD9/SPD9Vz4ltxpWDHXikPY8O4LRpV+OM1CKJYQy7VhB K2inifgW+mc/uragnKePSc9mwFlNHgXKaTbOJ+BFo X-Received: by 2002:ac8:5445:: with SMTP id d5mr12529363qtq.38.1552588306428; Thu, 14 Mar 2019 11:31:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqysMXrvibMYlO+tRGUlfTtqCIERsUY1cwUYDgZx0H+ReHXaz4daIK1FrR/pzZ/JocUso38pBA== X-Received: by 2002:ac8:5445:: with SMTP id d5mr12529331qtq.38.1552588305884; Thu, 14 Mar 2019 11:31:45 -0700 (PDT) Received: from gallifrey.lan ([2804:14c:4e3:4a76:8145:c566:46dd:a2ba]) by smtp.gmail.com with ESMTPSA id j64sm1575576qkf.13.2019.03.14.11.31.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 11:31:45 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [c/azure][PATCH 3/8] hv_uio_generic: map ringbuffer phys addr Date: Thu, 14 Mar 2019 15:31:30 -0300 Message-Id: <20190314183135.20235-4-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190314183135.20235-1-marcelo.cerri@canonical.com> References: <20190314183135.20235-1-marcelo.cerri@canonical.com> 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: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stephen Hemminger BugLink: http://bugs.launchpad.net/bugs/1812123 The ring buffer is contiguous IOVA and is mapped via phys addr for sysfs file. Use same method for the UIO mapping. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 9da197f1df40c838f0f06abf94cd23b4ed81e522) Signed-off-by: Marcelo Henrique Cerri --- drivers/uio/uio_hv_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index 0e1e8cf89f34..da5c1496082c 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -227,10 +227,10 @@ hv_uio_probe(struct hv_device *dev, /* mem resources */ pdata->info.mem[TXRX_RING_MAP].name = "txrx_rings"; pdata->info.mem[TXRX_RING_MAP].addr - = (uintptr_t)page_address(dev->channel->ringbuffer_page); + = (uintptr_t)virt_to_phys(page_address(dev->channel->ringbuffer_page)); pdata->info.mem[TXRX_RING_MAP].size = dev->channel->ringbuffer_pagecount << PAGE_SHIFT; - pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_LOGICAL; + pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_IOVA; pdata->info.mem[INT_PAGE_MAP].name = "int_page"; pdata->info.mem[INT_PAGE_MAP].addr