From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752977AbeCEUhN (ORCPT ); Mon, 5 Mar 2018 15:37:13 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51104 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752507AbeCEUhL (ORCPT ); Mon, 5 Mar 2018 15:37:11 -0500 Subject: Re: [REPOST PATCH] arm/arm64: KVM: Add PSCI version selection API To: Peter Maydell References: <20180215175803.6870-1-marc.zyngier@arm.com> <86o9k63f7a.wl-marc.zyngier@arm.com> <40c74835-da24-485f-14bb-a0c357c7e79b@redhat.com> Cc: Marc Zyngier , lkml - Kernel Mailing List , arm-mail-list , kvmarm@lists.cs.columbia.edu From: Auger Eric Message-ID: Date: Mon, 5 Mar 2018 21:37:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 05/03/18 17:31, Peter Maydell wrote: > On 2 March 2018 at 12:26, Auger Eric wrote: >> Hi Marc, >> On 02/03/18 12:11, Marc Zyngier wrote: >>> On Fri, 02 Mar 2018 10:44:48 +0000, >>> Auger Eric wrote: >>>> I understand the get/set is called as part of the migration process. >>>> So my understanding is the benefit of this series is migration fails in >>>> those cases: >>>> >>>>> =0.2 source -> 0.1 destination >>>> 0.1 source -> >=0.2 destination >>> >>> It also fails in the case where you migrate a 1.0 guest to something >>> that cannot support it. >> >> That's because on the destination, the number of regs is less than on >> source, right? > > I think it fails because the KVM_REG_ARM_PSCI_VERSION register will be > in the migration state but not in the destination's list of registers: > the code in QEMU's target/arm/machine.c:cpu_post_load() function that > checks "register in their list but not ours: fail migration" will > catch this. Thank you for the pointer. Yes at the time I reviewed the patch and just focusing on the kernel code, this was not immediate to me. > > That also means that we will fail migration from a new kernel where > we've specifically asked for PSCI 0.2 to an old PSCI-0.2-only kernel > (because the KVM_REG_ARM_PSCI_VERSION reg will appear in the migration > stream even if its value is the one value that matches the old kernel > behaviour). I don't know if we care about that. Do you know when are we likely to force PSCI 0.2 on a new kernel? At which layer is the decision supposed to be made and on which criteria? Thanks Eric > > thanks > -- PMM > From mboxrd@z Thu Jan 1 00:00:00 1970 From: eric.auger@redhat.com (Auger Eric) Date: Mon, 5 Mar 2018 21:37:08 +0100 Subject: [REPOST PATCH] arm/arm64: KVM: Add PSCI version selection API In-Reply-To: References: <20180215175803.6870-1-marc.zyngier@arm.com> <86o9k63f7a.wl-marc.zyngier@arm.com> <40c74835-da24-485f-14bb-a0c357c7e79b@redhat.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Peter, On 05/03/18 17:31, Peter Maydell wrote: > On 2 March 2018 at 12:26, Auger Eric wrote: >> Hi Marc, >> On 02/03/18 12:11, Marc Zyngier wrote: >>> On Fri, 02 Mar 2018 10:44:48 +0000, >>> Auger Eric wrote: >>>> I understand the get/set is called as part of the migration process. >>>> So my understanding is the benefit of this series is migration fails in >>>> those cases: >>>> >>>>> =0.2 source -> 0.1 destination >>>> 0.1 source -> >=0.2 destination >>> >>> It also fails in the case where you migrate a 1.0 guest to something >>> that cannot support it. >> >> That's because on the destination, the number of regs is less than on >> source, right? > > I think it fails because the KVM_REG_ARM_PSCI_VERSION register will be > in the migration state but not in the destination's list of registers: > the code in QEMU's target/arm/machine.c:cpu_post_load() function that > checks "register in their list but not ours: fail migration" will > catch this. Thank you for the pointer. Yes at the time I reviewed the patch and just focusing on the kernel code, this was not immediate to me. > > That also means that we will fail migration from a new kernel where > we've specifically asked for PSCI 0.2 to an old PSCI-0.2-only kernel > (because the KVM_REG_ARM_PSCI_VERSION reg will appear in the migration > stream even if its value is the one value that matches the old kernel > behaviour). I don't know if we care about that. Do you know when are we likely to force PSCI 0.2 on a new kernel? At which layer is the decision supposed to be made and on which criteria? Thanks Eric > > thanks > -- PMM >