From: David Miller <davem@davemloft.net>
To: ryao@gentoo.org
Cc: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@gentoo.org,
aneesh.kumar@linux.vnet.ibm.com, will.deacon@arm.com,
cov@codeaurora.org, behlendorf1@llnl.gov, mthode@mthode.org
Subject: Re: [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
Date: Thu, 30 Jan 2014 16:44:51 -0800 (PST) [thread overview]
Message-ID: <20140130.164451.873520736572570393.davem@davemloft.net> (raw)
In-Reply-To: <20140130.162926.561686911250624301.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 30 Jan 2014 16:29:26 -0800 (PST)
> From: Richard Yao <ryao@gentoo.org>
> Date: Thu, 30 Jan 2014 13:02:48 -0500
>
>> The 9p-virtio transport does zero copy on things larger than 1024 bytes
>> in size. It accomplishes this by returning the physical addresses of
>> pages to the virtio-pci device. At present, the translation is usually a
>> bit shift.
>>
>> However, that approach produces an invalid page address when we
>> read/write to vmalloc buffers, such as those used for Linux kernle
>> modules. This causes QEMU to die printing:
>>
>> qemu-system-x86_64: virtio: trying to map MMIO memory
>>
>> This patch enables 9p-virtio to correctly handle this case. This not
>> only enables us to load Linux kernel modules off virtfs, but also
>> enables ZFS file-based vdevs on virtfs to be used without killing QEMU.
>>
>> Also, special thanks to both Avi Kivity and Alexander Graf for their
>> interpretation of QEMU backtraces. Without their guidence, tracking down
>> this bug would have taken much longer.
>>
>> Signed-off-by: Richard Yao <ryao@gentoo.org>
>> Acked-by: Alexander Graf <agraf@suse.de>
>> Reviewed-by: Will Deacon <will.deacon@arm.com>
>
> Applied, thanks.
Actually I had to revert, is_vmalloc_or_malloc_addr() is not exported to
modules, so this change breaks the build.
next prev parent reply other threads:[~2014-01-31 0:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 18:02 [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers (second submission) Richard Yao
2014-01-30 18:02 ` [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers Richard Yao
2014-01-31 0:29 ` David Miller
2014-01-31 0:44 ` David Miller [this message]
2014-01-31 1:02 ` Richard Yao
-- strict thread matches above, loose matches on Subject: below --
2014-02-09 0:32 [PATCH] Fix broken zero-copy on vmalloc() buffers (4th and hopefully final submission) Richard Yao
2014-02-09 0:32 ` [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers Richard Yao
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=20140130.164451.873520736572570393.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=behlendorf1@llnl.gov \
--cc=cov@codeaurora.org \
--cc=ericvh@gmail.com \
--cc=kernel@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=mthode@mthode.org \
--cc=netdev@vger.kernel.org \
--cc=rminnich@sandia.gov \
--cc=ryao@gentoo.org \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=will.deacon@arm.com \
/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