From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.59]) by mx.groups.io with SMTP id smtpd.web12.1767.1624412875450750809 for ; Tue, 22 Jun 2021 18:47:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=O+jzobHw; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.236.59, mailfrom: ashish.kalra@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amjThOuTWG+1Ut+5/XzOu7qaPSFqPR+mdPP3lN3LB610taxCvNHVyJxxEo+JnZjTuzfo9Y1c1OstJNvJzSWd8jVsCs2h2qONKAtuXR9ZVsAqZliMkmdkfDMEwk+r0fhldmZVRpTlX519KOx4hx79vMfJM7A+zHf5x7HJXQvlWEJIoQpJrsTZ3KnxKNOiFnkxTrYMeGdOur9PFMGEUe/Qrz3kjrt4N8wQhp3tuo48UmB5cjShHV0QUbzcXCIDIOSkWp/NY5qwfM8Dm2rc85iK1ayQ4/F0CFdWT0lVSTHaEXnbLZa4C1lRbRhxWc6t3OBAR3TIvyi0bQ4idgVwHSS9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2w7Z7xqDFK9oioHkkaIttR0Zqlz+Wl4lp/Yj5J5MNGg=; b=OhBawRc9CHKBU8gVNjes1xO6Nf6TP2jNV1VTtT5mwwQzWTxjYgIywriTF3AoPD7lKVpDXNWmoWc1GkJ6ET/vBxoh35manJa9ZmQ56znNtoGdwZzkP/jBKVXmU+AnJAirsxowQ9tNIbouyuBcYVLxhvu20TFQKxKojfzhN1dc9uV7CyIlJjUhV3AEh/920fh8x/JdP+ZmXokpDaYnJStYHyWt/cDcczrabjtlTYbXeVaaeBrT/TrbPJIpME2fAiY38EsUJ1DBwZ5pON24PDCLCWiJAF/3LuYPRdfwQ+suNfAfhK2zeBkFd+3LoNmuhknpAw15PPmMtZEDWr1+rquVZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2w7Z7xqDFK9oioHkkaIttR0Zqlz+Wl4lp/Yj5J5MNGg=; b=O+jzobHwyN2j8377GuaGEbzhWveOynQ9aSITZ92qwdmMOpR4dg4ltUwb0/BFWZZbPlCryaXf45F/ZFHTSuh9v/6EDsjrGsd7BoZCSSY7l5vnp05tfhSEkMJ8k20tQkgPx4WlRXbVjU0WQsMwwqIsQJI9MeQVvwbckQgkewJ9lok= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) by SN6PR12MB2719.namprd12.prod.outlook.com (2603:10b6:805:6c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Wed, 23 Jun 2021 01:47:53 +0000 Received: from SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::958d:2e44:518c:744c]) by SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::958d:2e44:518c:744c%7]) with mapi id 15.20.4242.023; Wed, 23 Jun 2021 01:47:52 +0000 Date: Wed, 23 Jun 2021 01:47:47 +0000 From: "Ashish Kalra" To: Tom Lendacky Cc: devel@edk2.groups.io, brijesh.singh@amd.com, jejb@linux.ibm.com, erdemaktas@google.com, jiewen.yao@intel.com, min.m.xu@intel.com, lersek@redhat.com, jordan.l.justen@intel.com, ard.biesheuvel@arm.com Subject: Re: [PATCH v4 1/4] OvmfPkg/MemEncryptHypercallLib: add library to support SEV hypercalls. Message-ID: <20210623014747.GA6881@ashkalra_ubuntu_server> References: <7d0a30a022a7d3d3e056af8f79b87ed9991d2f52.1624281247.git.ashish.kalra@amd.com> In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN7P220CA0005.NAMP220.PROD.OUTLOOK.COM (2603:10b6:806:123::10) To SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) Return-Path: ashish.kalra@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ashkalra_ubuntu_server (165.204.77.1) by SN7P220CA0005.NAMP220.PROD.OUTLOOK.COM (2603:10b6:806:123::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Wed, 23 Jun 2021 01:47:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00c4fa24-1d09-4922-56df-08d935e8ea1c X-MS-TrafficTypeDiagnostic: SN6PR12MB2719: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8IsKB8dqV5i2rhzixAXAAa0bmkOZH4E4JK3GQLcr6L9EgI2y+ONaUK1Ej/KQAAKeo95wmdnJKHy8TCw2g3CAwK3qS1RAMmMYizGVnLm19ZjqVgXdSoegm2C6DyWdXylw9TBFG9TQ9bevFgHHVs3TcyACXmmXXlviUpH5SHtfWbVucH1psZ/11Po4AJj7TBWlXQoNtm/lV7Q/5HXVFTWmb4FFM7pQ9kQkbeKdMx2sIe/WfEqL0PaFP3mLHtGkUH/Vlch+pGk2kPMjt131GHVyBAzg1+mlJ5/zQTcSihAWfhhYV1DJXKhUzJaY71iW4xBmG8olltHSpFIAUhBQdvc5DM3Yu58ZMGB9syDlZjQ4mAvCwBMQcFojFmG6fRpI8cuyUd2o79FHcxdBq9JmmNnojNnXsqqqH1WJc8OwwMetJH7BvStKOrmiUflLSUnf841VjXgO/2gfRa3F9kC9OilNeTRo5M3jamgLNCw7AWX/lQP572jx/iQ6vaB83yRuC/CmiQJHqN4cZSezc42zQCpVVjD45xbhaSrr1RuyOHEVSy0vCTu1tWMVSXj7dQ1mpn2YLjdVLehs7//k2ArukQ7J+sNmp0mbGAkSXvx3za8paIEk/oeOiyj3krNR0nRCDANN/2+F2hNue1EvdkvK3Ei+uCAacp4i7DkIHa2b2HecOtY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2767.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(66476007)(66556008)(186003)(52116002)(16526019)(9686003)(6496006)(478600001)(55016002)(66946007)(26005)(53546011)(1076003)(38350700002)(6636002)(956004)(4326008)(6862004)(33656002)(8676002)(86362001)(316002)(8936002)(38100700002)(6666004)(2906002)(4744005)(33716001)(5660300002)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?tk4TwkYG7KMXCbNlOWFkIrTsJbFXLaZsZX9EOVhQF8tYGqPgvfl/CegA7I1n?= =?us-ascii?Q?Ol4Kxr6nl/WvLd6Uvizxg8O9MzwjqaDWTr8m0uJriVpdZSsSByAzljDpmVxN?= =?us-ascii?Q?D8PXiu2mR+AqRwNGTK9BHg5g7Js+0QYzOsNfowOTLS7tHMv4cLrTbrrB865L?= =?us-ascii?Q?t7Jt2gY/5Jyme95wZlBmJ209ZOx5fRQplWu/FyXf/FU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aNiXSiXN1ju6mXJdP04bjalKIsD4+7owhLfQ?= =?us-ascii?Q?IYXM54TAjtfMFdAJzKGjbKUxxYK4NDAM8MUFFoZgbVBOswMwsGVYkcWIlJhw?= =?us-ascii?Q?m/5mJAo+uoinfNkaU13dj44iH0eb8YQKMQMTLgYaqaDyblfL/q09fpyqeiUH?= =?us-ascii?Q?yAJm41fj/KkVf+k3pzE5q9LexNCERgF9tnSgiIaEQJ4LqD0TOpVDx6xhfy4x?= =?us-ascii?Q?ULjU//IZHuBYiHnKll7J09l9?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00c4fa24-1d09-4922-56df-08d935e8ea1c X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2767.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2021 01:47:52.8644 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jzIMQDhfiVNwIgRIz0XIwu5K1HUlX1VXIL9hz+iDU99YrFco3cd3VF/msJ1QXi9H2VeErVFdjUYhDo0XjsjE4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2719 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Tom, On Tue, Jun 22, 2021 at 05:47:48PM -0500, Tom Lendacky wrote: > On 6/21/21 8:56 AM, Ashish Kalra wrote: > > From: Ashish Kalra > > > > Add SEV and SEV-ES hypercall abstraction library to support SEV Page > > encryption/deceryption status hypercalls for SEV and SEV-ES guests. > > Does this have to be a new library? It's just a single function and so I > would think it could live in the BaseMemEncryptSevLib library where the > change to the c-bit is being done anyway. > Actually i like this approach, instead of adding a new library. Again, IIRC we had discussed this internally and then decided to create a new hypercall library similar to Xen, with reference to the email copied below : ... Xen has support under Ovmf for a Xen hypercall library (OvmfPkg/Library/XenHypercallLib). Take a look at that and maybe create something similar for KVM. ... Thanks, Ashish