summaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-04-04 05:33:54 -0400
committerTakashi Iwai <tiwai@suse.de>2016-04-06 01:46:28 -0400
commit4926c8046549cc3c9689e8050e303c016a0b0cba (patch)
tree476ffe990dc9416f6da3c984d3271c7c52ce98c3 /sound/pci/intel8x0.c
parent44fde3b89ba1e154b3cec7d711703fff53852983 (diff)
ALSA: intel8x0: Drop superfluous VM checks
intel8x0 driver has the inside_vm check for skipping a buggy hardware workaround in the PCM pointer callback in the commit [228cf79376f1: ALSA: intel8x0: Improve performance in virtual environment]. This was originally applied to all devices on known VMs, but the code was switched to use the PCI ID matching for applying to only known devices (KVM and Parallels), in order to avoid applying wrongly to VT-d and other such cases, in the commit [7fb4f392bd27: ALSA: intel8x0: improve virtual environment detection]. Meanwhile, the original VM check was kept even after switching to the PCI ID matching. It was partly because we weren't 100% sure whether we had covered all well, and partly because this would help identifying the issue once when a user of another VM hit the same problem or a regression. Currently the VM check is used only for showing the kernel message that the VM-optimization isn't applied, and the VM check itself doesn't change the actual driver behavior at all. Despite the relatively safe driver behavior, the code caught attention of developers badly and brought many confusion / misunderstanding. Since we've got neither regression nor enhancement report for other VMs for five years long, it's likely safe to drop this superfluous VM check now. The module option is still kept, so if a user still needs to adjust, it can be applied as was. Acked-by: Konstantin Ozerkov <kozerkov@parallels.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r--sound/pci/intel8x0.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 8151318a69a2..9720a30dbfff 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -42,12 +42,6 @@
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#include <asm/cacheflush.h> 43#include <asm/cacheflush.h>
44 44
45#ifdef CONFIG_KVM_GUEST
46#include <linux/kvm_para.h>
47#else
48#define kvm_para_available() (0)
49#endif
50
51MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); 45MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
52MODULE_DESCRIPTION("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455"); 46MODULE_DESCRIPTION("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455");
53MODULE_LICENSE("GPL"); 47MODULE_LICENSE("GPL");
@@ -2972,25 +2966,17 @@ static int snd_intel8x0_inside_vm(struct pci_dev *pci)
2972 goto fini; 2966 goto fini;
2973 } 2967 }
2974 2968
2975 /* detect KVM and Parallels virtual environments */
2976 result = kvm_para_available();
2977#ifdef X86_FEATURE_HYPERVISOR
2978 result = result || boot_cpu_has(X86_FEATURE_HYPERVISOR);
2979#endif
2980 if (!result)
2981 goto fini;
2982
2983 /* check for known (emulated) devices */ 2969 /* check for known (emulated) devices */
2970 result = 0;
2984 if (pci->subsystem_vendor == PCI_SUBVENDOR_ID_REDHAT_QUMRANET && 2971 if (pci->subsystem_vendor == PCI_SUBVENDOR_ID_REDHAT_QUMRANET &&
2985 pci->subsystem_device == PCI_SUBDEVICE_ID_QEMU) { 2972 pci->subsystem_device == PCI_SUBDEVICE_ID_QEMU) {
2986 /* KVM emulated sound, PCI SSID: 1af4:1100 */ 2973 /* KVM emulated sound, PCI SSID: 1af4:1100 */
2987 msg = "enable KVM"; 2974 msg = "enable KVM";
2975 result = 1;
2988 } else if (pci->subsystem_vendor == 0x1ab8) { 2976 } else if (pci->subsystem_vendor == 0x1ab8) {
2989 /* Parallels VM emulated sound, PCI SSID: 1ab8:xxxx */ 2977 /* Parallels VM emulated sound, PCI SSID: 1ab8:xxxx */
2990 msg = "enable Parallels VM"; 2978 msg = "enable Parallels VM";
2991 } else { 2979 result = 1;
2992 msg = "disable (unknown or VT-d) VM";
2993 result = 0;
2994 } 2980 }
2995 2981
2996fini: 2982fini: