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=-6.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,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 CF050C388F7 for ; Fri, 13 Nov 2020 16:14:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8957E21D1A for ; Fri, 13 Nov 2020 16:14:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TMX5o7V4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgKMQN7 (ORCPT ); Fri, 13 Nov 2020 11:13:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:53108 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbgKMQN7 (ORCPT ); Fri, 13 Nov 2020 11:13:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605284038; 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=lPjThI4CN4zNtchIWv2ayPLPXQ5dzA6VBedvQBJvswQ=; b=TMX5o7V4963uU4O5u8BhV/NKqhYDPjG/FC7GYhWMjutXtxdern6KkK3UxPXP+XM0hhUN4R gZzUr5PcvOZoEV1Xc9hGaoEP1Tdda1BfN14+GYRtCCCRw2r2zHiPnb1PKdmzK3kmeujRvq bnmQ2STGzjXFvbqF40cny31E6ZOIsSA= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-Cv9b3fDrOOeXc54ODDfobA-1; Fri, 13 Nov 2020 11:13:56 -0500 X-MC-Unique: Cv9b3fDrOOeXc54ODDfobA-1 Received: by mail-wr1-f70.google.com with SMTP id h8so4096036wrt.9 for ; Fri, 13 Nov 2020 08:13:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=lPjThI4CN4zNtchIWv2ayPLPXQ5dzA6VBedvQBJvswQ=; b=qDwg8a3luKMmYlJMjXDmSx0W124YsbEXwWwXjEraJxCOUY6Ps3Rq50CVfLmPokK6qU 3IgorySEcnt2CBjmWtCVQQbB4cHE5YqOjb5L/G/LN1SO4+e72D8NSDfBtM7ivuK30fen P8UYh+T/3R8uyNm660j0ke8S/T8uMwGJh7zuZUNnZKuL5OowfOq4PcdFc1FGXD+eiQRi ElPL/QJ+/5RxP4KHL9Gxwa1DEVwnP4xqf8X5vlRTwtKPwO8sEN8BKnIqwVdyRhYjEisc Adj5V2tElh+j53xOkDMwDdp+dIQNFssrFurE+d5Xoeqf4N5PIJgvpRv2+D9fklJpR05u kikg== X-Gm-Message-State: AOAM530/vbsDkoJGC49gHTId5xjMzqTlG94QVD4ZUzSsh9IqJD1OCj/y QO7DV0dJdkYWo6DeazfCgHOcMFOQkoSwiwQEIDu7ZFLBkYCpUBPrMSaF9rIkigv7mpT1ilLGygq Vu8+UNR2m44Lh3UHufSJu7tScChZ+2VIW5Nu+dX/iz3Z62vbwtnTQI/krxfupx6WlX9f6Y7lA+A == X-Received: by 2002:a1c:6508:: with SMTP id z8mr3330867wmb.80.1605284031543; Fri, 13 Nov 2020 08:13:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEiuKnDYBv81x66rrPhoiQlzwCLdD8os2zSbokQH7OHbb6WTSUyo1RRJZXPMJ4FUH64NtzPg== X-Received: by 2002:a1c:6508:: with SMTP id z8mr3330501wmb.80.1605284026289; Fri, 13 Nov 2020 08:13:46 -0800 (PST) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id u6sm10587225wmj.40.2020.11.13.08.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 08:13:45 -0800 (PST) From: Vitaly Kuznetsov To: Wei Liu Cc: Wei Liu , Linux on Hyper-V List , virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Lillian Grassin-Drake , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Arnd Bergmann , "open list:GENERIC INCLUDE/ASM HEADER FILES" Subject: Re: [PATCH v2 09/17] x86/hyperv: provide a bunch of helper functions In-Reply-To: <20201113155111.fcruk7dlsp6ohoq5@liuwe-devbox-debian-v2> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-10-wei.liu@kernel.org> <871rgyy3d1.fsf@vitty.brq.redhat.com> <20201113155111.fcruk7dlsp6ohoq5@liuwe-devbox-debian-v2> Date: Fri, 13 Nov 2020 17:13:44 +0100 Message-ID: <87zh3lutdz.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Wei Liu writes: > On Thu, Nov 12, 2020 at 04:57:46PM +0100, Vitaly Kuznetsov wrote: >> Wei Liu writes: > [...] >> > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h >> > index 67f5d35a73d3..4e590a167160 100644 >> > --- a/arch/x86/include/asm/mshyperv.h >> > +++ b/arch/x86/include/asm/mshyperv.h >> > @@ -80,6 +80,10 @@ extern void __percpu **hyperv_pcpu_output_arg; >> > >> > extern u64 hv_current_partition_id; >> > >> > +int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages); >> > +int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id); >> > +int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags); >> >> You seem to be only doing EXPORT_SYMBOL_GPL() for >> hv_call_deposit_pages() and hv_call_create_vp() but not for >> hv_call_add_logical_proc() - is this intended? Also, I don't see >> hv_call_create_vp()/hv_call_add_logical_proc() usage outside of >> arch/x86/kernel/cpu/mshyperv.c so maybe we don't need to export them at all? >> > > hv_call_deposit_pages and hv_call_create_vp will be needed by /dev/mshv, > which can be built as a module. > I'd suggest to move EXPORT_SYMBOL_GPL() to the series adding '/dev/mshv' then. Dangling exported symbols with no users tend to be removed. No strong opinion, just a suggestion. > hv_call_add_logical_proc is only needed by mshyperv.c and not exported > in the first place. > > This code is fine. Thanks for the confirmation! -- Vitaly 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=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 13D09C55ABD for ; Fri, 13 Nov 2020 16:14:06 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 909DE208D5 for ; Fri, 13 Nov 2020 16:14:05 +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="XIIXLUQ5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 909DE208D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4999887907; Fri, 13 Nov 2020 16:14:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7bEA54vnTqyf; Fri, 13 Nov 2020 16:14:04 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id C807987755; Fri, 13 Nov 2020 16:14:04 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BB537C0891; Fri, 13 Nov 2020 16:14:04 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23764C0800 for ; Fri, 13 Nov 2020 16:14:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1192B87816 for ; Fri, 13 Nov 2020 16:14:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id poZQTNLxTKfX for ; Fri, 13 Nov 2020 16:14:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by hemlock.osuosl.org (Postfix) with ESMTPS id 07E1987755 for ; Fri, 13 Nov 2020 16:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605284042; 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=lPjThI4CN4zNtchIWv2ayPLPXQ5dzA6VBedvQBJvswQ=; b=XIIXLUQ5JM70oiqp/33b/cFXqy8vCEy9+24k1oH3tmwuSht4nJqqsP7jC3Ah4BZvFVjZsg D5SDyaoQSg2o9YU1iKp7iqA9o1N7RiGIiXrm+HqS0w7BF+yRdVffKu2YfALEFf+qmVY/6y ro9g5nkOPYA629Rgcm/OYtV3jw0tAls= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-pKaUzOdFMyScLpnGZcXY9w-1; Fri, 13 Nov 2020 11:14:00 -0500 X-MC-Unique: pKaUzOdFMyScLpnGZcXY9w-1 Received: by mail-wm1-f72.google.com with SMTP id k128so4176862wme.7 for ; Fri, 13 Nov 2020 08:14:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=lPjThI4CN4zNtchIWv2ayPLPXQ5dzA6VBedvQBJvswQ=; b=MQfXEPUxHTgFYKHRUkqYY292+/6KhxCLvCSf5dfFyXtsXKeqf5ARvjdY02EdUnday+ VxnCoEKfXJh0H7GaeWHS+/CDLNo3Rz0EG5Yz//E+hxNxWLZDD6V1Z5LfKBBvHDZHzDhS kKgK8iBAKQT+1JX0F7fn+uoBDkYA5Z55FtO0XtEVcAQ7fIYeAM6XmUYvWB3VewqpZCmb NybmX6LSLRc53YJfZbA9uiNcU6tDstSwF5V1behfnEw0a7gy0pCK9zRNkqFLjeWmJ+9D PRg9Ut898NHVT9jveZXG2V9tTJur3Hf54UVC22VupCbaCrhTb0/GCzeN/Q2ALp6U7BuW ODHg== X-Gm-Message-State: AOAM5336kA6p8QUYgRqcI13wZKfnKOWAoTZU6Ory+y0ey2Q53FIJ9coq kIZtGNNv21x5QBuWEv8eTluy0kUglmeuDBjW8eicCKH9nFqqlvCRFE3qh6WO2D/kzNrFw77fft/ bgFgBI7hvTMYuAWjQ2NZkS7YxL6I6e/6JpshNuDF+yw== X-Received: by 2002:a1c:6508:: with SMTP id z8mr3330865wmb.80.1605284031508; Fri, 13 Nov 2020 08:13:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEiuKnDYBv81x66rrPhoiQlzwCLdD8os2zSbokQH7OHbb6WTSUyo1RRJZXPMJ4FUH64NtzPg== X-Received: by 2002:a1c:6508:: with SMTP id z8mr3330501wmb.80.1605284026289; Fri, 13 Nov 2020 08:13:46 -0800 (PST) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id u6sm10587225wmj.40.2020.11.13.08.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 08:13:45 -0800 (PST) From: Vitaly Kuznetsov To: Wei Liu Subject: Re: [PATCH v2 09/17] x86/hyperv: provide a bunch of helper functions In-Reply-To: <20201113155111.fcruk7dlsp6ohoq5@liuwe-devbox-debian-v2> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-10-wei.liu@kernel.org> <871rgyy3d1.fsf@vitty.brq.redhat.com> <20201113155111.fcruk7dlsp6ohoq5@liuwe-devbox-debian-v2> Date: Fri, 13 Nov 2020 17:13:44 +0100 Message-ID: <87zh3lutdz.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vkuznets@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: "open list:GENERIC INCLUDE/ASM HEADER FILES" , Wei Liu , Stephen Hemminger , Arnd Bergmann , Linux on Hyper-V List , Haiyang Zhang , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , Linux Kernel List , Michael Kelley , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Nuno Das Neves , Borislav Petkov , Sunil Muthuswamy , virtualization@lists.linux-foundation.org, Vineeth Pillai , Lillian Grassin-Drake X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" Wei Liu writes: > On Thu, Nov 12, 2020 at 04:57:46PM +0100, Vitaly Kuznetsov wrote: >> Wei Liu writes: > [...] >> > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h >> > index 67f5d35a73d3..4e590a167160 100644 >> > --- a/arch/x86/include/asm/mshyperv.h >> > +++ b/arch/x86/include/asm/mshyperv.h >> > @@ -80,6 +80,10 @@ extern void __percpu **hyperv_pcpu_output_arg; >> > >> > extern u64 hv_current_partition_id; >> > >> > +int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages); >> > +int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id); >> > +int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags); >> >> You seem to be only doing EXPORT_SYMBOL_GPL() for >> hv_call_deposit_pages() and hv_call_create_vp() but not for >> hv_call_add_logical_proc() - is this intended? Also, I don't see >> hv_call_create_vp()/hv_call_add_logical_proc() usage outside of >> arch/x86/kernel/cpu/mshyperv.c so maybe we don't need to export them at all? >> > > hv_call_deposit_pages and hv_call_create_vp will be needed by /dev/mshv, > which can be built as a module. > I'd suggest to move EXPORT_SYMBOL_GPL() to the series adding '/dev/mshv' then. Dangling exported symbols with no users tend to be removed. No strong opinion, just a suggestion. > hv_call_add_logical_proc is only needed by mshyperv.c and not exported > in the first place. > > This code is fine. Thanks for the confirmation! -- Vitaly _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization