From: Greg Kroah-Hartman Date: Sun, 8 Sep 2024 10:21:59 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v4.19.322~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=22e251cd4fcc70ef27828afad6187c3005b63e9d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: alsa-hda-conexant-add-pincfg-quirk-to-enable-top-speakers-on-sirius-devices.patch alsa-hda-realtek-add-patch-for-internal-mic-in-lenovo-v145.patch alsa-hda-realtek-support-mute-led-on-hp-laptop-14-dq2xxx.patch kvm-svm-don-t-advertise-bus-lock-detect-to-guest-if-svm-support-is-missing.patch kvm-svm-fix-emulation-of-msr-reads-writes-of-msr_fs_base-and-msr_gs_base.patch --- diff --git a/queue-6.6/alsa-hda-conexant-add-pincfg-quirk-to-enable-top-speakers-on-sirius-devices.patch b/queue-6.6/alsa-hda-conexant-add-pincfg-quirk-to-enable-top-speakers-on-sirius-devices.patch new file mode 100644 index 00000000000..279445ef4c6 --- /dev/null +++ b/queue-6.6/alsa-hda-conexant-add-pincfg-quirk-to-enable-top-speakers-on-sirius-devices.patch @@ -0,0 +1,66 @@ +From 4178d78cd7a86510ba68d203f26fc01113c7f126 Mon Sep 17 00:00:00 2001 +From: Christoffer Sandberg +Date: Tue, 27 Aug 2024 12:25:40 +0200 +Subject: ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices + +From: Christoffer Sandberg + +commit 4178d78cd7a86510ba68d203f26fc01113c7f126 upstream. + +The Sirius notebooks have two sets of speakers 0x17 (sides) and +0x1d (top center). The side speakers are active by default but +the top speakers aren't. + +This patch provides a pincfg quirk to activate the top speakers. + +Signed-off-by: Christoffer Sandberg +Signed-off-by: Werner Sembach +Cc: stable@vger.kernel.org +Link: https://patch.msgid.link/20240827102540.9480-1-wse@tuxedocomputers.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_conexant.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -311,6 +311,7 @@ enum { + CXT_FIXUP_HEADSET_MIC, + CXT_FIXUP_HP_MIC_NO_PRESENCE, + CXT_PINCFG_SWS_JS201D, ++ CXT_PINCFG_TOP_SPEAKER, + }; + + /* for hda_fixup_thinkpad_acpi() */ +@@ -978,6 +979,13 @@ static const struct hda_fixup cxt_fixups + .type = HDA_FIXUP_PINS, + .v.pins = cxt_pincfg_sws_js201d, + }, ++ [CXT_PINCFG_TOP_SPEAKER] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x1d, 0x82170111 }, ++ { } ++ }, ++ }, + }; + + static const struct snd_pci_quirk cxt5045_fixups[] = { +@@ -1074,6 +1082,8 @@ static const struct snd_pci_quirk cxt506 + SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), + SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), + SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), ++ SND_PCI_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER), ++ SND_PCI_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER), + {} + }; + +@@ -1093,6 +1103,7 @@ static const struct hda_model_fixup cxt5 + { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" }, + { .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" }, + { .id = CXT_PINCFG_SWS_JS201D, .name = "sws-js201d" }, ++ { .id = CXT_PINCFG_TOP_SPEAKER, .name = "sirius-top-speaker" }, + {} + }; + diff --git a/queue-6.6/alsa-hda-realtek-add-patch-for-internal-mic-in-lenovo-v145.patch b/queue-6.6/alsa-hda-realtek-add-patch-for-internal-mic-in-lenovo-v145.patch new file mode 100644 index 00000000000..bd2e4977d74 --- /dev/null +++ b/queue-6.6/alsa-hda-realtek-add-patch-for-internal-mic-in-lenovo-v145.patch @@ -0,0 +1,61 @@ +From ef27e89e7f3015be2b3c124833fbd6d2e4686561 Mon Sep 17 00:00:00 2001 +From: Terry Cheong +Date: Fri, 30 Aug 2024 04:11:53 +0800 +Subject: ALSA: hda/realtek: add patch for internal mic in Lenovo V145 + +From: Terry Cheong + +commit ef27e89e7f3015be2b3c124833fbd6d2e4686561 upstream. + +Lenovo V145 is having phase inverted dmic but simply applying inverted +dmic fixups does not work. Chaining up verb fixes for ALC283 enables +inverting dmic fixup to work properly. + +Signed-off-by: Terry Cheong +Cc: +Link: https://patch.msgid.link/20240830-lenovo-v145-fixes-v3-1-f7b7265068fa@chromium.org +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7366,6 +7366,7 @@ enum { + ALC236_FIXUP_HP_GPIO_LED, + ALC236_FIXUP_HP_MUTE_LED, + ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, ++ ALC236_FIXUP_LENOVO_INV_DMIC, + ALC298_FIXUP_SAMSUNG_AMP, + ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, + ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, +@@ -8922,6 +8923,12 @@ static const struct hda_fixup alc269_fix + .type = HDA_FIXUP_FUNC, + .v.func = alc236_fixup_hp_mute_led_micmute_vref, + }, ++ [ALC236_FIXUP_LENOVO_INV_DMIC] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc_fixup_inv_dmic, ++ .chained = true, ++ .chain_id = ALC283_FIXUP_INT_MIC, ++ }, + [ALC298_FIXUP_SAMSUNG_AMP] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc298_fixup_samsung_amp, +@@ -10298,6 +10305,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), ++ SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC), + SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), + SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), + SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), +@@ -10546,6 +10554,7 @@ static const struct hda_model_fixup alc2 + {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, + {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, + {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, ++ {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"}, + {} + }; + #define ALC225_STANDARD_PINS \ diff --git a/queue-6.6/alsa-hda-realtek-support-mute-led-on-hp-laptop-14-dq2xxx.patch b/queue-6.6/alsa-hda-realtek-support-mute-led-on-hp-laptop-14-dq2xxx.patch new file mode 100644 index 00000000000..d4fba6b0903 --- /dev/null +++ b/queue-6.6/alsa-hda-realtek-support-mute-led-on-hp-laptop-14-dq2xxx.patch @@ -0,0 +1,30 @@ +From 47a9e8dbb8d4713a9aac7cc6ce3c82dcc94217d8 Mon Sep 17 00:00:00 2001 +From: Maximilien Perreault +Date: Tue, 3 Sep 2024 20:10:13 -0700 +Subject: ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx + +From: Maximilien Perreault + +commit 47a9e8dbb8d4713a9aac7cc6ce3c82dcc94217d8 upstream. + +The mute LED on this HP laptop uses ALC236 and requires a quirk to function. This patch enables the existing quirk for the device. + +Signed-off-by: Maximilien Perreault +Cc: +Link: https://patch.msgid.link/20240904031013.21220-1-maximilienperreault@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9873,6 +9873,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), ++ SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), + SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), diff --git a/queue-6.6/kvm-svm-don-t-advertise-bus-lock-detect-to-guest-if-svm-support-is-missing.patch b/queue-6.6/kvm-svm-don-t-advertise-bus-lock-detect-to-guest-if-svm-support-is-missing.patch new file mode 100644 index 00000000000..c1c30fb76a6 --- /dev/null +++ b/queue-6.6/kvm-svm-don-t-advertise-bus-lock-detect-to-guest-if-svm-support-is-missing.patch @@ -0,0 +1,40 @@ +From 54950bfe2b69cdc06ef753872b5225e54eb73506 Mon Sep 17 00:00:00 2001 +From: Ravi Bangoria +Date: Thu, 8 Aug 2024 06:29:36 +0000 +Subject: KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing + +From: Ravi Bangoria + +commit 54950bfe2b69cdc06ef753872b5225e54eb73506 upstream. + +If host supports Bus Lock Detect, KVM advertises it to guests even if +SVM support is absent. Additionally, guest wouldn't be able to use it +despite guest CPUID bit being set. Fix it by unconditionally clearing +the feature bit in KVM cpu capability. + +Reported-by: Jim Mattson +Closes: https://lore.kernel.org/r/CALMp9eRet6+v8Y1Q-i6mqPm4hUow_kJNhmVHfOV8tMfuSS=tVg@mail.gmail.com +Fixes: 76ea438b4afc ("KVM: X86: Expose bus lock debug exception to guest") +Cc: stable@vger.kernel.org +Signed-off-by: Ravi Bangoria +Reviewed-by: Jim Mattson +Reviewed-by: Tom Lendacky +Link: https://lore.kernel.org/r/20240808062937.1149-4-ravi.bangoria@amd.com +Signed-off-by: Sean Christopherson +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/svm/svm.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/x86/kvm/svm/svm.c ++++ b/arch/x86/kvm/svm/svm.c +@@ -5178,6 +5178,9 @@ static __init void svm_set_cpu_caps(void + + /* CPUID 0x8000001F (SME/SEV features) */ + sev_set_cpu_caps(); ++ ++ /* Don't advertise Bus Lock Detect to guest if SVM support is absent */ ++ kvm_cpu_cap_clear(X86_FEATURE_BUS_LOCK_DETECT); + } + + static __init int svm_hardware_setup(void) diff --git a/queue-6.6/kvm-svm-fix-emulation-of-msr-reads-writes-of-msr_fs_base-and-msr_gs_base.patch b/queue-6.6/kvm-svm-fix-emulation-of-msr-reads-writes-of-msr_fs_base-and-msr_gs_base.patch new file mode 100644 index 00000000000..a6087dd7cda --- /dev/null +++ b/queue-6.6/kvm-svm-fix-emulation-of-msr-reads-writes-of-msr_fs_base-and-msr_gs_base.patch @@ -0,0 +1,52 @@ +From dad1613e0533b380318281c1519e1a3477c2d0d2 Mon Sep 17 00:00:00 2001 +From: Maxim Levitsky +Date: Fri, 2 Aug 2024 18:16:08 +0300 +Subject: KVM: SVM: fix emulation of msr reads/writes of MSR_FS_BASE and MSR_GS_BASE + +From: Maxim Levitsky + +commit dad1613e0533b380318281c1519e1a3477c2d0d2 upstream. + +If these msrs are read by the emulator (e.g due to 'force emulation' prefix), +SVM code currently fails to extract the corresponding segment bases, +and return them to the emulator. + +Fix that. + +Cc: stable@vger.kernel.org +Signed-off-by: Maxim Levitsky +Link: https://lore.kernel.org/r/20240802151608.72896-3-mlevitsk@redhat.com +Signed-off-by: Sean Christopherson +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/svm/svm.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/arch/x86/kvm/svm/svm.c ++++ b/arch/x86/kvm/svm/svm.c +@@ -2869,6 +2869,12 @@ static int svm_get_msr(struct kvm_vcpu * + case MSR_CSTAR: + msr_info->data = svm->vmcb01.ptr->save.cstar; + break; ++ case MSR_GS_BASE: ++ msr_info->data = svm->vmcb01.ptr->save.gs.base; ++ break; ++ case MSR_FS_BASE: ++ msr_info->data = svm->vmcb01.ptr->save.fs.base; ++ break; + case MSR_KERNEL_GS_BASE: + msr_info->data = svm->vmcb01.ptr->save.kernel_gs_base; + break; +@@ -3090,6 +3096,12 @@ static int svm_set_msr(struct kvm_vcpu * + case MSR_CSTAR: + svm->vmcb01.ptr->save.cstar = data; + break; ++ case MSR_GS_BASE: ++ svm->vmcb01.ptr->save.gs.base = data; ++ break; ++ case MSR_FS_BASE: ++ svm->vmcb01.ptr->save.fs.base = data; ++ break; + case MSR_KERNEL_GS_BASE: + svm->vmcb01.ptr->save.kernel_gs_base = data; + break; diff --git a/queue-6.6/series b/queue-6.6/series index aba70794ccf..997973cf308 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -2,3 +2,8 @@ sch-netem-fix-use-after-free-in-netem_dequeue.patch net-microchip-vcap-fix-use-after-free-error-in-kunit-test.patch asoc-dapm-fix-uaf-for-snd_soc_pcm_runtime-object.patch kvm-x86-acquire-kvm-srcu-when-handling-kvm_set_vcpu_events.patch +kvm-svm-fix-emulation-of-msr-reads-writes-of-msr_fs_base-and-msr_gs_base.patch +kvm-svm-don-t-advertise-bus-lock-detect-to-guest-if-svm-support-is-missing.patch +alsa-hda-conexant-add-pincfg-quirk-to-enable-top-speakers-on-sirius-devices.patch +alsa-hda-realtek-add-patch-for-internal-mic-in-lenovo-v145.patch +alsa-hda-realtek-support-mute-led-on-hp-laptop-14-dq2xxx.patch