From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web11.6539.1634198614530630546 for ; Thu, 14 Oct 2021 01:03:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V/rRf1r5; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634198613; 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: in-reply-to:in-reply-to:references:references; bh=vBkoyUPaPKxHimNNoE7rGcuNzaGcU5weC5PxMNB4VMQ=; b=V/rRf1r5HlRkd9cGjUcrX5OpnayxA7sWdk1XC0NqrUjizOU9k0DZ2OP209m1XjXnB5zEN9 hFKvhr28b3V8QW0aDp1fJaPJI2RWQTcjw/HjUDMt2XELECbtjWmawMklBXYPrx4i7QJzOV U84ZzTsOGEyHm/3fqfGsQAG6GmWTq/U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-529-yspsI6ANOXqBeFpj-Tjw1A-1; Thu, 14 Oct 2021 04:03:30 -0400 X-MC-Unique: yspsI6ANOXqBeFpj-Tjw1A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAFCF19057A0; Thu, 14 Oct 2021 08:03:28 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72C1662A44; Thu, 14 Oct 2021 08:03:28 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 941DF18007AC; Thu, 14 Oct 2021 10:03:26 +0200 (CEST) Date: Thu, 14 Oct 2021 10:03:26 +0200 From: "Gerd Hoffmann" To: Brijesh Singh Cc: devel@edk2.groups.io, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth Subject: Re: [PATCH v9 15/32] OvmfPkg/MemEncryptSevLib: add function to check the VMPL0 Message-ID: <20211014080326.z4yoaeh4hgl4iceb@sirius.home.kraxel.org> References: <20211013165713.727815-1-brijesh.singh@amd.com> <20211013165713.727815-16-brijesh.singh@amd.com> MIME-Version: 1.0 In-Reply-To: <20211013165713.727815-16-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 13, 2021 at 11:56:56AM -0500, Brijesh Singh wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > Virtual Machine Privilege Level (VMPL) feature in the SEV-SNP > architecture allows a guest VM to divide its address space into four > levels. The level can be used to provide the hardware isolated > abstraction layers with a VM. The VMPL0 is the highest privilege, and > VMPL3 is the least privilege. Certain operations must be done by the > VMPL0 software, such as: > > * Validate or invalidate memory range (PVALIDATE instruction) > * Allocate VMSA page (RMPADJUST instruction when VMSA=1) > > The initial SEV-SNP support assumes that the guest is running on VMPL0. > Let's add function in the MemEncryptSevLib that can be used for checking > whether guest is booted under the VMPL0. Acked-by: Gerd Hoffmann