From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 95A827803D0 for ; Thu, 22 Feb 2024 17:39:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qU76n7aGb8vFg7591f1alOKsG4jwloYp0LOZQE65+as=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708623567; v=1; b=sZxzvC+XULLX6cgYSpy60X+sTAHZCq8IUbelYI8dPDxK9PU+q4FuMUq13rDwmaWTCpgnbfzS b3u9rKTY8a/1QnSlgWU+KSws1vmZroKcm51zs4Ij+ZTfUxK1l5E9QL6/g6tCQVeVmT/Jx6R3ex8 VH+4bW9wOy7bAihGYyx1ACPw= X-Received: by 127.0.0.2 with SMTP id 3cE8YY7687511xRwxzL8G9aL; Thu, 22 Feb 2024 09:39:27 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.19022.1708623566550008408 for ; Thu, 22 Feb 2024 09:39:26 -0800 X-Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-jqhtZWJXMSq_MPgh7KoQeQ-1; Thu, 22 Feb 2024 12:39:24 -0500 X-MC-Unique: jqhtZWJXMSq_MPgh7KoQeQ-1 X-Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4127b4d7607so5968105e9.3 for ; Thu, 22 Feb 2024 09:39:24 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVIRO4LbXSaE0/XRXUiDj4QSpiRab9BQ4J3vIOlPftV5sJqeNAvKp3kRFPw7s4+iJvfdChtErNXbqfobNg2tlBI5f3HFQ== X-Gm-Message-State: DPjDy3VUEGNhDZxLHsVfX9K4x7686176AA= X-Received: by 2002:adf:e805:0:b0:33d:82a5:50cb with SMTP id o5-20020adfe805000000b0033d82a550cbmr3943620wrm.27.1708623563290; Thu, 22 Feb 2024 09:39:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOhJ2O3MNH9wt4cPiULlACQKC6p4vADKdZY/UjaE7l+ymiLvCCX+0NWFeAOps17BqqYhfeRleyUctyK+cZjKg= X-Received: by 2002:adf:e805:0:b0:33d:82a5:50cb with SMTP id o5-20020adfe805000000b0033d82a550cbmr3943599wrm.27.1708623562968; Thu, 22 Feb 2024 09:39:22 -0800 (PST) MIME-Version: 1.0 References: <20240222105407.75735-1-kraxel@redhat.com> <20240222105407.75735-4-kraxel@redhat.com> <32oty4asp3xrecjruatwm77fbevcaizswovjc5jqct5bdofwiq@sgff2gzgau7o> <74a62ef0-bd0f-4844-985c-0035fc3d76f7@redhat.com> In-Reply-To: <74a62ef0-bd0f-4844-985c-0035fc3d76f7@redhat.com> From: "Paolo Bonzini" Date: Thu, 22 Feb 2024 18:39:11 +0100 Message-ID: Subject: Re: [edk2-devel] GuestPhysAddrSize questions To: Tom Lendacky , Gerd Hoffmann , devel@edk2.groups.io Cc: Michael Roth , Jiewen Yao , Liming Gao , Laszlo Ersek , Ard Biesheuvel , Min Xu , Erdem Aktas , Oliver Steffen , Ard Biesheuvel X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pbonzini@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=sZxzvC+X; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Thu, Feb 22, 2024 at 5:13=E2=80=AFPM Paolo Bonzini = wrote: > Also, to clarify the hardware behavior, if hCR4.LA57=3D0 and host > PhysAddrSize=3D=3D52, then will guest physical addresses above 2^48 > > 1) cause a reserved #PF in the guest, or > > 2) cause a non-present NPF exit in the hypervisor? > > I remember that several years ago we had a discussion on hCR4.LA57=3D0 > reducing the address space compared to MAXPHYADDR, but I cannot find the > emails and also at the time I didn't notice GuestPhysAddrSize. Found them! They say that "according to the design document, CPU will report #NPF if the guest references a PA that is greater than 48 bits while the hypervisor is in 4-level nested paging mode". That's nice, because it's the same behavior as the affected Intel processors. Paolo > Anyhow, basically we would like GuestPhysAddrSize to be "redefined" as > > Maximum usable physical address size in bits. Physical addresses > above this size should not be used, but will not produce a "reserved" > page fault. When this field is zero, all bits up to PhysAddrSize are > usable. This field is expected to be nonzero only on guests where > the hypervisor is using nested paging. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115859): https://edk2.groups.io/g/devel/message/115859 Mute This Topic: https://groups.io/mt/104510523/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-