Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2847572ybt; Mon, 22 Jun 2020 08:28:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLSf6i0RkVE0annsa3SmenySYRL17DvohSwfsWGahnVoZCLhD7TrZcx16uUpLMfo4IE9pG X-Received: by 2002:a17:907:7290:: with SMTP id dt16mr7448174ejc.63.1592839711539; Mon, 22 Jun 2020 08:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592839711; cv=none; d=google.com; s=arc-20160816; b=PJix/a+1MgWueh1/Fr+X3TTnjwy+ZVMtaOY53i1nUVz6szrmr9Brvrrox6yeb40CW5 Wav37onAz9MJU8g1P3zbVHjIMuKedLcdGM33faVJf/HU8WFE8rzBI3TGPvpYaVGzSsth 6DyC2nwDcGz69CphNBs9zCxAmlZFr+fP2TtH28pTDHbkEQukOTa945fD4XknZHDLB6ls /1ZBpOJB086ZIa4CWBAv2oFWgaZCKCcWCACbuVW2SVdZznyuO3MaCHMns9oLkpvrzzz7 CiCvxN6HWSJEeL4ye/uqImo98Y/oxnl4GNs20wiOf4620VIE1vh8KOFCuRJK76otej9G CumQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wGpF0Z4o98o6k0v3vIzdGQK4IxCExf5QSKDcyS94Xvc=; b=WPCVlsa8rCuYx1uODin/4RLvB8fBkOBHiCb3G+9jJTk8/Ndm23zLtzZ/lGZrBZgOHO OSJuFA8Ah6xmuyEwE3anYBbEJ9feYVV9wiEhuyFq6BCnJO2XAyC+WJQRoEVUs1nsLYC1 /fqB4SFuGVawN4MfSQvA558qiJluQ1QCbc0IVDPmXA/RFmhwvEolvNc2VrUap1X7ihyB 4eHHWuQ2qxcaX6ibWD9u0Ao22B+GZ3/aIxOWAel6S6jAr6TtlVL94ZALJVagXv4HltDg IGPAPkSUaN3PoVkJuXOjtb2vTY0xzdnaiNBb/aYgi9sBz4z5XX8LHU+5VH6ryHVco4fn SyHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WIzqC71X; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si1145605ejd.637.2020.06.22.08.28.08; Mon, 22 Jun 2020 08:28:31 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WIzqC71X; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729290AbgFVPXz (ORCPT + 99 others); Mon, 22 Jun 2020 11:23:55 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:36633 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729150AbgFVPXy (ORCPT ); Mon, 22 Jun 2020 11:23:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592839432; 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=wGpF0Z4o98o6k0v3vIzdGQK4IxCExf5QSKDcyS94Xvc=; b=WIzqC71X0A5hN4gOoXemTu/J+1yvz80y1jvPYSibdSKjR1ZKagJQeRVM+YbkbwPdic1C9o ibBWhrgXrP9pTFWPmbMj+B3Gehohy/Tfm5IjYNjdSodvExbdGT3CCQkzHl19bPaIcXo3Mc GLvs6Ass6OeGnxsyzVbGpUJ3Jn5BG2w= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-493-zORpBuoTOyu4u2Yvkgs1rA-1; Mon, 22 Jun 2020 11:23:51 -0400 X-MC-Unique: zORpBuoTOyu4u2Yvkgs1rA-1 Received: by mail-wm1-f69.google.com with SMTP id l2so6985636wmi.2 for ; Mon, 22 Jun 2020 08:23:50 -0700 (PDT) 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=wGpF0Z4o98o6k0v3vIzdGQK4IxCExf5QSKDcyS94Xvc=; b=FCJu5bTWbcih27Y51HompCnTeQ1mS/36vZmVJk66D6+VLGjA6C5lz1PnxYcrayVj1o mjGULw/IA6AcI4IJV+X2aNWvz7t4DKxA4CZr+7b1FK2z/61iJL8V9fUhGmWK7yOHGTVA LASAR3m+cgXyLWXaSP6aFe/MseW3IQTrfGl5h8xonyZPUf8I+8JFwo3w12Hees2Wsgnx WUrr0BJi8pd+rpPVysTGaEFMgMY32/qet7HMhLGiz3aiGYZnlJFWqVaU4Kryg3WdPlZ3 nw06a7GZbH1dugqC1Xyo52LEXcmqqR4VzyIkxtji5GsOYxCDWRKGK5cs9UpfABWTp1A9 pyxQ== X-Gm-Message-State: AOAM531fFbMWx+uzKdB/tIYGYhq3d0cyCS4pbz8I+58sdO9fE3c+CUe+ GZPagCIOBMnYrpbD1SF0S0g9ToWeFsgMMMlsiTu9ZXiqhF5yULQUUQkf0+rTEXxZkaPhyDWXXW/ QLs0SFSn50Sr9kLoCgB8e8SA0 X-Received: by 2002:adf:ef46:: with SMTP id c6mr1166990wrp.34.1592839429932; Mon, 22 Jun 2020 08:23:49 -0700 (PDT) X-Received: by 2002:adf:ef46:: with SMTP id c6mr1166972wrp.34.1592839429751; Mon, 22 Jun 2020 08:23:49 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:fd64:dd90:5ad5:d2e1? ([2001:b07:6468:f312:fd64:dd90:5ad5:d2e1]) by smtp.gmail.com with ESMTPSA id 63sm19975505wra.86.2020.06.22.08.23.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 08:23:49 -0700 (PDT) Subject: Re: [PATCH v2 00/11] KVM: Support guest MAXPHYADDR < host MAXPHYADDR To: Mohammed Gamal , Tom Lendacky , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, vkuznets@redhat.com, sean.j.christopherson@intel.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, babu.moger@amd.com References: <20200619153925.79106-1-mgamal@redhat.com> <5a52fd65-e1b2-ca87-e923-1d5ac167cfb9@amd.com> From: Paolo Bonzini Message-ID: <08594d32-9be2-b4d6-1dac-a335e8bda9f7@redhat.com> Date: Mon, 22 Jun 2020 17:23:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/06/20 17:08, Mohammed Gamal wrote: >> Also, something to consider. On AMD, when memory encryption is >> enabled (via the SYS_CFG MSR), a guest can actually have a larger >> MAXPHYADDR than the host. How do these patches all play into that? As long as the NPT page tables handle the guest MAXPHYADDR just fine, there's no need to do anything. I think that's the case? Paolo > Well the patches definitely don't address that case. It's assumed a > guest VM's MAXPHYADDR <= host MAXPHYADDR, and hence we handle the case > where a guests's physical address space is smaller and try to trap > faults that may go unnoticed by the host. > > My question is in the case of guest MAXPHYADDR > host MAXPHYADDR, do we > expect somehow that there might be guest physical addresses that > contain what the host could see as reserved bits? And how'd the host > handle that?