Re: [RFC PATCH 12/13] mmap: Add XO support for KVM XO

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

 



On 03/10/19 23:23, Rick Edgecombe wrote:
> +
> +	protection_map[4] = PAGE_EXECONLY;
> +	protection_map[12] = PAGE_EXECONLY;

Can you add #defines for the bits in protection_map?  Also perhaps you
can replace the p_xo/p_xr/s_xo/s_xr checks with just with "if
(pgtable_kvmxo_enabled()".

Paolo

> +	/* Prefer non-pkey XO capability if available, to save a pkey */
> +
> +	if (flags & MAP_PRIVATE && (p_xo != p_xr))
> +		return 0;
> +
> +	if (flags & MAP_SHARED && (s_xo != s_xr))
> +		return 0;
>
> +	pkey = execute_only_pkey(current->mm);
> +	if (pkey < 0)





[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