Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp142060imm; Tue, 3 Jul 2018 15:41:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ/C6jLXXzOgHunsp9ZUc74iQiyKGSfvKZBsXaKLJubibUBF4uTcWnRME8E3DTBjPdBhLBF X-Received: by 2002:a65:5cc5:: with SMTP id b5-v6mr26779690pgt.425.1530657706190; Tue, 03 Jul 2018 15:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530657706; cv=none; d=google.com; s=arc-20160816; b=zKBp0E+VKeb0GM8cnac4CXq9bG54u7LL50kZiDDm7giudHMvx27xPlJ+vo3UaxmT7T 5dmTtNtPeTd/LRAmndapBd0EJ28ouQG28t7kYFK8HrfiR/mydMbTX/I4v+8w8gl0XrhP Li52YhLHUwEUzrtsaEhNL9/83t50Y+HvCvNfQTo26tu8ET7jlUeDvIkcScXkgpGU4F09 kTILk1u1bLwTiPev1eZzmEkq0uPnwcI2Yx5CRmd/2ig269sPtjlj8lUqRDhjU8jBtAnS 3svVK8dwgpYVL/kfG/520MN9sY34H24pTpXvoOkdf6N7xzcpjhrCVb/MM12f8XZEKOJk Xd5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=T2PcvfEVznMAHR7V574/TrnKnFSBnfde/7dL6mqZVJk=; b=Pon2WcOjJ6CUZrmaNwb2K7gU0oUaylAA4z8MLjyfdRaJWJjzD1ljDOWhFgW4Bdvev+ RM2ftqB13ND6LnwsMU9OD6j84EX8DfEq7NzErWMWNdxLzKZ3fEv+KHboCiqvSfMUX5SE MY4S3hCmzQ7xcV5RU+lyH57zKmxfnfUPY2aNZPDIOo0GitR25CMdlzoprWosN6JAJDFW oOY3V7eEzAbrGNWc0ZTfBrjUJKIBuDqu0bw/3m1y+70YwGMDR4up9seug93rnwpCylJf Hr3bSHIhUSL+r+UqgE+zrDMjKy5FdDHRx32cLsuqghRcGigsTmDHK0h3oZJp1iA+cKtI mb6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5osocoE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190-v6si1535327pfu.343.2018.07.03.15.41.31; Tue, 03 Jul 2018 15:41:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5osocoE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753383AbeGCWkt (ORCPT + 99 others); Tue, 3 Jul 2018 18:40:49 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:45609 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753179AbeGCWkr (ORCPT ); Tue, 3 Jul 2018 18:40:47 -0400 Received: by mail-io0-f193.google.com with SMTP id l25-v6so3157379ioh.12 for ; Tue, 03 Jul 2018 15:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T2PcvfEVznMAHR7V574/TrnKnFSBnfde/7dL6mqZVJk=; b=h5osocoE+zEP6XRcOLF7YtoH8HYNXIVPhXpdhOxp6p46O+iOwrRyc8EqIwM48q8rI7 yMFHk9G8PJbmd+4SXOZWPCy8oJQxkKV0K5Dw6SNs7WeiA3RbrvV1cKbfy4YbFu5v3l61 ZtKzIuGAxLGO4IOrjN0F8ruAs+kcCGD88jQqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T2PcvfEVznMAHR7V574/TrnKnFSBnfde/7dL6mqZVJk=; b=bvHgYcFCHILB2+aFxV8ZPqTaVUsgicKTXPBOSb/yPsjevY9qmaPy6oQxVwmNOXaxjl 19OCGjdWqxr2hYqzGYdWVZvMOTR900DvELnbeDWB1H4UBUibwrkDPpVCOuO8gZBeeacV NwggI/2hTgZaE+/YAcQvTBT5YSbGCw7RrVDWdPkqstkF/IThgyNpeJwH3+DbJojhz4mm 5ofVtGUaP3QshBy8aiTXCzQFOt8e2RuMhGeiVAoxqsyHhrR5eVYw2tPzZk3kq8sLi/ZV 7fDGqoaFrG8//7hZmgZ1kqxL7AUY70mWg2aZdkIQmcB8TZcMQpvnJLaJjZE893ptRR/I UbSQ== X-Gm-Message-State: APt69E0GmjvrAQsz0m/T8YJOj5zAksRaemf3Omwr9gRsj0HER5rx9tO+ qAHKjGkrh6dyVeA+jaWMbMiSOa3tOfMlSEdALSKE8w== X-Received: by 2002:a6b:5d1a:: with SMTP id r26-v6mr11795990iob.170.1530657647079; Tue, 03 Jul 2018 15:40:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bbc7:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 15:40:46 -0700 (PDT) In-Reply-To: <20180703214604.GA15516@zn.tnic> References: <1530624720-32004-1-git-send-email-brijesh.singh@amd.com> <20180703154418.GC4643@zn.tnic> <20180703214604.GA15516@zn.tnic> From: Ard Biesheuvel Date: Wed, 4 Jul 2018 00:40:46 +0200 Message-ID: Subject: Re: [PATCH] x86/efi: Access EFI MMIO data as unencrypted when SEV is active To: Borislav Petkov Cc: Brijesh Singh , "the arch/x86 maintainers" , linux-efi , Linux Kernel Mailing List , Tom Lendacky , Thomas Gleixner , KVM devel mailing list , Matt Fleming , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3 July 2018 at 23:46, Borislav Petkov wrote: > On Tue, Jul 03, 2018 at 04:16:57PM -0500, Brijesh Singh wrote: >> I agree with Ard, it may be good idea to extend the UEFI spec to >> include encryption information. Having this information may be helpful >> in some cases, e.g if we ever need to map a specific non IO memory as >> unencrypted. So far we have not seen the need for it. But I will ask AMD >> folks working closely with UEFI committee to float this and submit it as >> enhancement in Tianocore BZ. > > Except that if the IO memory handling unencrypted changes in future > incarnations, the changes to the spec become moot. I'm just saying... > Quite the opposite. If we allocate a EFI_MEMORY_xx bit to signify that a region should be mapped as encrypted, we no longer have to reason about these things in the kernel but we can simply apply the attributes that the UEFI memory map provides us. A platform could then describe both encrypted and unencrypted MMIO regions at will.