Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1901397pxb; Mon, 23 Aug 2021 07:18:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc+CLhCARZcWu6eQX9HffiA7CxfYge/Jwm1/AiX5eML6G80vPSOtIZac+2e62I2ZDX4uBp X-Received: by 2002:aa7:c1c4:: with SMTP id d4mr36895128edp.301.1629728302547; Mon, 23 Aug 2021 07:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629728302; cv=none; d=google.com; s=arc-20160816; b=VQyqDN3xuzc9xR8o99NfNnFbIEgyCba4+ac6TLhQpLDs5Y8258Tfj27JqQPaZ1zG4A 57RKr9R+RsW/5PdsQZOJhlGM9ipNfy/79Izc2Ux/RZRppl3q7PK6csjufkUTGSqwywbq A8JGK8fYCYVhNyg+wZOuxIU4GxwDsub2TCPw9pj6QYoFJXGT9IFkg5aCNYOG0gXl277p hQNdmpDPOyj6lnSsxcPPJOOFD5cs9vq1Gxt5KdHGFx+z45lG8ACVoAnbBuW3PweW4h5F GvBV4Q3kfKq1TB67uIgjiPYo8ioLZrz/xi8Rk6/hmjRW/pzbyjHhraWkPuFVzlDN4UTi 38tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gKD+/8Qbv6yv6nIGV7iJbsxCYPsTuanF1BGer6VcD3Q=; b=yeoCg7onVVT/BzQMRSjSemmT/9UCeex8u2oHLwKyCXm9iGVFvhbKt8K6HMj0Pfj7hM 6/+U9xqpO9eNePPyDluRuvDmGBsUuKGB8WgTuCrnjDmkvcTYVGdSd0vAMKWdZrEGnlr+ 3wzZRWonrnaxlPz3tgoAALCz9YUulEinfe+6Bex2LHKmVaoGvIFSkd6DQUYn96p0HDf6 QlrmzgTwBn/5C39YdbxbEiFw8K4IRd+C7hNGONX18tJ0miubrUy1hURSO4L6LsRGC6vz SAYOlHfeojO5xeHwlBnUvfTNVK3+Cmsb1pmpgAxMCNuQR5+scDZFPicxI/yjyxji3QaO +59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=fl2Qa5G0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si15372287edw.170.2021.08.23.07.17.56; Mon, 23 Aug 2021 07:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=fl2Qa5G0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbhHWORK (ORCPT + 99 others); Mon, 23 Aug 2021 10:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbhHWORF (ORCPT ); Mon, 23 Aug 2021 10:17:05 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5323C061757; Mon, 23 Aug 2021 07:16:21 -0700 (PDT) Received: from zn.tnic (p200300ec2f07d900e826476efa1e0ef3.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:d900:e826:476e:fa1e:ef3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E7C151EC01DF; Mon, 23 Aug 2021 16:16:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629728176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gKD+/8Qbv6yv6nIGV7iJbsxCYPsTuanF1BGer6VcD3Q=; b=fl2Qa5G0kimY8dlcx57nwjuUVsOyw/YTDGgTJJIaA2N0r2c9wtb47MYkDSQbAUPKdcccji exXZ8QJN7O52aXOlT0T1CVQQE8Da6aBbgEZZ2YOE263xSzLuAcAFM7fQ+bCZmZl9FGXEjh HzbE1JM09KsuZt4AnEG95Z4di2Vt2ws= Date: Mon, 23 Aug 2021 16:16:51 +0200 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part1 v5 11/38] x86/compressed: Add helper for validating pages in the decompression stage Message-ID: References: <20210820151933.22401-1-brijesh.singh@amd.com> <20210820151933.22401-12-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210820151933.22401-12-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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