summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMichael Kelley <mhklinux@outlook.com>2026-01-18 19:34:35 -0800
committerWei Liu <wei.liu@kernel.org>2026-02-04 06:29:12 +0000
commit0236e75df4d0802a23e3c8d794dbce329cd34a60 (patch)
tree7b7332f616f1fd530f8ca10738e985ddea2bda22 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parentc3a6ae7ea2d3f507cbddb5818ccc65b9d84d6dc7 (diff)
Drivers: hv: Use memremap()/memunmap() instead of ioremap_cache()/iounmap()
When running with a paravisor or in the root partition, the SynIC event and message pages are provided by the paravisor or hypervisor respectively, instead of being allocated by Linux. The provided pages are normal memory, but are outside of the physical address space seen by Linux. As such they cannot be accessed via the kernel's direct map, and must be explicitly mapped to a kernel virtual address. Current code uses ioremap_cache() and iounmap() to map and unmap the pages. These functions are for use on I/O address space that may not behave as normal memory, so they generate or expect addresses with the __iomem attribute. For normal memory, the preferred functions are memremap() and memunmap(), which operate similarly but without __iomem. At the time of the original work on CoCo VMs on Hyper-V, memremap() did not support creating a decrypted mapping, so ioremap_cache() was used instead, since I/O address space is always mapped decrypted. memremap() has since been enhanced to allow decrypted mappings, so replace ioremap_cache() with memremap() when mapping the event and message pages. Similarly, replace iounmap() with memunmap(). As a side benefit, the replacement cleans up 'sparse' warnings about __iomem mismatches. The replacement is done to use the correct functions as long-term goodness and to clean up the sparse warnings. No runtime bugs are fixed. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202601170445.JtZQwndW-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202512150359.fMdmbddk-lkp@intel.com/ Signed-off-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions