From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web12.34071.1620050678201464665 for ; Mon, 03 May 2021 07:04:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20161025 header.b=uRKUDYvH; spf=pass (domain: google.com, ip: 209.85.216.54, mailfrom: erdemaktas@google.com) Received: by mail-pj1-f54.google.com with SMTP id b14-20020a17090a6e0eb0290155c7f6a356so8728587pjk.0 for ; Mon, 03 May 2021 07:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zw7TP3NO+ziswame8ttMEkTGHoQxNaz7/UcEI+j/swE=; b=uRKUDYvHLjJqv5FvkJYS7J3QkwVOKRPsJoJTk736LiCiw6Xv3rOO05ceXDwf9hsy7W hQWcGdsA33hDD10x/eAveP0dU4y3QGlH+Xb081PAP9Hgl6LkboeR/4+tNk47W90aYQ5N g0I1yYRR+8E5vhm26f7x9FLh09R9aFS5F6Cj4HNriGxd2Agh28uC+wqfRUTYRtinvd5v TN1oKA3LFNjpeZ8cutLDYU0okCE7CIYO3VHTRMv4mkRhuUOcR5ETTX28ZU3/6qmeL+ff /E4/bNb4mvM7qRrZEaILWxfcBeVuFhYPGlyKonwsSmwj+/Di09V9T9y+WGhvGGKZyxuo etLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zw7TP3NO+ziswame8ttMEkTGHoQxNaz7/UcEI+j/swE=; b=FoNyz4rx53wdVrb8F/AwH5zgECtFy+RTQfWgf/8pYIrce/dHuooLQ9GCZ7cYY/7erM G567KGvwZqn/pqYX+LK7k5Gkf8l71Bg6OUTXq5kgugSUHmQQFcemz3/nOYfbPXVfoXoF BGvP9jb8mun9eAQfoNE1jdZHCCz0k3btdCfF4DRvO7WsildsK3CqGEmDikPieAdGHb0G NY8qqBO4LlJJTYSZn2v8dC/gZuPf+yB1+pqYqrtf3FlarUgYQn05rEm/V00O28Esb2YG 0pVFpJvsZU7kZfk/F4/usdiO/V+l3qs6swJcbQi7YBwNKC1Wy+NTg/7NMCGJJ3s003lb RhbQ== X-Gm-Message-State: AOAM530HuJIIAHdSnaJDm5OQLXrKlCu08o3LZ6Kf+CpHy3/adaQD2E9Q Da60uDFFddtmCPSvcxhl0VeRvQk/MmzQXvdGukPSSg== X-Google-Smtp-Source: ABdhPJzClVsP2lQwHLAnYJ03Djr4YHIZET5Gzn25+KGcoL4e5MrSmTJsCEq52RbEbpts/LJ2mYUd+vfMviisDDievWM= X-Received: by 2002:a17:903:4091:b029:ec:fbd2:3192 with SMTP id z17-20020a1709034091b02900ecfbd23192mr20306563plc.21.1620050677428; Mon, 03 May 2021 07:04:37 -0700 (PDT) MIME-Version: 1.0 References: <20210430115148.22267-1-brijesh.singh@amd.com> <20210430115148.22267-22-brijesh.singh@amd.com> In-Reply-To: <20210430115148.22267-22-brijesh.singh@amd.com> From: "Erdem Aktas" Date: Mon, 3 May 2021 07:04:25 -0700 Message-ID: Subject: Re: [PATCH RFC v2 21/28] OvmfPkg/MemEncryptSevLib: Add support to validate system RAM To: Brijesh Singh Cc: devel@edk2.groups.io, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Laszlo Ersek Content-Type: text/plain; charset="UTF-8" > + // > + // If the request page state change is shared then invalidate the pages before > + // adding the page in the RMP table. > + // > + if (State == SevSnpPagePrivate) { > + PvalidateRange (Info, 0, i, TRUE); > + } Looks like some copy-paste mistake in the comment. Also, it checks the if hypervisor failed to process all the entries for shared pages, but I do not see that it is checked if for the private pages. Is there any reason for that? > + VmgDone (Ghcb, InterruptState); > + } > +} > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index f9355172d6..1c1e911bd0 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -267,6 +267,7 @@ > !else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > !endif > + MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 3f27d7b90d..804f5d62be 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -271,6 +271,7 @@ > !else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > !endif > + MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > -- > 2.17.1 >