Received: from eggs.gnu.org ([2001:4830:134:3::10]:53316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFhTH-0004Ok-T9 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 08:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFhTB-0005VG-Vx for qemu-devel@nongnu.org; Wed, 22 Jun 2016 08:41:30 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:34924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFhTB-0005V5-PT for qemu-devel@nongnu.org; Wed, 22 Jun 2016 08:41:25 -0400 Received: by mail-wm0-x232.google.com with SMTP id v199so85872935wmv.0 for ; Wed, 22 Jun 2016 05:41:25 -0700 (PDT) Sender: Paolo Bonzini References: <1466097133-5489-1-git-send-email-dgilbert@redhat.com> <1466097133-5489-5-git-send-email-dgilbert@redhat.com> <20160616202449.GY18662@thinpad.lan.raisama.net> <20160617081505.GA2273@work-vm> <20160617131815.GA18662@thinpad.lan.raisama.net> <20160617151900.GE18662@thinpad.lan.raisama.net> <20160617154905.GH18662@thinpad.lan.raisama.net> <20160621194440.GN17952@thinpad.lan.raisama.net> From: Paolo Bonzini Message-ID: <9b76415a-23e6-3ded-4dbc-42838cc164b0@redhat.com> Date: Wed, 22 Jun 2016 14:41:22 +0200 MIME-Version: 1.0 In-Reply-To: <20160621194440.GN17952@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aarcange@redhat.com, Marcel Apfelbaum , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org On 21/06/2016 21:44, Eduardo Habkost wrote: > The consequences of migrating (or having migration blocked) to a > host with smaller phys-addr-bits sound worse to me than the > consequences of just having guest's phys-addr-bits smaller than > the host's. There is no correct answer. We've been using host phys-addr-bits in RHEL for 6 years and no one has ever reported a bug. Most data centers (the ones that actually use migration) will all have Xeon E5s and above, and pretty much all of them have 46-bits physical address bits since at least Sandy Bridge. That probably helps. Save/restore is usually done on the same machine, which also helps because host phys-addr-bits doesn't change. >From a semantics point of view, using a smaller phys-addr-bits than the host is the worst, because you tell the guest that some bits are must-be-zero, when they're not. Using a larger phys-addr-bits cannot cause malfunctioning, only crashes (and as Gerd said, if you cross your fingers and hope the guest doesn't put anything so high in memory, chances are you'll succeed), and this makes it "safer". I'm not sure which one is more likely to happen. So there's no correct answer, and that's why I think the lesser evil is to go with the time-tested alternative and use host phys-addr-bits as the default, even if it causes weird behavior on migration. If a fixed phys-addr-bits is specified on the destination, it should match the value that was used on the source though. Paolo