Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6298CC433E0 for ; Wed, 3 Feb 2021 17:45:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 147D064F8C for ; Wed, 3 Feb 2021 17:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbhBCRpE (ORCPT ); Wed, 3 Feb 2021 12:45:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29711 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhBCRpE (ORCPT ); Wed, 3 Feb 2021 12:45:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612374217; 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=FxOm0qfOZ5QeUqZ9bk91/6UdZPlXoRGgsnEFAEYrFd8=; b=iZGYu5qC7ftPKKNuzVbEla5qUOpjYVawTAUZW0ZHT3s0KvXs8hs+2uaQurk235LSfBjKGM NOON/cNqYPWhGdiA6NFeAFYo0gNqWzYXhlpUVxbz6krmEfYWEj+jNTX82eDjGD5M54YVTF L+K2ccEe/sMMHrLA7msGOPPLk+QWHH4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-b_RGxU4JM2OAi0UcyyuRRQ-1; Wed, 03 Feb 2021 12:43:36 -0500 X-MC-Unique: b_RGxU4JM2OAi0UcyyuRRQ-1 Received: by mail-ej1-f69.google.com with SMTP id eb5so173364ejc.6 for ; Wed, 03 Feb 2021 09:43:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FxOm0qfOZ5QeUqZ9bk91/6UdZPlXoRGgsnEFAEYrFd8=; b=MJVtbO/kTQnL2lYKHh7/6mMlBB6le7NSdpCynB1z/XHcQOvTZQm5d6WeD/Qag9cQji Ba49S4H2iDgiyTlXVtVh/BVl93GB9cb/0yN55bOF1Dbl9UCfkm1r8iG8h2zHzaH2WEqI 4mpGQkFUqLLnGSSsYRxDYMmo6vF8I7VNk0VZsG9F4yvzjMpP6pKF+rLPB0dB2zIP+lTY 5zCuMJfILnT1Qxx7KcdwGcjrtiue4HKEjcl7lK8fP1YlJSXwARVd8DiUxPWzfg1c0H4h EFvo1nXFFKET0SBjD5iuECBWcyDyToVfr/X1w2mKurGhARULkdQpppwU4KwJX3OzQ9VF KaVw== X-Gm-Message-State: AOAM532AbUgpiqDVK9duT+5rrQ8qib4ngZyJrJbA0IMDuUcD6UFnRREY DsHnWuAe5h1fiXdz22ao2TOYvqufJOwVm+cghzuhPKPHSSq7X1PQb1idUW2np7Rm3cIG21BhtYf fnTsLfN27zwYN75PqrpRW X-Received: by 2002:a17:906:7cd8:: with SMTP id h24mr4183072ejp.511.1612374214788; Wed, 03 Feb 2021 09:43:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXEqUh4gg0Bh1nnw22nR0czOY2y9xiy7RtEw61PiRhc5QN5xq9nhgJrs58247HV+BswkTifA== X-Received: by 2002:a17:906:7cd8:: with SMTP id h24mr4183058ejp.511.1612374214638; Wed, 03 Feb 2021 09:43:34 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id i21sm1225393edy.9.2021.02.03.09.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Feb 2021 09:43:33 -0800 (PST) Subject: Re: [RFC PATCH v3 00/27] KVM SGX virtualization support To: Sean Christopherson , Dave Hansen Cc: "Edgecombe, Rick P" , "linux-sgx@vger.kernel.org" , "kvm@vger.kernel.org" , "Huang, Kai" , "x86@kernel.org" , "corbet@lwn.net" , "luto@kernel.org" , "jethro@fortanix.com" , "wanpengli@tencent.com" , "mingo@redhat.com" , "b.thiel@posteo.de" , "tglx@linutronix.de" , "jarkko@kernel.org" , "joro@8bytes.org" , "hpa@zytor.com" , "jmattson@google.com" , "vkuznets@redhat.com" , "bp@alien8.de" , "Huang, Haitao" References: <4b4b9ed1d7756e8bccf548fc41d05c7dd8367b33.camel@intel.com> <99135352-8e10-fe81-f0dc-8d552d73e3d3@intel.com> From: Paolo Bonzini Message-ID: <475c5f8b-efb7-629d-b8d2-2916ee150e4f@redhat.com> Date: Wed, 3 Feb 2021 18:43:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On 03/02/21 18:36, Sean Christopherson wrote: > I'm not at all opposed to preventing KVM from accessing EPC, but I > really don't want to add a special check in KVM to avoid reading EPC. > KVM generally isn't aware of physical backings, and the relevant KVM > code is shared between all architectures. Yeah, special casing KVM is almost always the wrong thing to do. Anything that KVM can do, other subsystems will do as well. Paolo