Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp715203ybt; Fri, 10 Jul 2020 10:28:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmi0P/MvIFngaelomeZD+e02JxK6quw64nr65aN8f2UHdNtzwyAwCFlz0QX69xfmOowCGB X-Received: by 2002:a17:906:3bd5:: with SMTP id v21mr59765696ejf.329.1594402097355; Fri, 10 Jul 2020 10:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594402097; cv=none; d=google.com; s=arc-20160816; b=pQ+m1aVd4U5xotlSFa34u2zC6dd6yVrxgGN+zdL/pbmfcriTOTreiYBYbgjQAS4AIh oRSVrYXJdR69HqnrYGspSx5HDYXWdRa5WvbK/4jUqipQecxYaGhQVMSQwVMykRvbCi9D Aa76YIRtGtpL21RZAE+zo1PbOd8tSpG8ajgtHGp0KA5vgJhJdJ8VH6cM8j7UQ2BhUd5b axdUDxDph9TMshO9459eqfD+cuwRwO1BGTQefUDtR37awDIsCnfVTNiD5nrDqH9pk63q BXjlR2vLDTibJBoL08ge13mkzNBvjyzuPqLrEhbUVgGtmpvqQ1l9vhEyezquzOrDqHAq MofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CqJnoWCCHedrq/sE7xptu8e2ktVbhXZt758ObhyN/DU=; b=zguYc6H6lJPcBQGEkth6sB6Yc/cVl1apWX0M0jME3NvYKwsutW+FcZCXqW15kHmzw0 BzYPXEuq30bU9dPVF2N8JXeTRrR+MUt0PM2wAtrbheJ6mgqo5aPt4AhuxilUztbJveaH 0hDN5W1VuWDTKgfDpW/ROgvdzbTZ48DkqhwUxJ0YJlIWfSKzpF8AB+Rp4dZYaLOj4ylT p2JRl30h4Sf2H2QwaHzFwXN9W/iFgOwY87glbW5FlGrdKiJf0GPytmuCxHjUNSG46pGz OPwaLYDlBlHWeh9VNGv6+Y9Jki0C0Co2Z6dCOs/JTgsqNoirJ9+n4emaGqWRAEUCyKcz JL0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pYEPfjqt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si4516241edx.189.2020.07.10.10.27.53; Fri, 10 Jul 2020 10:28: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; dkim=pass header.i=@google.com header.s=20161025 header.b=pYEPfjqt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728116AbgGJR0x (ORCPT + 99 others); Fri, 10 Jul 2020 13:26:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728117AbgGJR0w (ORCPT ); Fri, 10 Jul 2020 13:26:52 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A805C08C5DD for ; Fri, 10 Jul 2020 10:26:52 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id r12so5736200ilh.4 for ; Fri, 10 Jul 2020 10:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CqJnoWCCHedrq/sE7xptu8e2ktVbhXZt758ObhyN/DU=; b=pYEPfjqtWC03FcbjU/vEyI2Jvj2Cb+4dFJ/rm83f9F0tVa8/blrrwdEUgp3cbYB8N5 HWfrtZkVga6TgVkLCIw+THtL6JYGn1jt/kUPIAYT8ss/SXt4NkopRFDH0i2RChiRHvJ9 R55Mw9NYvpS0DVGIKhSE7hIXLRGpMZT5FEFLxgGuan+vg6TAFuh1SFHgQeWOzSg3qyXl o77Pwecu6eTEdXbw5VU1gszypRoJDiZBitxlUPSqgD+qtLaCP17oThyYNor1oT9OyeYD 7TEMmClSqhcUpmLEgFI/wQe3v/OsJG1Yeinb7tz399sGHmP/Gg3ZvPHhOAT5SJpEZw+H OAmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CqJnoWCCHedrq/sE7xptu8e2ktVbhXZt758ObhyN/DU=; b=qG3gIM3zW7r8Xu09oTpv08jhPccmSlsi13x3+45MolBwf1ULEm+sXu1S/0U6e0HDqg vu7eDywwL87f5yBbbraBXWg4a2xGiud6UV6Cg4CKnu2KV2Nrw5fqPn8atrozHvn2dbvQ fJjxezJJm7zTXJfElfYqdCoxgSLSgXWM2QBzJ5U7oQlspqKapw5m3s2DpjqDExmmZ27G guYA81/dnTeVPr9cxEH1O+2QncSAAoE6hc1+PL9mHNHEswM7tsfQ3yadjdnGHkMBr2jK soS+2kVLC2fGLjoC4EG/SxR1MiSB11R5LFO8ipxyOWQBcbt9ClpWlhcp7g5z8/cePGIS Dcyg== X-Gm-Message-State: AOAM532s4WJvGjw/BWyfuDsIunDtGbCCQesxEpOkFemUXmEMy5OoW2gz UOTwvdYgTreJoJoj5HwzPjzQ5I3RN1kjRCB+MPvzqA== X-Received: by 2002:a92:b685:: with SMTP id m5mr53354561ill.118.1594402011252; Fri, 10 Jul 2020 10:26:51 -0700 (PDT) MIME-Version: 1.0 References: <20200710154811.418214-1-mgamal@redhat.com> <0c892b1e-6fe6-2aa7-602e-f5fadc54c257@redhat.com> <9e784c62-15ee-63b7-4942-474493bac536@redhat.com> In-Reply-To: <9e784c62-15ee-63b7-4942-474493bac536@redhat.com> From: Jim Mattson Date: Fri, 10 Jul 2020 10:26:40 -0700 Message-ID: Subject: Re: [PATCH v3 0/9] KVM: Support guest MAXPHYADDR < host MAXPHYADDR To: Paolo Bonzini Cc: Mohammed Gamal , kvm list , LKML , Vitaly Kuznetsov , Sean Christopherson , Wanpeng Li , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 10, 2020 at 10:16 AM Paolo Bonzini wrote: > > On 10/07/20 19:13, Jim Mattson wrote: > > On Fri, Jul 10, 2020 at 10:06 AM Paolo Bonzini wrote: > >> > >> On 10/07/20 18:30, Jim Mattson wrote: > >>>> > >>>> This can be problem when having a mixed setup of machines with 5-level page > >>>> tables and machines with 4-level page tables, as live migration can change > >>>> MAXPHYADDR while the guest runs, which can theoretically introduce bugs. > >>> > >>> Huh? Changing MAXPHYADDR while the guest runs should be illegal. Or > >>> have I missed some peculiarity of LA57 that makes MAXPHYADDR a dynamic > >>> CPUID information field? > >> > >> Changing _host_ MAXPHYADDR while the guest runs, such as if you migrate > >> from a host-maxphyaddr==46 to a host-maxphyaddr==52 machine (while > >> keeping guest-maxphyaddr==46). > > > > Ah, but what does that have to do with LA57? > > Intel only has MAXPHYADDR > 46 on LA57 machines (because in general OSes > like to have a physical 1:1 map into the kernel part of the virtual > address space, so having a higher MAXPHYADDR would be of limited use > with 48-bit linear addresses). We all know that the direct map is evil. :-) Sorry it took me so long to get there. I didn't realize that Linux was incapable of using more physical memory than it could map into the kernel's virtual address space. (Wasn't that the whole point of PAE originally?)