From patchwork Thu Mar 19 09:56:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miroslav Benes X-Patchwork-Id: 11446977 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CCE092A for ; Thu, 19 Mar 2020 09:57:30 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4301E20722 for ; Thu, 19 Mar 2020 09:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4301E20722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEruO-0007xQ-UH; Thu, 19 Mar 2020 09:56:12 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEruO-0007xH-I8 for xen-devel@lists.xenproject.org; Thu, 19 Mar 2020 09:56:12 +0000 X-Inumbo-ID: dcb4c090-69c7-11ea-bbdb-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id dcb4c090-69c7-11ea-bbdb-12813bfff9fa; Thu, 19 Mar 2020 09:56:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3D1FEAD9A; Thu, 19 Mar 2020 09:56:10 +0000 (UTC) From: Miroslav Benes To: boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, jpoimboe@redhat.com Date: Thu, 19 Mar 2020 10:56:04 +0100 Message-Id: <20200319095606.23627-1-mbenes@suse.cz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 0/2] x86/xen: Make idle tasks reliable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: andrew.cooper3@citrix.com, x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, xen-devel@lists.xenproject.org, Miroslav Benes , jslaby@suse.cz Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The unwinder reports idle tasks' stack on XEN PV as unreliable which complicates things for at least live patching. The two patches in the series try to amend that by using similar approach as non-XEN x86 does. v1->v2: - call instruction used instead of push+jmp - initial_stack used directly There is a thing which makes me slightly uncomfortable. s/jmp/call/ means that, theoretically, the called function could return. GCC then generates not so nice code and there is asm_cpu_bringup_and_idle+0x5/0x1000 symbol last on the stack due to alignment in asm/x86/xen/xen-head.S which could be confusing. Practically it is all fine, because neither xen_start_kernel(), nor cpu_bringup_and_idle() return (there is unbounded loop in cpu_startup_entry() around do_idle()). __noreturn annotation of these functions did not help. So I don't think it is really a problem, but one may wonder. Miroslav Benes (2): x86/xen: Make the boot CPU idle task reliable x86/xen: Make the secondary CPU idle tasks reliable arch/x86/xen/smp_pv.c | 3 ++- arch/x86/xen/xen-head.S | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-)