From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [PATCH v12 08/28] target/i386: add Secure Encrypted Virtulization (SEV) object Date: Tue, 13 Mar 2018 15:49:50 -0300 Message-ID: <20180313184950.GB3417@localhost.localdomain> References: <20180308124901.83533-1-brijesh.singh@amd.com> <20180308124901.83533-9-brijesh.singh@amd.com> <20180308164910.GF4718@redhat.com> <20180308224412.GF3417@localhost.localdomain> <8cf2f9bc-0339-1c80-b53b-ef5915248d1f@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Edgar E. Iglesias" , Peter Maydell , Borislav Petkov , Brijesh Singh , kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , Alistair Francis , Peter Crosthwaite , Richard Henderson , qemu-devel@nongnu.org, Alexander Graf , Christian Borntraeger , "Dr. David Alan Gilbert" , Marcel Apfelbaum , Thomas Lendacky , Bruce Rogers , Cornelia Huck , Markus Armbruster , Richard Henderson To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <8cf2f9bc-0339-1c80-b53b-ef5915248d1f@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On Tue, Mar 13, 2018 at 09:42:51AM +0100, Paolo Bonzini wrote: > On 08/03/2018 23:44, Eduardo Habkost wrote: > >> I think doing so will be an issue for the migration. Consider your above > >> use case, a SEV guest is running on EPYC with cbitpos=47 and if we > >> migrate to some $NEXT AMD CPU which uses need to use cbitpos=48 and we > >> will fail to resume the guest on destination after migrating. > > > > Exactly, in other words these two options are part of the guest > > ABI, and QEMU promises to never make the guest ABI depend on the > > host hardware unless you're using "-cpu host". > > This is not entirely true; while MAXPHYADDR is constant downstream > unless using "-cpu host", in practice that behavior is wrong and a guest > could misbehave if passed a MAXPHYADDR that is different from the host's. > > I think this is the same, and management software will have to live with it. > I think they are very far from being equivalent. In practice guests don't seem to mind if we don't perfectly emulate behavior that depend on MAXPHYADDR, and live-migration between hosts with different MAXPHYADDR works. But if you tell the guest the wrong C-bit location, guests are likely to rely on it and break. Migration between hosts with different C-bit locations won't work, will it? -- Eduardo