]> git.ipfire.org Git - thirdparty/qemu.git/commit
xen: mapcache: Split mapcache_grants by ro and rw
authorEdgar E. Iglesias <edgar.iglesias@amd.com>
Fri, 25 Apr 2025 13:16:01 +0000 (15:16 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 11 May 2025 06:15:20 +0000 (09:15 +0300)
commitbfa3f55f0fe9a4185577447faedcb5b4b302f947
tree01eaa099ff4aebedbd355408e2ae32af3e0577cf
parenta03d7d6e32236d5c1b331e07b11cd7991f0d3a74
xen: mapcache: Split mapcache_grants by ro and rw

Today, we don't track write-abiliy in the cache, if a user
requests a readable mapping followed by a writeable mapping
on the same page, the second lookup will incorrectly hit
the readable entry.

Split mapcache_grants by ro and rw access. Grants will now
have separate ways in the cache depending on writeability.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
(cherry picked from commit 88fb705600a3b612c571efc9f1a6aed923a18dcc)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/xen/xen-mapcache.c