Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2476318pxk; Mon, 14 Sep 2020 14:38:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPWe7/n+3ahCXGejUteAGBG3TlKIvFyBbOnuvtTsSn6D/uEqL+I43BsWcN2LnkELb+a2fe X-Received: by 2002:a17:906:16c8:: with SMTP id t8mr17366008ejd.272.1600119519584; Mon, 14 Sep 2020 14:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600119519; cv=none; d=google.com; s=arc-20160816; b=xs/7MkfcuUeMbRZnbsBooDOpnr9CQjSAYSeuWTRxQ+pyb9V/zm0I8f7H2B3kVfJPxh rvroN0K0CIQjzYv/1+ILgsYhfn2yw37UjVMpt6kMY39lL75JL3PkGfeftZvts4TeQLc0 5RSmkNQJwPotVjjRZAkxNhn20DO5t1XoxeOXspNrEvneGgg+AFi2aBbUcmrMF+i51gKz 1g7fTx81Kf+ZG8CUVMUeFumecIE45W3bLr7f/ORmm2es6QFhOfbO6jPcqYodDEkut61Z YaTlsPR4UaGTXgDnyNugjFQv7ZeHiLklPoLkUGdw3kFvCvVsYJpUbv0N7GP5culkl0Un XRzw== 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=xLPeTCVzUKDnCcH0B4VNwc/QZyeYacBFJESos8lcT7Q=; b=pYVf/pr5Kpeh5q64SuT/4d/POtlzQx4BGAHCn+fYQmxa9Q76KY55YzHPHuu6EA5G0B D8OWCsyd3qchBcL3Q0IjplYSCGzoO14MOhBTlSKDpXgTpyPtqY6NwvgRI0pUPbkGjnYr qZkMlcJ05+dPJC+fZPW/sAlzb3jfYVnJIdp7V2Et3ZmoK9o6OECXMX9q6RhcpJ8BrSkY ErF6eiIXnCpnipn1xPYGHzn4S6uYnrzzM3f9vd/LhIxiopgd05L3pqIb4hznOgMMu6Wb Yfam+2LITfXfa+ISoIqUTNid5X3QXznqE1uQEJ6AAhx2SVNpS0lL7GLExM3cG1LjTaEx qFbA== 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 u4si7651705ejj.685.2020.09.14.14.38.17; Mon, 14 Sep 2020 14:38:39 -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 S1726039AbgINVhQ (ORCPT + 99 others); Mon, 14 Sep 2020 17:37:16 -0400 Received: from mga17.intel.com ([192.55.52.151]:65304 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbgINVhM (ORCPT ); Mon, 14 Sep 2020 17:37:12 -0400 IronPort-SDR: M1rvg5w6s6IWdEDKkfXhNQ7SjWUY05USmYB1fanmF54ptbFfDEfZJo7Q2vlslWLkevsAxbT610 LaQly1E9a7Xw== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="139175439" X-IronPort-AV: E=Sophos;i="5.76,427,1592895600"; d="scan'208";a="139175439" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 14:37:10 -0700 IronPort-SDR: 1qipLXuLehnUbJKq9UzwT7QTjP6+RAK1R5zgEyJ/aLk/KMGY7LnGD83MNiUBXPz7U9DQG9V43J KTK3QppWsmmw== X-IronPort-AV: E=Sophos;i="5.76,427,1592895600"; d="scan'208";a="507297459" Received: from sjchrist-ice.jf.intel.com (HELO sjchrist-ice) ([10.54.31.34]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 14:37:10 -0700 Date: Mon, 14 Sep 2020 14:37:08 -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 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES Message-ID: <20200914213708.GC7192@sjchrist-ice> References: 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 Mon, Sep 14, 2020 at 03:15:39PM -0500, Tom Lendacky wrote: > From: Tom Lendacky > > Since many of the registers used by the SEV-ES are encrypted and cannot > be read or written, adjust the __get_sregs() / __set_sregs() to only get > or set the registers being tracked (efer, cr0, cr4 and cr8) once the VMSA > is encrypted. Is there an actual use case for writing said registers after the VMSA is encrypted? Assuming there's a separate "debug mode" and live migration has special logic, can KVM simply reject the ioctl() if guest state is protected?