From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B4F0C433E0 for ; Wed, 1 Jul 2020 07:47:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E9A220722 for ; Wed, 1 Jul 2020 07:47:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QVzKMrrX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728303AbgGAHrN (ORCPT ); Wed, 1 Jul 2020 03:47:13 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52311 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728210AbgGAHrN (ORCPT ); Wed, 1 Jul 2020 03:47:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593589631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=k0tbbv2fepFy6ZwkJj/rSA//He2y/6egv4GB/rgFFdc=; b=QVzKMrrXm/Fb3CAFPguJZw066pnKM6uTaU1spuyiGoRn7K3Vn0yuPEZfzDmEWj1PIGPRPx T+myXSIKHY101PKeqNf9p7mqyn9gOnrDVjtgLdmlP5vHmXOGaW1pMebdZJXPrdJPklNGLF chFN2e+ozVSNALyTDuCQlKUtsmyxEgY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-EYag6ONJPzizDK3-Oe3Y8g-1; Wed, 01 Jul 2020 03:47:09 -0400 X-MC-Unique: EYag6ONJPzizDK3-Oe3Y8g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EAE60107ACCA; Wed, 1 Jul 2020 07:47:07 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-207.pek2.redhat.com [10.72.12.207]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1E93B3A7E; Wed, 1 Jul 2020 07:47:02 +0000 (UTC) Date: Wed, 1 Jul 2020 15:46:59 +0800 From: Dave Young To: Hari Bathini Cc: Petr Tesarik , Thiago Jung Bauermann , Pingfan Liu , Kexec-ml , Mahesh J Salgaonkar , Mimi Zohar , lkml , linuxppc-dev , Sourabh Jain , Andrew Morton , Vivek Goyal , Eric Biederman Subject: Re: [PATCH 01/11] kexec_file: allow archs to handle special regions while locating memory hole Message-ID: <20200701074659.GA3878@dhcp-128-65.nay.redhat.com> References: <159319825403.16351.7253978047621755765.stgit@hbathini.in.ibm.com> <159319828304.16351.6990340111766605842.stgit@hbathini.in.ibm.com> <20200629133933.0787f562@ezekiel.suse.cz> <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/29/20 at 05:26pm, Hari Bathini wrote: > Hi Petr, > > On 29/06/20 5:09 pm, Petr Tesarik wrote: > > Hi Hari, > > > > is there any good reason to add two more functions with a very similar > > name to an existing function? AFAICS all you need is a way to call a > > PPC64-specific function from within kexec_add_buffer (PATCH 4/11), so > > you could add something like this: > > > > int __weak arch_kexec_locate_mem_hole(struct kexec_buf *kbuf) > > { > > return 0; > > } > > > > Call this function from kexec_add_buffer where appropriate and then > > override it for PPC64 (it roughly corresponds to your > > kexec_locate_mem_hole_ppc64() from PATCH 4/11). > > > > FWIW it would make it easier for me to follow the resulting code. > > Right, Petr. > > I was trying out a few things before I ended up with what I sent here. > Bu yeah.. I did realize arch_kexec_locate_mem_hole() would have been better > after sending out v1. Will take care of that in v2. Another way is use arch private function to locate mem hole, then set kbuf->mem, and then call kexec_add_buf, it will skip the common locate hole function. But other than that I have some confusion about those excluded ranges. Replied a question to patch 4. Thanks Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D33CC433E0 for ; Wed, 1 Jul 2020 07:54:28 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 D4CB42074D for ; Wed, 1 Jul 2020 07:54:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QVzKMrrX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4CB42074D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49xYQn5hmlzDqsW for ; Wed, 1 Jul 2020 17:54:25 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49xYGW3TgRzDqg8 for ; Wed, 1 Jul 2020 17:47:15 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QVzKMrrX; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by bilbo.ozlabs.org (Postfix) with ESMTP id 49xYGV72bMz8tX8 for ; Wed, 1 Jul 2020 17:47:14 +1000 (AEST) Received: by ozlabs.org (Postfix) id 49xYGV6NCsz9sTY; Wed, 1 Jul 2020 17:47:14 +1000 (AEST) Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=207.211.31.81; helo=us-smtp-delivery-1.mimecast.com; envelope-from=dyoung@redhat.com; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QVzKMrrX; dkim-atps=neutral Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49xYGV2K4fz9sTT for ; Wed, 1 Jul 2020 17:47:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593589631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=k0tbbv2fepFy6ZwkJj/rSA//He2y/6egv4GB/rgFFdc=; b=QVzKMrrXm/Fb3CAFPguJZw066pnKM6uTaU1spuyiGoRn7K3Vn0yuPEZfzDmEWj1PIGPRPx T+myXSIKHY101PKeqNf9p7mqyn9gOnrDVjtgLdmlP5vHmXOGaW1pMebdZJXPrdJPklNGLF chFN2e+ozVSNALyTDuCQlKUtsmyxEgY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-EYag6ONJPzizDK3-Oe3Y8g-1; Wed, 01 Jul 2020 03:47:09 -0400 X-MC-Unique: EYag6ONJPzizDK3-Oe3Y8g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EAE60107ACCA; Wed, 1 Jul 2020 07:47:07 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-207.pek2.redhat.com [10.72.12.207]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1E93B3A7E; Wed, 1 Jul 2020 07:47:02 +0000 (UTC) Date: Wed, 1 Jul 2020 15:46:59 +0800 From: Dave Young To: Hari Bathini Subject: Re: [PATCH 01/11] kexec_file: allow archs to handle special regions while locating memory hole Message-ID: <20200701074659.GA3878@dhcp-128-65.nay.redhat.com> References: <159319825403.16351.7253978047621755765.stgit@hbathini.in.ibm.com> <159319828304.16351.6990340111766605842.stgit@hbathini.in.ibm.com> <20200629133933.0787f562@ezekiel.suse.cz> <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pingfan Liu , Petr Tesarik , Kexec-ml , Mahesh J Salgaonkar , Mimi Zohar , lkml , linuxppc-dev , Sourabh Jain , Vivek Goyal , Andrew Morton , Thiago Jung Bauermann , Eric Biederman Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 06/29/20 at 05:26pm, Hari Bathini wrote: > Hi Petr, > > On 29/06/20 5:09 pm, Petr Tesarik wrote: > > Hi Hari, > > > > is there any good reason to add two more functions with a very similar > > name to an existing function? AFAICS all you need is a way to call a > > PPC64-specific function from within kexec_add_buffer (PATCH 4/11), so > > you could add something like this: > > > > int __weak arch_kexec_locate_mem_hole(struct kexec_buf *kbuf) > > { > > return 0; > > } > > > > Call this function from kexec_add_buffer where appropriate and then > > override it for PPC64 (it roughly corresponds to your > > kexec_locate_mem_hole_ppc64() from PATCH 4/11). > > > > FWIW it would make it easier for me to follow the resulting code. > > Right, Petr. > > I was trying out a few things before I ended up with what I sent here. > Bu yeah.. I did realize arch_kexec_locate_mem_hole() would have been better > after sending out v1. Will take care of that in v2. Another way is use arch private function to locate mem hole, then set kbuf->mem, and then call kexec_add_buf, it will skip the common locate hole function. But other than that I have some confusion about those excluded ranges. Replied a question to patch 4. Thanks Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqXSc-00013M-Fy for kexec@lists.infradead.org; Wed, 01 Jul 2020 07:47:15 +0000 Date: Wed, 1 Jul 2020 15:46:59 +0800 From: Dave Young Subject: Re: [PATCH 01/11] kexec_file: allow archs to handle special regions while locating memory hole Message-ID: <20200701074659.GA3878@dhcp-128-65.nay.redhat.com> References: <159319825403.16351.7253978047621755765.stgit@hbathini.in.ibm.com> <159319828304.16351.6990340111766605842.stgit@hbathini.in.ibm.com> <20200629133933.0787f562@ezekiel.suse.cz> <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7981ae61-26c6-000c-9ee4-382dab3eecab@linux.ibm.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Hari Bathini Cc: Pingfan Liu , Petr Tesarik , Kexec-ml , Mahesh J Salgaonkar , Mimi Zohar , lkml , linuxppc-dev , Sourabh Jain , Vivek Goyal , Andrew Morton , Thiago Jung Bauermann , Eric Biederman On 06/29/20 at 05:26pm, Hari Bathini wrote: > Hi Petr, > > On 29/06/20 5:09 pm, Petr Tesarik wrote: > > Hi Hari, > > > > is there any good reason to add two more functions with a very similar > > name to an existing function? AFAICS all you need is a way to call a > > PPC64-specific function from within kexec_add_buffer (PATCH 4/11), so > > you could add something like this: > > > > int __weak arch_kexec_locate_mem_hole(struct kexec_buf *kbuf) > > { > > return 0; > > } > > > > Call this function from kexec_add_buffer where appropriate and then > > override it for PPC64 (it roughly corresponds to your > > kexec_locate_mem_hole_ppc64() from PATCH 4/11). > > > > FWIW it would make it easier for me to follow the resulting code. > > Right, Petr. > > I was trying out a few things before I ended up with what I sent here. > Bu yeah.. I did realize arch_kexec_locate_mem_hole() would have been better > after sending out v1. Will take care of that in v2. Another way is use arch private function to locate mem hole, then set kbuf->mem, and then call kexec_add_buf, it will skip the common locate hole function. But other than that I have some confusion about those excluded ranges. Replied a question to patch 4. Thanks Dave _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec