From: Michael Kelley <mhklinux@outlook.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "jayalk@intworks.biz" <jayalk@intworks.biz>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"deller@gmx.de" <deller@gmx.de>,
"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
"kys@microsoft.com" <kys@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
"decui@microsoft.com" <decui@microsoft.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"weh@microsoft.com" <weh@microsoft.com>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: RE: [PATCH 1/3] mm: Export vmf_insert_mixed_mkwrite()
Date: Wed, 9 Apr 2025 14:10:26 +0000 [thread overview]
Message-ID: <BN7PR02MB4148597D0495C631F6E3F8C0D4B42@BN7PR02MB4148.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20250409104942.GA5572@lst.de>
From: Christoph Hellwig <hch@lst.de> Sent: Wednesday, April 9, 2025 3:50 AM
>
> On Tue, Apr 08, 2025 at 11:36:44AM -0700, mhkelley58@gmail.com wrote:
> > From: Michael Kelley <mhklinux@outlook.com>
> >
> > Export vmf_insert_mixed_mkwrite() for use by fbdev deferred I/O code,
>
> But they are using this on dma coherent memory, where you can't legally
> get at the page. As told last time you need to fix that first before
> hacking around that code.
Hmmm. What's the reference to "as told last time"? I don't think I've had
this conversation before.
For the hyperv_fb driver, the memory in question is allocated with a direct call
to alloc_pages(), not via dma_alloc_coherent(). There's no DMA in this scenario.
The memory is shared with the Hyper-V host and designated as the memory
for the virtual framebuffer device. It is then mapped into user space using the
mmap() system call against /dev/fb0. User space writes to the memory are
eventually (and I omit the details) picked up by the Hyper-V host and displayed.
Is your point that memory dma_alloc_coherent() memory must be treated as
a black box, and can't be deconstructed into individual pages? If so, that makes
sense to me. But must the same treatment be applied to memory from
alloc_pages()? This is where I need some education.
>
> > which can be built as a module. For consistency with the related function
> > vmf_insert_mixed(), export without the GPL qualifier.
>
> No. All advanced new Linux functionality must be _GPL. Don't try to
> sneak around that.
No problem. Just trying to be consistent, not sneak around anything.
Thanks,
Michael
next prev parent reply other threads:[~2025-04-09 14:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 18:36 [PATCH 0/3] fbdev: Add deferred I/O support for contiguous kernel memory framebuffers mhkelley58
2025-04-08 18:36 ` [PATCH 1/3] mm: Export vmf_insert_mixed_mkwrite() mhkelley58
2025-04-09 10:49 ` Christoph Hellwig
2025-04-09 14:10 ` Michael Kelley [this message]
2025-04-10 7:42 ` Christoph Hellwig
2025-04-11 3:40 ` Michael Kelley
2025-04-08 18:36 ` [PATCH 2/3] fbdev/deferred-io: Support contiguous kernel memory framebuffers mhkelley58
2025-04-09 10:50 ` Christoph Hellwig
2025-04-08 18:36 ` [PATCH 3/3] fbdev: hyperv_fb: Fix mmap of framebuffers allocated using alloc_pages() mhkelley58
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BN7PR02MB4148597D0495C631F6E3F8C0D4B42@BN7PR02MB4148.namprd02.prod.outlook.com \
--to=mhklinux@outlook.com \
--cc=akpm@linux-foundation.org \
--cc=decui@microsoft.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=haiyangz@microsoft.com \
--cc=hch@lst.de \
--cc=jayalk@intworks.biz \
--cc=kys@microsoft.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=weh@microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox