]> 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)
committerEdgar E. Iglesias <edgar.iglesias@amd.com>
Tue, 6 May 2025 16:39:44 +0000 (18:39 +0200)
commit88fb705600a3b612c571efc9f1a6aed923a18dcc
treecdd9bc802beff0693ecf78a4ed224f074fe6c643
parenta4b20f737cda06bb8706a83e27f7fa89863ae689
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>
hw/xen/xen-mapcache.c