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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 84D43C43215 for ; Fri, 22 Nov 2019 18:44:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 597132071B for ; Fri, 22 Nov 2019 18:44:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="UXiFlops" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726869AbfKVSoj (ORCPT ); Fri, 22 Nov 2019 13:44:39 -0500 Received: from mail.skyhub.de ([5.9.137.197]:44660 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfKVSoj (ORCPT ); Fri, 22 Nov 2019 13:44:39 -0500 Received: from zn.tnic (p200300EC2F0E9700A48BABEEDD6DAF21.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:9700:a48b:abee:dd6d:af21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E7F6F1EC0D17; Fri, 22 Nov 2019 19:44:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1574448278; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=i2mjzwfhazpfHjoTpwzg4AZKFO47Z387qbpzjhfHyno=; b=UXiFlopsCyXQCA8mhRhahc/KpgFSewAMBSMNZU5wKIV68nkE+nYn+g6K0yoKwZgy/O2IGI /yf6KpvgdPZPjTpj+Yr2aMsB1qgahaoHk9EdW82QCGM1lLfWaaEP2rR6GvHm3u0zTxRR5Y MXys5Wme4dzOQT6/gDkmffRmnxgYriU= Date: Fri, 22 Nov 2019 19:44:35 +0100 From: Borislav Petkov To: Dan Williams Cc: Dave Jiang , "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "vkoul@kernel.org" , "Luck, Tony" , "Lin, Jing" , "Raj, Ashok" , "Kumar, Sanjay K" , "Dey, Megha" , "Pan, Jacob jun" , "Liu, Yi L" , "axboe@kernel.dk" , "akpm@linux-foundation.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "Yu, Fenghua" , "hpa@zytor.com" Subject: Re: [PATCH RFC 01/14] x86/asm: add iosubmit_cmds512() based on movdir64b CPU instruction Message-ID: <20191122184435.GK6289@zn.tnic> References: <157428480574.36836.14057238306923901253.stgit@djiang5-desk3.ch.intel.com> <157428502934.36836.8119026517510193201.stgit@djiang5-desk3.ch.intel.com> <20191120215338.GN2634@zn.tnic> <247008b5-6d33-a51b-0caa-7f1991a94dbd@intel.com> <20191121105913.GB6540@zn.tnic> <20191122085953.GA6289@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 09:20:39AM -0800, Dan Williams wrote: > For those cases the thought would be to have memset512() for case1 and > __iowrite512_copy() for case3. Where memset512() writes a > non-incrementing source to an incrementing destination, and > __iowrite512_copy() copies an incrementing source to an incrementing > destination. Those 2 helpers *would* have fallbacks, but with the > option to use something like cpu_has_write512() to check in advance > whether those routines will fallback, or not. > > That can be a discussion for a future patchset when those users arrive. Oh, sure, of course. My only angle is very simple: if the MOVDIR* et al is only supported on upcoming Intel platforms and looking at the use cases: 1. clear poison/MKTME 3. copy iomem in big chunks I'm going to venture a guess that those two cases are going to be happening only on Intel platforms which already support MODVIR*. So wouldn't really need to do any generic helpers because those use cases are very specific already. Which would make your feature detection a one-time, driver-init time thing anyway... Unless I misunderstand those cases and there really is a use case where the thing would fallback and the fallback would really be for an "unenlightened" platform without that MOVDIR* hw support...? Hmmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette