Re: [PATCH Part1 v5 11/38] x86/compressed: Add helper for validating pages in the decompression stage

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

 



On Fri, Aug 20, 2021 at 10:19:06AM -0500, Brijesh Singh wrote:
> diff --git a/arch/x86/include/asm/sev-common.h b/arch/x86/include/asm/sev-common.h
> index d426c30ae7b4..1cd8ce838af8 100644
> --- a/arch/x86/include/asm/sev-common.h
> +++ b/arch/x86/include/asm/sev-common.h
> @@ -57,6 +57,26 @@
>  #define GHCB_MSR_AP_RESET_HOLD_REQ	0x006
>  #define GHCB_MSR_AP_RESET_HOLD_RESP	0x007
>  
> +/* SNP Page State Change */

Let's make it very clear here that those cmd numbers below are actually
part of the protocol and not randomly chosen:

/*
 * ...
 *
 * 0x014 – SNP Page State Change Request
 *
 * GHCBData[55:52] – Page operation:
 *   0x0001 – Page assignment, Private
 *   0x0002 – Page assignment, Shared
 */

> +enum psc_op {
> +	SNP_PAGE_STATE_PRIVATE = 1,
> +	SNP_PAGE_STATE_SHARED,
> +};
> +

-- 
Regards/Gruss,
    Boris.

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux