Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3167760pxk; Tue, 15 Sep 2020 11:48:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhRW5J1LzF1XrATS6vZ3nSb+1o0ydiEqEfzq/xK6IyGNZ6XcNT++giEc3wOM3qj17RxBFL X-Received: by 2002:a17:906:2c44:: with SMTP id f4mr21631853ejh.52.1600195697486; Tue, 15 Sep 2020 11:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600195697; cv=none; d=google.com; s=arc-20160816; b=Os1tVKE7ibGQxumr7hBWysB0sSEFdcf3YmKU3HMN8xRih3zEwI4hoyopEoU6CdmLCG S3v3v1YYXt6EmRIFRgqf6HAtC5QTOTbafM5T9tDvN2IgZqw0XdKKt/EZ8nQu0fu0Wxut iUg8Qg6WIcqTlpgjISUmogfKyYsJ36PpEfgCv1EsCRk33kvzm+PXnbLydGJG55z4otDd um5qGhaPcKxuy89s3JoYLp7DjwEvfuYEzWPiv1azyXf3dp2/Lx/hkvteQrF69s33zTMb dYbLn7+T6X0vc7mb1k2FyqaiMNcFSyQ0LgMbxoZFRfBuKQ3jTu3UgsAMttDFIw17HipW PuSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=RIEp+o29Pdd+YGUEPYI0Fu39oLByuwH4ZDrBtNS5kyk=; b=xOzSe4GBUXKWpDTVt1461xH+RSova9f5pugyr7cakPMDpZrW9kWDx4FscaMXUMBzkB xUsZxCCN7qtvzyp1zbJPt3EcRg7CBpBQbBSBErFKn2jPwHzGk7rLKYWcnNMTve7wCQuY zt3diUOYJkwYv3LARBH7kZWT7Ska6tJ6kohhwqiFMoGIbvH98Jg/9i0npmh3fd201Ok7 pw34/glXFFvdC0yxa81QF7Hw68/7zIYLeiNUKquSsa+TqE4aXJXHrlZiblKrdnbdipaX xP+kv9LFBC5W4iQxqeH1UXe7fT5qPffiM+6xlEbw1y9cMFqNvCCEz6X4MaDF7lX5NS5W Ll4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si9956723edh.4.2020.09.15.11.47.55; Tue, 15 Sep 2020 11:48:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727960AbgIOSoz (ORCPT + 99 others); Tue, 15 Sep 2020 14:44:55 -0400 Received: from mga05.intel.com ([192.55.52.43]:16833 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbgIORcF (ORCPT ); Tue, 15 Sep 2020 13:32:05 -0400 IronPort-SDR: j945rw/tZiMtIyu6Z9xqc+7CBpVgbn1BVFWf3+1ywxljSlC/7qIZ9eXDKYpFtckHzlizZxN6Zy DnKA9XSfe9qw== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="244143766" X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="244143766" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 10:32:04 -0700 IronPort-SDR: LkpV4y0gFkMjvYwMOvoxzfhIAthofs96RLIv/8OgJIa19pS4IFZdHKr7mNwuANYbIpTyHHf1W+ kohW3ssHGbcg== X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="451509688" Received: from sjchrist-ice.jf.intel.com (HELO sjchrist-ice) ([10.54.31.34]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 10:32:04 -0700 Date: Tue, 15 Sep 2020 10:32:02 -0700 From: Sean Christopherson To: Tom Lendacky Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Paolo Bonzini , Jim Mattson , Joerg Roedel , Vitaly Kuznetsov , Wanpeng Li , Borislav Petkov , Ingo Molnar , Thomas Gleixner , Brijesh Singh Subject: Re: [RFC PATCH 00/35] SEV-ES hypervisor support Message-ID: <20200915173202.GF8420@sjchrist-ice> References: <20200914225951.GM7192@sjchrist-ice> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 12:22:05PM -0500, Tom Lendacky wrote: > On 9/14/20 5:59 PM, Sean Christopherson wrote: > > On Mon, Sep 14, 2020 at 03:15:14PM -0500, Tom Lendacky wrote: > >> From: Tom Lendacky > >> > >> This patch series provides support for running SEV-ES guests under KVM. > > > > From the x86/VMX side of things, the GPR hooks are the only changes that I > > strongly dislike. > > > > For the vmsa_encrypted flag and related things like allow_debug(), I'd > > really like to aim for a common implementation between SEV-ES and TDX[*] from > > the get go, within reason obviously. From a code perspective, I don't think > > it will be too onerous as the basic tenets are quite similar, e.g. guest > > state is off limits, FPU state is autoswitched, etc..., but I suspect (or > > maybe worry?) that there are enough minor differences that we'll want a more > > generic way of marking ioctls() as disallowed to avoid having one-off checks > > all over the place. > > > > That being said, it may also be that there are some ioctls() that should be > > disallowed under SEV-ES, but aren't in this series. E.g. I assume > > kvm_vcpu_ioctl_smi() should be rejected as KVM can't do the necessary > > emulation (I assume this applies to vanilla SEV as well?). > > Right, SMM isn't currently supported under SEV-ES. SEV does support SMM, > though, since the register state can be altered to change over to the SMM > register state. So the SMI ioctl() is ok for SEV. But isn't guest memory inaccessible for SEV? E.g. how does KVM emulate the save/restore to/from SMRAM?