Re: [PATCH v6 06/11] intel_sgx: driver for Intel Software Guard Extensions

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

 



> +struct sgx_encl_page {
> +	unsigned long addr;
> +	unsigned int flags;
> +	void *epc_page;
> +	struct sgx_va_page *va_page;
> +	unsigned int va_offset;
> +	struct list_head list;
> +};

This can be without major streches hoops packed way more. There are 12
bits free for use in the addr field. I can use low three bits for flags
and upper nine bits for va_offset.

I think I can also quite easily union epc_page and va_page fields.

With these changes the struct would shrink to:

struct sgx_encl_page {
	unsigned long addr;
	union {
		void *epc_page;
		struct sgx_va_page *va_page;
	};
	struct list_head list;
};

I can rework this for v7.

/Jarkko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux