From: Takashi Iwai <tiwai@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Konstantin Ozerkov <kozerkov@parallels.com>,
"Denis V. Lunev" <den@openvz.org>,
Jaroslav Kysela <perex@perex.cz>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
alsa-devel@alsa-project.org
Subject: Re: snd_intel8x0_inside_vm()
Date: Wed, 19 Feb 2014 08:09:29 +0100 [thread overview]
Message-ID: <s5hwqgry3x2.wl%tiwai@suse.de> (raw)
In-Reply-To: <5304297B.8050201@zytor.com>
At Tue, 18 Feb 2014 19:48:11 -0800,
H. Peter Anvin wrote:
>
> I just stumbled upon the function snd_intel8x0_inside_vm(), and quite
> frankly the code seems bizarre:
>
> /* detect KVM and Parallels virtual environments */
> result = kvm_para_available();
> #ifdef X86_FEATURE_HYPERVISOR
> result = result || boot_cpu_has(X86_FEATURE_HYPERVISOR);
> #endif
> if (!result)
> goto fini;
>
> Why don't we simply rely on the PCI SSIDs?
The original code checking kvm_para_available() and boot_cpu_has() was
supposed to work for also VirtualBox and VMware. The PCI SSID checks
have been introduced later, and looking at the code again, this might
have broken VirtualBox and VMware workaround. Hmm.
Besides that, the kvm_para_available() and boot_cpu_has() checks are
still left for avoiding unnecessary kernel message (enable/disable VM
workaround) on non-VM kernels.
Takashi
prev parent reply other threads:[~2014-02-19 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 3:48 snd_intel8x0_inside_vm() H. Peter Anvin
2014-02-19 7:09 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hwqgry3x2.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=den@openvz.org \
--cc=hpa@zytor.com \
--cc=kozerkov@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®