Re: [PATCH 03/20] x86/tdx: Convert port I/O handling to use new TDVMCALL macros

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

 



On 5/17/24 07:19, Kirill A. Shutemov wrote:
>  static inline void tdx_io_out(int size, u16 port, u32 value)
>  {
> -	struct tdx_module_args args = {
> -		.r10 = TDX_HYPERCALL_STANDARD,
> -		.r11 = hcall_func(EXIT_REASON_IO_INSTRUCTION),
> -		.r12 = size,
> -		.r13 = 1,
> -		.r14 = port,
> -		.r15 = value,
> -	};
> -
> -	__tdx_hypercall(&args);
> +	TDVMCALL_0(hcall_func(EXIT_REASON_IO_INSTRUCTION),
> +		   size, TDX_PORT_WRITE, port, value);
>  }

I actually really like the self-documenting nature of the structures.  I
don't think it's a win if this is where the lines-of-code savings comes
from.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux