nvme-pci: fix doorbell buffer value endianness
stable inclusion from stable-v5.10.188 commit f5d8738fbe33e71959b5a69221ecf515032d3fc7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7PZZC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=f5d8738fbe33e71959b5a69221ecf515032d3fc7 -------------------------------- [ Upstream commit b5f96cb7 ] When using shadow doorbells, the event index and the doorbell values are written to host memory. Prior to this patch, the values written would erroneously be written in host endianness. This causes trouble on big-endian platforms. Fix this by adding missing endian conversions. This issue was noticed by Guenter while testing various big-endian platforms under QEMU[1]. A similar fix required for hw/nvme in QEMU is up for review as well[2]. [1]: https://lore.kernel.org/qemu-devel/20221209110022.GA3396194@roeck-us.net/ [2]: https://lore.kernel.org/qemu-devel/20221212114409.34972-4-its@irrelevant.dk/ Fixes: f9f38e33 ("nvme: improve performance for virtual NVMe devices") Reported-by:Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yong Hu <yong.hu@windriver.com>
Loading
Please sign in to comment