--- /dev/null
+From 261846f72d74f9dde2a1621107f0420cc1015629 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 9 Jan 2023 15:11:52 +0200
+Subject: asm-generic/io.h: suppress endianness warnings for readq() and
+ writeq()
+
+From: Vladimir Oltean <vladimir.oltean@nxp.com>
+
+[ Upstream commit d564fa1ff19e893e2971d66e5c8f49dc1cdc8ffc ]
+
+Commit c1d55d50139b ("asm-generic/io.h: Fix sparse warnings on
+big-endian architectures") missed fixing the 64-bit accessors.
+
+Arnd explains in the attached link why the casts are necessary, even if
+__raw_readq() and __raw_writeq() do not take endian-specific types.
+
+Link: https://lore.kernel.org/lkml/9105d6fc-880b-4734-857d-e3d30b87ccf6@app.fastmail.com/
+Suggested-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
+Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/asm-generic/io.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
+index 4c44a29b5e8ef..d78c3056c98f9 100644
+--- a/include/asm-generic/io.h
++++ b/include/asm-generic/io.h
+@@ -236,7 +236,7 @@ static inline u64 readq(const volatile void __iomem *addr)
+
+ log_read_mmio(64, addr, _THIS_IP_, _RET_IP_);
+ __io_br();
+- val = __le64_to_cpu(__raw_readq(addr));
++ val = __le64_to_cpu((__le64 __force)__raw_readq(addr));
+ __io_ar(val);
+ log_post_read_mmio(val, 64, addr, _THIS_IP_, _RET_IP_);
+ return val;
+@@ -287,7 +287,7 @@ static inline void writeq(u64 value, volatile void __iomem *addr)
+ {
+ log_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_);
+ __io_bw();
+- __raw_writeq(__cpu_to_le64(value), addr);
++ __raw_writeq((u64 __force)__cpu_to_le64(value), addr);
+ __io_aw();
+ log_post_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_);
+ }
+--
+2.39.2
+
--- /dev/null
+From 5ce955d82be941fedd778e725cbb73837c836a14 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 9 Jan 2023 15:11:53 +0200
+Subject: asm-generic/io.h: suppress endianness warnings for relaxed accessors
+
+From: Vladimir Oltean <vladimir.oltean@nxp.com>
+
+[ Upstream commit 05d3855b4d21ef3c2df26be1cbba9d2c68915fcb ]
+
+Copy the forced type casts from the normal MMIO accessors to suppress
+the sparse warnings that point out __raw_readl() returns a native endian
+word (just like readl()).
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/asm-generic/io.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
+index d78c3056c98f9..587e7e9b9a375 100644
+--- a/include/asm-generic/io.h
++++ b/include/asm-generic/io.h
+@@ -319,7 +319,7 @@ static inline u16 readw_relaxed(const volatile void __iomem *addr)
+ u16 val;
+
+ log_read_mmio(16, addr, _THIS_IP_, _RET_IP_);
+- val = __le16_to_cpu(__raw_readw(addr));
++ val = __le16_to_cpu((__le16 __force)__raw_readw(addr));
+ log_post_read_mmio(val, 16, addr, _THIS_IP_, _RET_IP_);
+ return val;
+ }
+@@ -332,7 +332,7 @@ static inline u32 readl_relaxed(const volatile void __iomem *addr)
+ u32 val;
+
+ log_read_mmio(32, addr, _THIS_IP_, _RET_IP_);
+- val = __le32_to_cpu(__raw_readl(addr));
++ val = __le32_to_cpu((__le32 __force)__raw_readl(addr));
+ log_post_read_mmio(val, 32, addr, _THIS_IP_, _RET_IP_);
+ return val;
+ }
+@@ -345,7 +345,7 @@ static inline u64 readq_relaxed(const volatile void __iomem *addr)
+ u64 val;
+
+ log_read_mmio(64, addr, _THIS_IP_, _RET_IP_);
+- val = __le64_to_cpu(__raw_readq(addr));
++ val = __le64_to_cpu((__le64 __force)__raw_readq(addr));
+ log_post_read_mmio(val, 64, addr, _THIS_IP_, _RET_IP_);
+ return val;
+ }
+@@ -366,7 +366,7 @@ static inline void writeb_relaxed(u8 value, volatile void __iomem *addr)
+ static inline void writew_relaxed(u16 value, volatile void __iomem *addr)
+ {
+ log_write_mmio(value, 16, addr, _THIS_IP_, _RET_IP_);
+- __raw_writew(cpu_to_le16(value), addr);
++ __raw_writew((u16 __force)cpu_to_le16(value), addr);
+ log_post_write_mmio(value, 16, addr, _THIS_IP_, _RET_IP_);
+ }
+ #endif
+@@ -376,7 +376,7 @@ static inline void writew_relaxed(u16 value, volatile void __iomem *addr)
+ static inline void writel_relaxed(u32 value, volatile void __iomem *addr)
+ {
+ log_write_mmio(value, 32, addr, _THIS_IP_, _RET_IP_);
+- __raw_writel(__cpu_to_le32(value), addr);
++ __raw_writel((u32 __force)__cpu_to_le32(value), addr);
+ log_post_write_mmio(value, 32, addr, _THIS_IP_, _RET_IP_);
+ }
+ #endif
+@@ -386,7 +386,7 @@ static inline void writel_relaxed(u32 value, volatile void __iomem *addr)
+ static inline void writeq_relaxed(u64 value, volatile void __iomem *addr)
+ {
+ log_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_);
+- __raw_writeq(__cpu_to_le64(value), addr);
++ __raw_writeq((u64 __force)__cpu_to_le64(value), addr);
+ log_post_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_);
+ }
+ #endif
+--
+2.39.2
+
--- /dev/null
+From b73925a6ac307fadaf90bbec93920396dc4e5b77 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 17 Mar 2023 00:38:51 +0200
+Subject: ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop
+ 16-e1xxx (8A22)
+
+From: Ge-org Brohammer <gbrohammer@outlook.com>
+
+[ Upstream commit 205efd4619b860404ebb5882e5a119eb3b3b3716 ]
+
+This model requires an additional detection quirk to
+enable the internal microphone.
+
+Tried to use git send-email this time.
+
+Signed-off-by: Ge-org Brohammer <gbrohammer@outlook.com>
+Link: https://lore.kernel.org/r/PAVP195MB2261322C220E95D7F4B2732ADABC9@PAVP195MB2261.EURP195.PROD.OUTLOOK.COM
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
+index 4a69ce702360c..0acdf0156f075 100644
+--- a/sound/soc/amd/yc/acp6x-mach.c
++++ b/sound/soc/amd/yc/acp6x-mach.c
+@@ -269,6 +269,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
+ DMI_MATCH(DMI_BOARD_NAME, "8A43"),
+ }
+ },
++ {
++ .driver_data = &acp6x_card,
++ .matches = {
++ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
++ DMI_MATCH(DMI_BOARD_NAME, "8A22"),
++ }
++ },
+ {}
+ };
+
+--
+2.39.2
+
--- /dev/null
+From a7444ee326b83af7c0fa778e0e0c60c3aead8f13 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 28 Mar 2023 00:03:03 +0000
+Subject: ASoC: da7213.c: add missing pm_runtime_disable()
+
+From: Duy Nguyen <duy.nguyen.rh@renesas.com>
+
+[ Upstream commit 44378cd113e5f15bb0a89f5ac5a0e687b52feb90 ]
+
+da7213.c is missing pm_runtime_disable(), thus we will get
+below error when rmmod -> insmod.
+
+ $ rmmod snd-soc-da7213.ko
+ $ insmod snd-soc-da7213.ko
+ da7213 0-001a: Unbalanced pm_runtime_enable!"
+
+[Kuninori adjusted to latest upstream]
+
+Signed-off-by: Duy Nguyen <duy.nguyen.rh@renesas.com>
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Tested-by: Khanh Le <khanh.le.xr@renesas.com>
+Link: https://lore.kernel.org/r/87mt3xg2tk.wl-kuninori.morimoto.gx@renesas.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/da7213.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
+index 544ccbcfc8844..5678683c71bee 100644
+--- a/sound/soc/codecs/da7213.c
++++ b/sound/soc/codecs/da7213.c
+@@ -1996,6 +1996,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
+ return ret;
+ }
+
++static void da7213_i2c_remove(struct i2c_client *i2c)
++{
++ pm_runtime_disable(&i2c->dev);
++}
++
+ static int __maybe_unused da7213_runtime_suspend(struct device *dev)
+ {
+ struct da7213_priv *da7213 = dev_get_drvdata(dev);
+@@ -2039,6 +2044,7 @@ static struct i2c_driver da7213_i2c_driver = {
+ .pm = &da7213_pm,
+ },
+ .probe_new = da7213_i2c_probe,
++ .remove = da7213_i2c_remove,
+ .id_table = da7213_i2c_id,
+ };
+
+--
+2.39.2
+
--- /dev/null
+From 026b1041a18912ce048cc2a0feda9a8938f82929 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Mar 2023 15:53:32 +0100
+Subject: ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit e38c5e80c3d293a883c6f1d553f2146ec0bda35e ]
+
+The Acer Iconia One 7 B1-750 tablet mostly works fine with the defaults
+for an Bay Trail CR tablet. Except for the internal mic, instead of
+an analog mic on IN3 a digital mic on DMIC1 is uses.
+
+Add a quirk with these settings for this tablet.
+
+Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20230322145332.131525-1-hdegoede@redhat.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
+index 79e0039c79a38..5a12940ef9070 100644
+--- a/sound/soc/intel/boards/bytcr_rt5640.c
++++ b/sound/soc/intel/boards/bytcr_rt5640.c
+@@ -533,6 +533,18 @@ static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream,
+
+ /* Please keep this list alphabetically sorted */
+ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
++ { /* Acer Iconia One 7 B1-750 */
++ .matches = {
++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "VESPA2"),
++ },
++ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
++ BYT_RT5640_JD_SRC_JD1_IN4P |
++ BYT_RT5640_OVCD_TH_1500UA |
++ BYT_RT5640_OVCD_SF_0P75 |
++ BYT_RT5640_SSP0_AIF1 |
++ BYT_RT5640_MCLK_EN),
++ },
+ { /* Acer Iconia Tab 8 W1-810 */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
+--
+2.39.2
+
--- /dev/null
+From a12a06b13eed458cdfeb4500020301ec2b80145c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 Mar 2023 17:05:53 +0800
+Subject: ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Eugene Huang <eugene.huang99@gmail.com>
+
+[ Upstream commit 9c691a42b8926c8966561265cdae3ddc7464d3a2 ]
+
+Same topology as the HP Omen 16-k0005TX, except with the rt1316 amp
+on link2.
+
+Link: https://github.com/thesofproject/linux/issues/4088
+Signed-off-by: Eugene Huang <eugene.huang99@gmail.com>
+Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
+Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
+Link: https://lore.kernel.org/r/20230314090553.498664-3-yung-chuan.liao@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../intel/common/soc-acpi-intel-adl-match.c | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c
+index 28dd2046e4ac5..d8c80041388a7 100644
+--- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c
++++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c
+@@ -354,6 +354,20 @@ static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link3[] = {
+ {}
+ };
+
++static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link2[] = {
++ {
++ .mask = BIT(0),
++ .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
++ .adr_d = rt711_sdca_0_adr,
++ },
++ {
++ .mask = BIT(2),
++ .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
++ .adr_d = rt1316_2_single_adr,
++ },
++ {}
++};
++
+ static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = {
+ {
+ .adr = 0x000223019F837300ull,
+@@ -624,6 +638,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
+ .drv_name = "sof_sdw",
+ .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg",
+ },
++ {
++ .link_mask = 0x5, /* 2 active links required */
++ .links = adl_sdw_rt711_link0_rt1316_link2,
++ .drv_name = "sof_sdw",
++ .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg",
++ },
+ {
+ .link_mask = 0x1, /* link0 required */
+ .links = adl_rvp,
+--
+2.39.2
+
--- /dev/null
+From 06f20eb3472c11b617f54b34756116e8ebeb3684 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 Mar 2023 17:05:52 +0800
+Subject: ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Eugene Huang <eugene.huang99@gmail.com>
+
+[ Upstream commit 3c728b1bc5b99c5275ac5c7788ef814c0e51ef54 ]
+
+Same quirks as the 'Bishop County' NUC M15, except the rt711 is in the
+'JD2 100K' jack detection mode.
+
+Link: https://github.com/thesofproject/linux/issues/4088
+Signed-off-by: Eugene Huang <eugene.huang99@gmail.com>
+Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
+Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
+Link: https://lore.kernel.org/r/20230314090553.498664-2-yung-chuan.liao@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/boards/sof_sdw.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
+index d2ed807abde95..767fa89d08708 100644
+--- a/sound/soc/intel/boards/sof_sdw.c
++++ b/sound/soc/intel/boards/sof_sdw.c
+@@ -213,6 +213,17 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
+ SOF_SDW_PCH_DMIC |
+ RT711_JD1),
+ },
++ {
++ /* NUC15 'Rooks County' LAPRC510 and LAPRC710 skews */
++ .callback = sof_sdw_quirk_cb,
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Intel(R) Client Systems"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"),
++ },
++ .driver_data = (void *)(SOF_SDW_TGL_HDMI |
++ SOF_SDW_PCH_DMIC |
++ RT711_JD2_100K),
++ },
+ /* TigerLake-SDCA devices */
+ {
+ .callback = sof_sdw_quirk_cb,
+--
+2.39.2
+
--- /dev/null
+From 2bd85213825c1368d187af1fe2bf107393e3ce4c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 9 Mar 2023 15:13:37 +0800
+Subject: ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm
+
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+
+[ Upstream commit 083a25b18d6ad9f1f540e629909aa3eaaaf01823 ]
+
+The hw->formats may be set by snd_dmaengine_pcm_refine_runtime_hwparams()
+in component's startup()/open(), but soc_pcm_hw_init() will init
+hw->formats in dpcm_runtime_setup_fe() after component's startup()/open(),
+which causes the valuable hw->formats to be cleared.
+
+So need to store the hw->formats before initialization, then restore
+it after initialization.
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Link: https://lore.kernel.org/r/1678346017-3660-1-git-send-email-shengjiu.wang@nxp.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/soc-pcm.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
+index 579a44d81d9a3..d409b99af75b2 100644
+--- a/sound/soc/soc-pcm.c
++++ b/sound/soc/soc-pcm.c
+@@ -1649,10 +1649,14 @@ static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream)
+ struct snd_pcm_hardware *hw = &runtime->hw;
+ struct snd_soc_dai *dai;
+ int stream = substream->stream;
++ u64 formats = hw->formats;
+ int i;
+
+ soc_pcm_hw_init(hw);
+
++ if (formats)
++ hw->formats &= formats;
++
+ for_each_rtd_cpu_dais(fe, i, dai) {
+ struct snd_soc_pcm_stream *cpu_stream;
+
+--
+2.39.2
+
--- /dev/null
+From 084a0f6b5fea40de37efbd82cfe22c7ed51bce33 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 13 Mar 2023 21:50:29 +0100
+Subject: iio: adc: palmas_gpadc: fix NULL dereference on rmmod
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Patrik Dahlström <risca@dalakolonin.se>
+
+[ Upstream commit 49f76c499d38bf67803438eee88c8300d0f6ce09 ]
+
+Calling dev_to_iio_dev() on a platform device pointer is undefined and
+will make adc NULL.
+
+Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
+Link: https://lore.kernel.org/r/20230313205029.1881745-1-risca@dalakolonin.se
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/iio/adc/palmas_gpadc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
+index fd000345ec5cf..849a697a467e5 100644
+--- a/drivers/iio/adc/palmas_gpadc.c
++++ b/drivers/iio/adc/palmas_gpadc.c
+@@ -639,7 +639,7 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
+
+ static int palmas_gpadc_remove(struct platform_device *pdev)
+ {
+- struct iio_dev *indio_dev = dev_to_iio_dev(&pdev->dev);
++ struct iio_dev *indio_dev = dev_get_drvdata(&pdev->dev);
+ struct palmas_gpadc *adc = iio_priv(indio_dev);
+
+ if (adc->wakeup1_enable || adc->wakeup2_enable)
+--
+2.39.2
+
--- /dev/null
+From 4beaa7c83b2a3ca748dbfbed914ecd7725d3ac8b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 2 Apr 2023 12:44:37 +0100
+Subject: net: sfp: add quirk enabling 2500Base-x for HG MXPD-483II
+
+From: Daniel Golle <daniel@makrotopia.org>
+
+[ Upstream commit ad651d68cee75e9ac20002254c4e5d09ee67a84b ]
+
+The HG MXPD-483II 1310nm SFP module is meant to operate with 2500Base-X,
+however, in their EEPROM they incorrectly specify:
+ Transceiver type : Ethernet: 1000BASE-LX
+ ...
+ BR, Nominal : 2600MBd
+
+Use sfp_quirk_2500basex for this module to allow 2500Base-X mode anyway.
+
+https://forum.banana-pi.org/t/bpi-r3-sfp-module-compatibility/14573/60
+
+Reported-by: chowtom <chowtom@gmail.com>
+Tested-by: chowtom <chowtom@gmail.com>
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/phy/sfp.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
+index b224800d7db0b..10e66c89ca0fe 100644
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -395,6 +395,10 @@ static const struct sfp_quirk sfp_quirks[] = {
+
+ SFP_QUIRK_F("HALNy", "HL-GSFP", sfp_fixup_halny_gsfp),
+
++ // HG MXPD-483II-F 2.5G supports 2500Base-X, but incorrectly reports
++ // 2600MBd in their EERPOM
++ SFP_QUIRK_M("HG GENUINE", "MXPD-483II", sfp_quirk_2500basex),
++
+ // Huawei MA5671A can operate at 2500base-X, but report 1.2GBd NRZ in
+ // their EEPROM
+ SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex,
+--
+2.39.2
+
--- /dev/null
+From ef95900604dd909c9f9282d63a2bb2e43f46d160 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 31 Mar 2023 08:35:15 +0200
+Subject: net: wwan: t7xx: do not compile with -Werror
+
+From: Jiri Slaby (SUSE) <jirislaby@kernel.org>
+
+[ Upstream commit 362f0b6678ad1377c322a7dd237ea6785efc7342 ]
+
+When playing with various compilers or their versions, some choke on
+the t7xx code. For example (with gcc 13):
+ In file included from ./arch/s390/include/generated/asm/rwonce.h:1,
+ from ../include/linux/compiler.h:247,
+ from ../include/linux/build_bug.h:5,
+ from ../include/linux/bits.h:22,
+ from ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:17:
+ In function 'preempt_count',
+ inlined from 't7xx_fsm_append_event' at ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:439:43:
+ ../include/asm-generic/rwonce.h:44:26: error: array subscript 0 is outside array bounds of 'const volatile int[0]' [-Werror=array-bounds=]
+
+There is no reason for any code in the kernel to be built with -Werror
+by default. Note that we have generic CONFIG_WERROR. So if anyone wants
+-Werror, they can enable that.
+
+Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
+Link: https://lore.kernel.org/all/20230330232717.1f8bf5ea@kernel.org/
+Cc: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
+Cc: Intel Corporation <linuxwwan@intel.com>
+Cc: Chiranjeevi Rapolu <chiranjeevi.rapolu@linux.intel.com>
+Cc: Liu Haijun <haijun.liu@mediatek.com>
+Cc: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
+Cc: Ricardo Martinez <ricardo.martinez@linux.intel.com>
+Cc: Loic Poulain <loic.poulain@linaro.org>
+Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com>
+Cc: Johannes Berg <johannes@sipsolutions.net>
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: Eric Dumazet <edumazet@google.com>
+Cc: Jakub Kicinski <kuba@kernel.org>
+Cc: Paolo Abeni <pabeni@redhat.com>
+Cc: netdev@vger.kernel.org
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wwan/t7xx/Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/net/wwan/t7xx/Makefile b/drivers/net/wwan/t7xx/Makefile
+index 268ff9e87e5b3..2652cd00504e6 100644
+--- a/drivers/net/wwan/t7xx/Makefile
++++ b/drivers/net/wwan/t7xx/Makefile
+@@ -1,7 +1,5 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+
+-ccflags-y += -Werror
+-
+ obj-${CONFIG_MTK_T7XX} := mtk_t7xx.o
+ mtk_t7xx-y:= t7xx_pci.o \
+ t7xx_pcie_mac.o \
+--
+2.39.2
+
--- /dev/null
+From dda1d34dfaed7250da2766e88173975751dab41c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 1 Apr 2023 01:24:47 +0200
+Subject: platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle
+ quirk list
+
+From: Benjamin Asbach <asbachb.kernel@impl.it>
+
+[ Upstream commit 9a469c6dfab38326f99f105386db84230be09ee3 ]
+
+From the commit message adding the first s2idle quirks:
+
+> Lenovo laptops that contain NVME SSDs across a variety of generations have
+> trouble resuming from suspend to idle when the IOMMU translation layer is
+> active for the NVME storage device.
+>
+> This generally manifests as a large resume delay or page faults. These
+> delays and page faults occur as a result of a Lenovo BIOS specific SMI
+> that runs during the D3->D0 transition on NVME devices.
+
+Add the DMI ids for another variant of the T14s Gen1, which also needs
+the s2idle quirk.
+
+Link: https://lore.kernel.org/all/20220503183420.348-1-mario.limonciello@amd.com/
+Link: https://bbs.archlinux.org/viewtopic.php?pid=2084655#p2084655
+Signed-off-by: Benjamin Asbach <asbachb.kernel@impl.it>
+Tested-by: Benjamin Asbach <asbachb.kernel@impl.it>
+Link: https://lore.kernel.org/r/20230331232447.37204-1-asbachb.kernel@impl.it
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/thinkpad_acpi.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
+index 32c10457399e4..7191ff2625b1e 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
+@@ -4478,6 +4478,14 @@ static const struct dmi_system_id fwbug_list[] __initconst = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "20UH"),
+ }
+ },
++ {
++ .ident = "T14s Gen1 AMD",
++ .driver_data = &quirk_s2idle_bug,
++ .matches = {
++ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"),
++ }
++ },
+ {
+ .ident = "P14s Gen1 AMD",
+ .driver_data = &quirk_s2idle_bug,
+--
+2.39.2
+
--- /dev/null
+From 13806034e70b14a18a27a5b8eb902ec31e07300b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 31 Mar 2023 17:53:17 +0530
+Subject: scsi: mpi3mr: Handle soft reset in progress fault code (0xF002)
+
+From: Ranjan Kumar <ranjan.kumar@broadcom.com>
+
+[ Upstream commit a3d27dfdcfc27ac3f46de5391bb6d24f04af7941 ]
+
+The driver is exiting from the fault watchdog thread if it sees the 0xF002
+(Soft reset in progress) fault code.
+
+If the driver initiates the soft reset, then the driver restarts the
+watchdog at the end of the soft reset completion. However, if the soft
+reset is initiated by the firmware asynchronously, then the driver will
+never restart the watchdog and never re-initialize the controller after the
+asynchronous soft reset completion.
+
+Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
+Link: https://lore.kernel.org/r/20230331122317.11391-1-ranjan.kumar@broadcom.com
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
+index a565817aa56d4..d109a4ceb72b1 100644
+--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
++++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
+@@ -2526,7 +2526,7 @@ static void mpi3mr_watchdog_work(struct work_struct *work)
+ mrioc->unrecoverable = 1;
+ goto schedule_work;
+ case MPI3_SYSIF_FAULT_CODE_SOFT_RESET_IN_PROGRESS:
+- return;
++ goto schedule_work;
+ case MPI3_SYSIF_FAULT_CODE_CI_ACTIVATION_RESET:
+ reset_reason = MPI3MR_RESET_FROM_CIACTIV_FAULT;
+ break;
+--
+2.39.2
+
--- /dev/null
+From 7042f98503a4f502e76c2926dfe1a5b0f2e88e25 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 24 Mar 2023 09:14:15 +0700
+Subject: selftests mount: Fix mount_setattr_test builds failed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Anh Tuan Phan <tuananhlfc@gmail.com>
+
+[ Upstream commit f1594bc676579133a3cd906d7d27733289edfb86 ]
+
+When compiling selftests with target mount_setattr I encountered some errors with the below messages:
+mount_setattr_test.c: In function ‘mount_setattr_thread’:
+mount_setattr_test.c:343:16: error: variable ‘attr’ has initializer but incomplete type
+ 343 | struct mount_attr attr = {
+ | ^~~~~~~~~~
+
+These errors might be because of linux/mount.h is not included. This patch resolves that issue.
+
+Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
+Acked-by: Christian Brauner <brauner@kernel.org>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/testing/selftests/mount_setattr/mount_setattr_test.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
+index 8c5fea68ae677..969647228817b 100644
+--- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
++++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
+@@ -18,6 +18,7 @@
+ #include <grp.h>
+ #include <stdbool.h>
+ #include <stdarg.h>
++#include <linux/mount.h>
+
+ #include "../kselftest_harness.h"
+
+--
+2.39.2
+
--- /dev/null
+asoc-intel-sof_sdw-add-quirk-for-intel-rooks-county-.patch
+asoc-intel-soc-acpi-add-table-for-intel-rooks-county.patch
+asoc-soc-pcm-fix-hw-formats-cleared-by-soc_pcm_hw_in.patch
+x86-hyperv-block-root-partition-functionality-in-a-c.patch
+asoc-amd-yc-add-dmi-entries-to-support-victus-by-hp-.patch
+iio-adc-palmas_gpadc-fix-null-dereference-on-rmmod.patch
+asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch
+asoc-da7213.c-add-missing-pm_runtime_disable.patch
+net-wwan-t7xx-do-not-compile-with-werror.patch
+wifi-mt76-mt7921-fix-use-after-free-in-fw-features-q.patch
+selftests-mount-fix-mount_setattr_test-builds-failed.patch
+scsi-mpi3mr-handle-soft-reset-in-progress-fault-code.patch
+net-sfp-add-quirk-enabling-2500base-x-for-hg-mxpd-48.patch
+platform-x86-thinkpad_acpi-add-missing-t14s-gen1-typ.patch
+wifi-ath11k-reduce-the-mhi-timeout-to-20s.patch
+tracing-error-if-a-trace-event-has-an-array-for-a-__.patch
+asm-generic-io.h-suppress-endianness-warnings-for-re.patch
+asm-generic-io.h-suppress-endianness-warnings-for-re.patch-28260
+x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch
--- /dev/null
+From 7ff3029fdf9105a2a7cba0470ce4fc1b55e773d8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 9 Mar 2023 22:13:02 -0500
+Subject: tracing: Error if a trace event has an array for a __field()
+
+From: Steven Rostedt (Google) <rostedt@goodmis.org>
+
+[ Upstream commit f82e7ca019dfad3b006fd3b772f7ac569672db55 ]
+
+A __field() in the TRACE_EVENT() macro is used to set up the fields of the
+trace event data. It is for single storage units (word, char, int,
+pointer, etc) and not for complex structures or arrays. Unfortunately,
+there's nothing preventing the build from accepting:
+
+ __field(int, arr[5]);
+
+from building. It will turn into a array value. This use to work fine, as
+the offset and size use to be determined by the macro using the field name,
+but things have changed and the offset and size are now determined by the
+type. So the above would only be size 4, and the next field will be
+located 4 bytes from it (instead of 20).
+
+The proper way to declare static arrays is to use the __array() macro.
+
+Instead of __field(int, arr[5]) it should be __array(int, arr, 5).
+
+Add some macro tricks to the building of a trace event from the
+TRACE_EVENT() macro such that __field(int, arr[5]) will fail to build. A
+comment by the failure will explain why the build failed.
+
+Link: https://lore.kernel.org/lkml/20230306122549.236561-1-douglas.raillard@arm.com/
+Link: https://lore.kernel.org/linux-trace-kernel/20230309221302.642e82d9@gandalf.local.home
+
+Reported-by: Douglas RAILLARD <douglas.raillard@arm.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/trace/stages/stage5_get_offsets.h | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/include/trace/stages/stage5_get_offsets.h b/include/trace/stages/stage5_get_offsets.h
+index ac5c24d3beeb2..e30a13be46ba5 100644
+--- a/include/trace/stages/stage5_get_offsets.h
++++ b/include/trace/stages/stage5_get_offsets.h
+@@ -9,17 +9,30 @@
+ #undef __entry
+ #define __entry entry
+
++/*
++ * Fields should never declare an array: i.e. __field(int, arr[5])
++ * If they do, it will cause issues in parsing and possibly corrupt the
++ * events. To prevent that from happening, test the sizeof() a fictitious
++ * type called "struct _test_no_array_##item" which will fail if "item"
++ * contains array elements (like "arr[5]").
++ *
++ * If you hit this, use __array(int, arr, 5) instead.
++ */
+ #undef __field
+-#define __field(type, item)
++#define __field(type, item) \
++ { (void)sizeof(struct _test_no_array_##item *); }
+
+ #undef __field_ext
+-#define __field_ext(type, item, filter_type)
++#define __field_ext(type, item, filter_type) \
++ { (void)sizeof(struct _test_no_array_##item *); }
+
+ #undef __field_struct
+-#define __field_struct(type, item)
++#define __field_struct(type, item) \
++ { (void)sizeof(struct _test_no_array_##item *); }
+
+ #undef __field_struct_ext
+-#define __field_struct_ext(type, item, filter_type)
++#define __field_struct_ext(type, item, filter_type) \
++ { (void)sizeof(struct _test_no_array_##item *); }
+
+ #undef __array
+ #define __array(type, item, len)
+--
+2.39.2
+
--- /dev/null
+From 37c58ee5089e84d1abacb4a7501980206fa4055f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 29 Mar 2023 19:20:38 +0300
+Subject: wifi: ath11k: reduce the MHI timeout to 20s
+
+From: Kalle Valo <quic_kvalo@quicinc.com>
+
+[ Upstream commit cf5fa3ca0552f1b7ba8490de40700bbfb6979b17 ]
+
+Currently ath11k breaks after hibernation, the reason being that ath11k expects
+that the wireless device will have power during suspend and the firmware will
+continue running. But of course during hibernation the power from the device is
+cut off and firmware is not running when resuming, so ath11k will fail.
+
+(The reason why ath11k needs the firmware running is the interaction between
+mac80211 and MHI stack, it's a long story and more info in the bugzilla report.)
+
+In SUSE kernels the watchdog timeout is reduced from the default 120 to 60 seconds:
+
+CONFIG_DPM_WATCHDOG_TIMEOUT=60
+
+But as the ath11k MHI timeout is 90 seconds the kernel will crash before will
+ath11k will recover in resume callback. To avoid the crash reduce the MHI
+timeout to just 20 seconds.
+
+Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=214649
+Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://lore.kernel.org/r/20230329162038.8637-1-kvalo@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wireless/ath/ath11k/mhi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
+index 86995e8dc9135..a62ee05c54097 100644
+--- a/drivers/net/wireless/ath/ath11k/mhi.c
++++ b/drivers/net/wireless/ath/ath11k/mhi.c
+@@ -16,7 +16,7 @@
+ #include "pci.h"
+ #include "pcic.h"
+
+-#define MHI_TIMEOUT_DEFAULT_MS 90000
++#define MHI_TIMEOUT_DEFAULT_MS 20000
+ #define RDDM_DUMP_SIZE 0x420000
+
+ static struct mhi_channel_config ath11k_mhi_channels_qca6390[] = {
+--
+2.39.2
+
--- /dev/null
+From be5ae23823f4688efbf3e3375e841bd9bc00e912 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Mar 2023 17:37:17 +0100
+Subject: wifi: mt76: mt7921: Fix use-after-free in fw features query.
+
+From: Ben Greear <greearb@candelatech.com>
+
+[ Upstream commit 2ceb76f734e37833824b7fab6af17c999eb48d2b ]
+
+Stop referencing 'features' memory after release_firmware is called.
+
+Fixes this crash:
+
+RIP: 0010:mt7921_check_offload_capability+0x17d
+mt7921_pci_probe+0xca/0x4b0
+...
+
+Signed-off-by: Ben Greear <greearb@candelatech.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Acked-by: Felix Fietkau <nbd@nbd.name>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://lore.kernel.org/r/51fd8f76494348aa9ecbf0abc471ebe47a983dfd.1679502607.git.lorenzo@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wireless/mediatek/mt76/mt7921/init.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+index d4b681d7e1d22..f2c6ec4d8e2ee 100644
+--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
++++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+@@ -162,12 +162,12 @@ mt7921_mac_init_band(struct mt7921_dev *dev, u8 band)
+
+ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
+ {
+- struct mt7921_fw_features *features = NULL;
+ const struct mt76_connac2_fw_trailer *hdr;
+ struct mt7921_realease_info *rel_info;
+ const struct firmware *fw;
+ int ret, i, offset = 0;
+ const u8 *data, *end;
++ u8 offload_caps = 0;
+
+ ret = request_firmware(&fw, fw_wm, dev);
+ if (ret)
+@@ -199,7 +199,10 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
+ data += sizeof(*rel_info);
+
+ if (rel_info->tag == MT7921_FW_TAG_FEATURE) {
++ struct mt7921_fw_features *features;
++
+ features = (struct mt7921_fw_features *)data;
++ offload_caps = features->data;
+ break;
+ }
+
+@@ -209,7 +212,7 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
+ out:
+ release_firmware(fw);
+
+- return features ? features->data : 0;
++ return offload_caps;
+ }
+ EXPORT_SYMBOL_GPL(mt7921_check_offload_capability);
+
+--
+2.39.2
+
--- /dev/null
+From b78b231a66d317374778e6f3569d703fb75d9902 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 4 Apr 2023 10:46:41 -0700
+Subject: x86/cpu: Add model number for Intel Arrow Lake processor
+
+From: Tony Luck <tony.luck@intel.com>
+
+[ Upstream commit 81515ecf155a38f3532bf5ddef88d651898df6be ]
+
+Successor to Lunar Lake.
+
+Signed-off-by: Tony Luck <tony.luck@intel.com>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Link: https://lore.kernel.org/r/20230404174641.426593-1-tony.luck@intel.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/include/asm/intel-family.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
+index cbaf174d8efd9..b3af2d45bbbb5 100644
+--- a/arch/x86/include/asm/intel-family.h
++++ b/arch/x86/include/asm/intel-family.h
+@@ -125,6 +125,8 @@
+
+ #define INTEL_FAM6_LUNARLAKE_M 0xBD
+
++#define INTEL_FAM6_ARROWLAKE 0xC6
++
+ /* "Small Core" Processors (Atom/E-Core) */
+
+ #define INTEL_FAM6_ATOM_BONNELL 0x1C /* Diamondville, Pineview */
+--
+2.39.2
+
--- /dev/null
+From c7a5135ca7407e98b0d8a24815f434da300bb5ad Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 15 Mar 2023 08:34:13 -0700
+Subject: x86/hyperv: Block root partition functionality in a Confidential VM
+
+From: Michael Kelley <mikelley@microsoft.com>
+
+[ Upstream commit f8acb24aaf89fc46cd953229462ea8abe31b395f ]
+
+Hyper-V should never specify a VM that is a Confidential VM and also
+running in the root partition. Nonetheless, explicitly block such a
+combination to guard against a compromised Hyper-V maliciously trying to
+exploit root partition functionality in a Confidential VM to expose
+Confidential VM secrets. No known bug is being fixed, but the attack
+surface for Confidential VMs on Hyper-V is reduced.
+
+Signed-off-by: Michael Kelley <mikelley@microsoft.com>
+Link: https://lore.kernel.org/r/1678894453-95392-1-git-send-email-mikelley@microsoft.com
+Signed-off-by: Wei Liu <wei.liu@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/kernel/cpu/mshyperv.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
+index 46668e2554210..1ce228dc267ae 100644
+--- a/arch/x86/kernel/cpu/mshyperv.c
++++ b/arch/x86/kernel/cpu/mshyperv.c
+@@ -291,12 +291,16 @@ static void __init ms_hyperv_init_platform(void)
+ * To mirror what Windows does we should extract CPU management
+ * features and use the ReservedIdentityBit to detect if Linux is the
+ * root partition. But that requires negotiating CPU management
+- * interface (a process to be finalized).
++ * interface (a process to be finalized). For now, use the privilege
++ * flag as the indicator for running as root.
+ *
+- * For now, use the privilege flag as the indicator for running as
+- * root.
++ * Hyper-V should never specify running as root and as a Confidential
++ * VM. But to protect against a compromised/malicious Hyper-V trying
++ * to exploit root behavior to expose Confidential VM memory, ignore
++ * the root partition setting if also a Confidential VM.
+ */
+- if (cpuid_ebx(HYPERV_CPUID_FEATURES) & HV_CPU_MANAGEMENT) {
++ if ((ms_hyperv.priv_high & HV_CPU_MANAGEMENT) &&
++ !(ms_hyperv.priv_high & HV_ISOLATION)) {
+ hv_root_partition = true;
+ pr_info("Hyper-V: running as root partition\n");
+ }
+--
+2.39.2
+