Re: [PATCH v2 1/2] Add prctl to allow userlevel TDX hypercalls

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

 



On Fri, Jul 26, 2024 at 06:58:00PM +0000, Tim Merrifield wrote:
> Add a new process-level prctl option to enable/disable user-level
> hypercalls when running in a confidential VM. Add support for
> checking this flag on VMCALL #VE for TDX and transfer control to
> a hypervisor vendor-specific handler.

We need more context from the cover letter here.

> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> index f63f8fd00a91..198431919fd2 100644
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -1042,6 +1042,24 @@ unsigned long __get_wchan(struct task_struct *p)
>  	return addr;
>  }
>  
> +static int get_coco_user_hcall_mode(void)
> +{
> +	return !test_bit(MM_CONTEXT_COCO_USER_HCALL,
> +			&current->mm->context.flags);

Hm. Why "!"?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux