lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Nov 2023 15:36:30 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Michael Roth <michael.roth@....com>
Cc:     kvm@...r.kernel.org, linux-coco@...ts.linux.dev,
        linux-mm@...ck.org, linux-crypto@...r.kernel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        jroedel@...e.de, thomas.lendacky@....com, hpa@...or.com,
        ardb@...nel.org, pbonzini@...hat.com, seanjc@...gle.com,
        vkuznets@...hat.com, jmattson@...gle.com, luto@...nel.org,
        dave.hansen@...ux.intel.com, slp@...hat.com, pgonda@...gle.com,
        peterz@...radead.org, srinivas.pandruvada@...ux.intel.com,
        rientjes@...gle.com, dovmurik@...ux.ibm.com, tobin@....com,
        vbabka@...e.cz, kirill@...temov.name, ak@...ux.intel.com,
        tony.luck@...el.com, marcorr@...gle.com,
        sathyanarayanan.kuppuswamy@...ux.intel.com, alpergun@...gle.com,
        jarkko@...nel.org, ashish.kalra@....com, nikunj.dadhania@....com,
        pankaj.gupta@....com, liam.merwick@...cle.com,
        zhi.a.wang@...el.com, Brijesh Singh <brijesh.singh@....com>
Subject: Re: [PATCH v10 13/50] crypto: ccp: Define the SEV-SNP commands

On Mon, Oct 16, 2023 at 08:27:42AM -0500, Michael Roth wrote:
> diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h
> index 7fd17e82bab4..a7f92e74564d 100644
> --- a/include/linux/psp-sev.h
> +++ b/include/linux/psp-sev.h
> @@ -78,6 +78,36 @@ enum sev_cmd {
>  	SEV_CMD_DBG_DECRYPT		= 0x060,
>  	SEV_CMD_DBG_ENCRYPT		= 0x061,
>
> +	/* SNP specific commands */
> +	SEV_CMD_SNP_INIT			= 0x81,

The other commands start with "0x0" - pls do that too here or unify with
a pre-patch.

> +	SEV_CMD_SNP_SHUTDOWN			= 0x82,
> +	SEV_CMD_SNP_PLATFORM_STATUS		= 0x83,
> +	SEV_CMD_SNP_DF_FLUSH			= 0x84,
> +	SEV_CMD_SNP_INIT_EX			= 0x85,
> +	SEV_CMD_SNP_SHUTDOWN_EX			= 0x86,
> +	SEV_CMD_SNP_DECOMMISSION		= 0x90,
> +	SEV_CMD_SNP_ACTIVATE			= 0x91,
> +	SEV_CMD_SNP_GUEST_STATUS		= 0x92,
> +	SEV_CMD_SNP_GCTX_CREATE			= 0x93,
> +	SEV_CMD_SNP_GUEST_REQUEST		= 0x94,
> +	SEV_CMD_SNP_ACTIVATE_EX			= 0x95,
> +	SEV_CMD_SNP_LAUNCH_START		= 0xA0,
> +	SEV_CMD_SNP_LAUNCH_UPDATE		= 0xA1,
> +	SEV_CMD_SNP_LAUNCH_FINISH		= 0xA2,
> +	SEV_CMD_SNP_DBG_DECRYPT			= 0xB0,
> +	SEV_CMD_SNP_DBG_ENCRYPT			= 0xB1,
> +	SEV_CMD_SNP_PAGE_SWAP_OUT		= 0xC0,
> +	SEV_CMD_SNP_PAGE_SWAP_IN		= 0xC1,
> +	SEV_CMD_SNP_PAGE_MOVE			= 0xC2,
> +	SEV_CMD_SNP_PAGE_MD_INIT		= 0xC3,
> +	SEV_CMD_SNP_PAGE_SET_STATE		= 0xC6,
> +	SEV_CMD_SNP_PAGE_RECLAIM		= 0xC7,
> +	SEV_CMD_SNP_PAGE_UNSMASH		= 0xC8,
> +	SEV_CMD_SNP_CONFIG			= 0xC9,
> +	SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX	= 0xCA,

You don't have to vertically align those to a different column due to
this command's name not fitting - just do:

        SEV_CMD_SNP_CONFIG              = 0x0C9,
        SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX = 0x0CA,
        SEV_CMD_SNP_COMMIT              = 0x0CB,




> +	SEV_CMD_SNP_COMMIT			= 0xCB,
> +	SEV_CMD_SNP_VLEK_LOAD			= 0xCD,
> +
>  	SEV_CMD_MAX,
>  };

...

> +/**
> + * struct sev_data_snp_launch_start - SNP_LAUNCH_START command params
> + *
> + * @gctx_addr: system physical address of guest context page
> + * @policy: guest policy
> + * @ma_gctx_addr: system physical address of migration agent
> + * @imi_en: launch flow is launching an IMI for the purpose of

What is an "IMI"?

Define it once for the readers pls.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ