Re: [PATCH v2 06/14] arm64: Override set_fixmap_io

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/05/2024 17:14, Catalin Marinas wrote:
On Fri, Apr 12, 2024 at 09:42:05AM +0100, Steven Price wrote:
Override the set_fixmap_io to set shared permission for the host
in case of a CC guest. For now we mark it shared unconditionally.
Future changes could filter the physical address and make the
decision accordingly.
[...]
+void set_fixmap_io(enum fixed_addresses idx, phys_addr_t phys)
+{
+	pgprot_t prot = FIXMAP_PAGE_IO;
+
+	/*
+	 * For now we consider all I/O as non-secure. For future
+	 * filter the I/O base for setting appropriate permissions.
+	 */
+	prot = __pgprot(pgprot_val(prot) | PROT_NS_SHARED);
+
+	return __set_fixmap(idx, phys, prot);
+}

I looked through the patches and could not find any place where this
function does anything different as per the commit log suggestion. Can
we just update FIXMAP_PAGE_IO for now until you have a clear use-case?


This gets used by the earlycon mapping. The commit description could be
made clear.

We may have to revisit this code to optionally apply the PROT_NS_SHARED
attribute, depending on whether this is a "protected MMIO" or not.


Suzuki




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux