Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp290398pxh; Wed, 10 Nov 2021 01:45:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgMnqLpg1Z+KuwlTFDIAQvPHJFf8+xmT/6c7uMcKbQw1rHaTjC86Ua4K7Y/NTMX+BUIY40 X-Received: by 2002:aa7:dbc1:: with SMTP id v1mr19781372edt.49.1636537530867; Wed, 10 Nov 2021 01:45:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636537530; cv=none; d=google.com; s=arc-20160816; b=sFRHzNs0VRq3QXcxywC8PqR2lkjIjj/DVtuPjaPtpxqk0wK5B3C2vtWOHcw/lBDLm4 Q7To6ZD6v6uIP2lXfkq8L4IUiTalc1Ei4ikA/t+TXjv5n/j2fPYxssrNzs68cox0Vvba pnstWWArG5IlvgehuKILLFnrfu+3OpYj3mIDuIp8LjNi0sBw96CAfV9rD6V8nl/pzkid 1tn86vvWVd6+dWOx2bTqojsZ4WePZmMxm7nCh/n/edVQS2CYHRRE0QLMrwgS282TQlbE 4VZk3LGKSwYsf70sUde1P6RXSBWD95k1sOseVngSnaRaMO0OhBMYdMYXViptBMQ0XRb7 ZP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:subject:cc:to:from:dmarc-filter:sender:dkim-signature; bh=07QO91JxyxAYVQJxcDkyKDoiZGFWNy5xnj8FuOfbkAQ=; b=kVtwm2me7VuQfqjKUlt/DNiNw6RekbIzSUC4m9eFCV+xc/aBKBkbrAU0GW5ZUSsLzx 7eWGwMGQJB712fQp8XG09NC+3zuyVgjNL4wfLWlpxb83adGPdFcTfnxwSvxeX/PiRNvh JLKZpG27iKcgXjJJvsGJaujsqGfLj9oCgsPwkkTdnK6TpsU+uqbRffjVnsKInVi5SQ5X zsRjw/gv6VeEAreSwOSSu1bgElruZZLI29uQdegNv8f9VMX8isGCc/oCm3TxOcl1Q9hI 38U0d91vxSPi/IrIeoLkIAcaQ+AMVzYP+GAR1D6cuXaO9l9ATLmguXzy00/RlP81/uuh Ca5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=YtxxrB3S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx2si36658979edb.203.2021.11.10.01.45.14; Wed, 10 Nov 2021 01:45:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=YtxxrB3S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbhKJJno (ORCPT + 68 others); Wed, 10 Nov 2021 04:43:44 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:54447 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhKJJno (ORCPT ); Wed, 10 Nov 2021 04:43:44 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1636537257; h=Content-Type: MIME-Version: Message-ID: Date: References: Subject: Cc: To: From: Sender; bh=07QO91JxyxAYVQJxcDkyKDoiZGFWNy5xnj8FuOfbkAQ=; b=YtxxrB3SGdoelPAJ1rdlmM8zSsm9GWQaWTX4nEaxmlIpqAWsnf+KCrMy+BYzMRjaM9TLgfU7 X0nnLUjeL/Ybknd9S4h9a+OKEkVHxgWthxJONc4fNh34RmjMlKSZDPsLgRRAgyVJwdvB51rI DRkWVd/QtF4WXEI36loKqpXEqmg= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 618b93920f34c3436a3c4e7d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 10 Nov 2021 09:40:34 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7AC6CC43460; Wed, 10 Nov 2021 09:40:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6F2B1C4338F; Wed, 10 Nov 2021 09:40:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 6F2B1C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Kalle Valo To: Emmanuel Grumbach Cc: Emmanuel Grumbach , linux-wireless Subject: Re: [PATCH v6 2/7] iwlwifi: mei: add the driver to allow cooperation with CSME References: <20210811105541.43426-1-emmanuel.grumbach@intel.com> <20210811105541.43426-2-emmanuel.grumbach@intel.com> <87tuhevbx2.fsf@codeaurora.org> <87lf2of69j.fsf@codeaurora.org> Date: Wed, 10 Nov 2021 11:40:28 +0200 Message-ID: <87pmr8nyb7.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Emmanuel Grumbach writes: >> >> Emmanuel Grumbach writes: >> >> > On Mon, Oct 18, 2021 at 1:58 PM Kalle Valo wrote: >> >> >> >> Emmanuel Grumbach writes: >> >> >> >> > CSME in two words >> >> > ----------------- >> >> > CSME stands for Converged Security and Management Engine. It is >> >> > a CPU on the chipset and runs a dedicated firmware. >> >> > AMT (Active Management Technology) is one of the applications >> >> > that run on that CPU. AMT allows to control the platform remotely. >> >> > Here is a partial list of the use cases: >> >> > * View the screen of the plaform, with keyboard and mouse (KVM) >> >> > * Attach a remote IDE device >> >> > * Have a serial console to the device >> >> > * Query the state of the platform >> >> > * Reset / shut down / boot the platform >> >> >> >> [...] >> >> >> >> > --- a/drivers/net/wireless/intel/iwlwifi/Kconfig >> >> > +++ b/drivers/net/wireless/intel/iwlwifi/Kconfig >> >> > @@ -92,6 +92,23 @@ config IWLWIFI_BCAST_FILTERING >> >> > If unsure, don't enable this option, as some programs might >> >> > expect incoming broadcasts for their normal operations. >> >> > >> >> > +config IWLMEI >> >> > + tristate "Intel Management Engine communication over WLAN" >> >> > + depends on INTEL_MEI >> >> > + depends on PM >> >> > + depends on IWLMVM >> >> > + help >> >> > + Enables the iwlmei kernel module. This allows to communicate with >> >> > + the Intel Management Engine over Wifi. This is supported starting >> >> > + from Tiger Lake platforms and has been tested on 9260 devices only. >> >> > + Enabling this option on a platform that has a different device and >> >> > + has Wireless enabled on AMT can prevent WiFi from working correctly. >> >> >> >> I don't understand the last sentence, please elaborate. Are you saying >> >> that enabling CONFIG_IWLMEI will break wi-fi in some cases? >> > >> > Since we don't support all the devices (yet), and we haven't integrated it >> > with all our devices, then yes, it shouldn't be enabled unless you know >> > exactly what platform this kernel runs on. >> >> So if I'm understanding correctly, enabling CONFIG_IWLMEI will break >> existing iwlwifi setups? Or am I missing something? > > Ok, I'll share more details. > The coexistence between iwlwifi and CSME has never really been taken care > of. CSME is a feature meant for enterprise and those systems typically run > Windows which is why the Windows driver has had this feature for years > but not Linux. > iwlmei will not do anything if you don't have CSME configured to use the > WLAN device. Someone needs to actively configure CSME to use WLAN for > this to happen. Very few systems have this configuration. So in a case when CSME/AMT WLAN (or whatever the feature under discussion is called) is disabled in the BIOS and CONFIG_IWLMEI is enabled in the kernel build, iwlwifi will work as before? This is the most important part for me, we must not break people's network access when they upgrade the kernel. > Now the question is what happens today (without iwlmei) when CSME is > configured to use WLAN compared to what happens with iwlmei, or in other > words, do we have a "regression"? > > Today: there is some mechanism that allows iwlwifi to tell CSME not to touch > the device. This mechanism is not very well tested because only Linux uses it > and the assumption in Linux has almost always been that CSME is not > configured on systems that run Linux. > > with iwlmei: we will be using the same interface as windows towards CSME which > is a well tested interface and we will be able to use the features > that CSME provides > > Why the warning then? The integration with CSME has been done on 9260 > only and not on newer devices. We do have plans to add support for > more devices but the current code doesn't support them. > > What will happen if a user enables iwlmei on a system that has a > post-9260 device and CSME configured to use WLAN? Most probably, it'll > work, but this has not been tested yet I hope you are printing an understandable info message when CSME is enabled so that the situation is easy to notice and debug. > This configuration is far from the default and considered illegal by > Intel at this point I know that a user can always do something stupid, > but he can likewise disable mac80211 and complain that his wifi > doesn't work. A user cannot compile iwlwifi unless mac80211 is enabled and likewise iwlwifi module won't load unless mac80211 is loaded first. So we do have checks for a lot of stuff. > My suggestion is to add a WARNING (or an dev_err print) in iwlwifi if > we detect this situation so that it'll be very easy to catch this > problem in the configuration. Heh, exactly what I was thinking above. > The only way to prevent this situation would be to know what device > the user has from iwlmei in the mei bus enumeration but this is > unfortunately not possible. > > I hope that made things clearer. I know all this is confusing, many > pieces of details that I hoped I wouldn't have to bore you with :) It would have been a lot easier and faster to mention all this in the commit logs from the beginning. Dumping me patches without commit logs and no clear explanation is not really building confidence for me. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches