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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 1ADE2C433E0 for ; Thu, 9 Jul 2020 19:13:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB1CF20774 for ; Thu, 9 Jul 2020 19:13:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QnakQhtz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbgGITNZ (ORCPT ); Thu, 9 Jul 2020 15:13:25 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:44045 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726116AbgGITNY (ORCPT ); Thu, 9 Jul 2020 15:13:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594322003; 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: in-reply-to:in-reply-to:references:references; bh=o61SBWDAhCKKLWUhk2861tgk54LZbL4dIS40E+MaPC0=; b=QnakQhtzIt427fsoUrbY2B9xAIzGgO+cLLzNoYBDsIEkGnFoUbcwD+oSBD5OfzydC7mQC1 YDxDdtIdkpzIFptLMnHJJdhKN60WkLPewdyLMnL5cj+ztusUmkXsuboPu2pCZI91HaaPlc QvhVg3vY1T9EazaXp4T7wqgBxycwWr4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-kHjnVacmP-aelhsYSt6P0w-1; Thu, 09 Jul 2020 15:13:19 -0400 X-MC-Unique: kHjnVacmP-aelhsYSt6P0w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B45510059A4; Thu, 9 Jul 2020 19:13:18 +0000 (UTC) Received: from localhost (ovpn-116-140.rdu2.redhat.com [10.10.116.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id F31E86FEC6; Thu, 9 Jul 2020 19:13:07 +0000 (UTC) Date: Thu, 9 Jul 2020 15:13:07 -0400 From: Eduardo Habkost To: Jim Mattson Cc: Gerd Hoffmann , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , mtosatti@redhat.com, Pedro Principeza , kvm list , libvir-list@redhat.com, Dann Frazier , Guilherme Piccoli , "Dr. David Alan Gilbert" , Christian Ehrhardt , qemu-devel@nongnu.org, Paolo Bonzini , Mohammed Gamal , Laszlo Ersek , fw@gpiccoli.net, rth@twiddle.net Subject: Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it Message-ID: <20200709191307.GH780932@habkost.net> References: <20200619155344.79579-1-mgamal@redhat.com> <20200619155344.79579-3-mgamal@redhat.com> <20200708171621.GA780932@habkost.net> <20200708172653.GL3229307@redhat.com> <20200709094415.yvdh6hsfukqqeadp@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Jul 09, 2020 at 10:00:59AM -0700, Jim Mattson wrote: > On Thu, Jul 9, 2020 at 2:44 AM Gerd Hoffmann wrote: > > > (2) GUEST_MAXPHYADDR < HOST_MAXPHYADDR > > > > Mostly fine. Some edge cases, like different page fault errors for > > addresses above GUEST_MAXPHYADDR and below HOST_MAXPHYADDR. Which I > > think Mohammed fixed in the kernel recently. > > Doesn't this require intercepting MOV-to-CR3 when the guest is in PAE > mode, so that the hypervisor can validate the high bits in the PDPTEs? If the fix has additional overhead, is the additional overhead bad enough to warrant making it optional? Most existing GUEST_MAXPHYADDR < HOST_MAXPHYADDR guests already work today without the fix. -- Eduardo