From mboxrd@z Thu Jan 1 00:00:00 1970 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.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 25A12C433DF for ; Thu, 4 Jun 2020 21:03:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DA517206E6 for ; Thu, 4 Jun 2020 21:03:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SGe6Nt4I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA517206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6E84E280001; Thu, 4 Jun 2020 17:03:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 699D78E0006; Thu, 4 Jun 2020 17:03:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58716280001; Thu, 4 Jun 2020 17:03:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id 3D6278E0006 for ; Thu, 4 Jun 2020 17:03:25 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 01034180AD802 for ; Thu, 4 Jun 2020 21:03:24 +0000 (UTC) X-FDA: 76892755170.20.robin76_5107a7826d9a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id D6800180765DF for ; Thu, 4 Jun 2020 21:03:24 +0000 (UTC) X-HE-Tag: robin76_5107a7826d9a X-Filterd-Recvd-Size: 4889 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Jun 2020 21:03:24 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id k18so8008669ion.0 for ; Thu, 04 Jun 2020 14:03:24 -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:content-transfer-encoding; bh=xVcHrfKW+EZLK5WlvWHRmcrAcLbjRGuWUSEv5Qrs1B4=; b=SGe6Nt4I1FoJ2ANC8HuzMuezUuGCeu8KucBq8Rf8YAAzjJ4WCCfTCSJDkBTI5MPby7 olZ3xVaPwehMaSwNyhEU+fpeczpSyIA/hDSC4zLF4GWwLB3nX1siy6Wfqyd5oCZb4tex /ziFT9YowW6F6ToyhHZje6eivMjWP1rVKYNzqA84rhlVKpwXUMNxWPgqCfoqSNITOn2i 0I9nKK0BsJ/fBdtLlHabEsaKunPvKpO8EMC4np1uz2KMOMhc2Rs+fke+5WTlS/fjh4sx Mbdx3TTMQ0C+YfPvnrV8GrZ/GJyAoITjJ53BYhYBfzVa7qKrxy5vdZLXzA2PhbQkrv86 8vsw== 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:content-transfer-encoding; bh=xVcHrfKW+EZLK5WlvWHRmcrAcLbjRGuWUSEv5Qrs1B4=; b=mxWrNYo28k6+G5UKTIfvh7NmoBj+7n+vC67Syn9kCU47jYLRbY44F88GOWpXcgRNEc SZQUgt12uqBmad39FtI+hZiTSuUscEfLHk+ecF2GnIB4y5B21duJmN+x/5eWZ+kLa7m1 gE7qWIzWnToqFpYDj26DtL3KipsjOPm769AElyhIVFp5fTh3TTnaMSTn/RxF4g/EFN1Y 3inawMlHkwYKyJXLOKlj58jQNwMPVzbV25lEEOaTs8oe+2BRSe7yHOu0N7pA1NQ/Bpow SxcIhsi86E2ncLsdFkrLaUs3kLVD6TBGZL2sabJCNxOc5E8BtV/Drd2B8dDKEF1sn1SQ O2IQ== X-Gm-Message-State: AOAM530Ayv8HywF+Kacgd6JPDXmMhc9uTZrbODwcTRneLs85aW58BFNb vSd7dqotG6R0Kx22qXVjVLamYNi6M47+JVivRl5wGw== X-Google-Smtp-Source: ABdhPJydaD55JsS0MoPoYnaMrMN3IUQdB136AuNz0druLAaVYc+jwbiq3WE0o9kEigoUYDae316q2Oi5uZR3js1Jn6s= X-Received: by 2002:a02:390b:: with SMTP id l11mr6074699jaa.54.1591304603645; Thu, 04 Jun 2020 14:03:23 -0700 (PDT) MIME-Version: 1.0 References: <20200522125214.31348-1-kirill.shutemov@linux.intel.com> <20200604161523.39962919@why> <20200604154835.GE30223@linux.intel.com> <20200604163532.GE3650@willie-the-truck> <6DBAB6A4-A1F9-40E9-B81B-74182DDCF939@intel.com> In-Reply-To: <6DBAB6A4-A1F9-40E9-B81B-74182DDCF939@intel.com> From: Jim Mattson Date: Thu, 4 Jun 2020 14:03:12 -0700 Message-ID: Subject: Re: [RFC 00/16] KVM protected memory extension To: "Nakajima, Jun" Cc: Will Deacon , "Christopherson, Sean J" , Marc Zyngier , "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , David Rientjes , Andrea Arcangeli , Kees Cook , Will Drewry , "Edgecombe, Rick P" , "Kleen, Andi" , "x86@kernel.org" , "kvm@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "Kirill A. Shutemov" , "kernel-team@android.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: D6800180765DF X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 4, 2020 at 12:09 PM Nakajima, Jun wrot= e: > We (Intel virtualization team) are also working on a similar thing, proto= typing to meet such requirements, i..e "some level of confidentiality to gu= ests=E2=80=9D. Linux/KVM is the host, and the Kirill=E2=80=99s patches are = helpful when removing the mappings from the host to achieve memory isolatio= n of a guest. But, it=E2=80=99s not easy to prove there are no other mappin= gs. > > To raise the level of security, our idea is to de-privilege the host kern= el just to enforce memory isolation using EPT (Extended Page Table) that vi= rtualizes guest (the host kernel in this case) physical memory; almost ever= ything is passthrough. And the EPT for the host kernel excludes the memory = for the guest(s) that has confidential info. So, the host kernel shouldn=E2= =80=99t cause VM exits as long as it=E2=80=99s behaving well (CPUID still c= auses a VM exit, though). You're Intel. Can't you just change the CPUID intercept from required to optional? It seems like this should be in the realm of a small microcode patch.