From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbcF2MhW (ORCPT ); Wed, 29 Jun 2016 08:37:22 -0400 Received: from smtp.citrix.com ([66.165.176.89]:38138 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978AbcF2MhU (ORCPT ); Wed, 29 Jun 2016 08:37:20 -0400 X-IronPort-AV: E=Sophos;i="5.26,546,1459814400"; d="scan'208";a="363446802" Subject: Re: [PATCH linux 0/8] xen: pvhvm: support bootup on secondary vCPUs To: Vitaly Kuznetsov References: <1467132449-1030-1-git-send-email-vkuznets@redhat.com> <5772B4C2.4010906@citrix.com> <871t3gwe0o.fsf@vitty.brq.redhat.com> CC: , , , Stefano Stabellini , "Boris Ostrovsky" , Juergen Gross , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Julien Grall From: David Vrabel Message-ID: <5773C0DF.3090905@citrix.com> Date: Wed, 29 Jun 2016 13:36:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <871t3gwe0o.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/06/16 10:16, Vitaly Kuznetsov wrote: > David Vrabel writes: > >> On 28/06/16 17:47, Vitaly Kuznetsov wrote: >>> It may happen that Xen's and Linux's ideas of vCPU id diverge. In >>> particular, when we crash on a secondary vCPU we may want to do kdump >>> and unlike plain kexec where we do migrate_to_reboot_cpu() we try booting >>> on the vCPU which crashed. This doesn't work very well for PVHVM guests as >>> we have a number of hypercalls where we pass vCPU id as a parameter. These >>> hypercalls either fail or do something unexpected. To solve the issue we >>> need to have a mapping between Linux's and Xen's vCPU ids. >> >> Could the soft-reboot hypercall (optionally) return on vcpu 0? >> > > In theory, yes, I think we can re-arrange vCPUs inside the hypervisor so > Linux will get them in the natural order after soft reset. The series is straight forwards and the concept of the guest having to map its idea of CPU to VCPU is fine, so unless you think a hypervisor based solution is better we can take this series once it's fixed up. David