aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/quirks.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-16 13:52:13 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-16 13:52:13 +0100
commit360f174b3da63282f239c4c6f2a3a07d2a0751d6 (patch)
tree398b5a77ae4158c89da113301f6590b60d793854 /xen/arch/x86/hvm/quirks.c
parent767d7a478a86cb1a77f58bf0686a2df212d5a755 (diff)
downloadxen-360f174b3da63282f239c4c6f2a3a07d2a0751d6.tar.gz
xen-360f174b3da63282f239c4c6f2a3a07d2a0751d6.tar.bz2
xen-360f174b3da63282f239c4c6f2a3a07d2a0751d6.zip
x86/hvm: don't pass through port 0x80 in a few special cases
In a recent commit (99f85a28a78e96d28907fe036e1671a218fee597), KVM disabled the passthrough of this port due to known problems on certain HP laptops (see http://lkml.indiana.edu/hypermail/linux/kernel/0712.3/0872.html and http://lkml.indiana.edu/hypermail/linux/kernel/0801.0/2388.html). For Xen, don't do this globally, but rather based on a DMI black list. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/hvm/quirks.c')
-rw-r--r--xen/arch/x86/hvm/quirks.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/quirks.c b/xen/arch/x86/hvm/quirks.c
new file mode 100644
index 0000000000..a49fa0d284
--- /dev/null
+++ b/xen/arch/x86/hvm/quirks.c
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * x86/hvm/quirks.c
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include <xen/config.h>
+#include <xen/types.h>
+#include <xen/init.h>
+#include <xen/lib.h>
+#include <xen/dmi.h>
+
+int hvm_port80_allowed = -1;
+boolean_param("hvm_port80", hvm_port80_allowed);
+
+static int __init dmi_hvm_deny_port80(/*const*/ struct dmi_system_id *id)
+{
+ printk(XENLOG_WARNING "%s: port 0x80 access %s allowed for HVM guests\n",
+ id->ident, hvm_port80_allowed > 0 ? "forcibly" : "not");
+
+ if ( hvm_port80_allowed < 0 )
+ hvm_port80_allowed = 0;
+
+ return 0;
+}
+
+static int __init check_port80(void)
+{
+ /*
+ * Quirk table for systems that misbehave (lock up, etc.) if port
+ * 0x80 is used:
+ */
+ static struct dmi_system_id __initdata hvm_no_port80_dmi_table[] =
+ {
+ {
+ .callback = dmi_hvm_deny_port80,
+ .ident = "Compaq Presario V6000",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+ DMI_MATCH(DMI_BOARD_NAME, "30B7")
+ }
+ },
+ {
+ .callback = dmi_hvm_deny_port80,
+ .ident = "HP Pavilion dv9000z",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+ DMI_MATCH(DMI_BOARD_NAME, "30B9")
+ }
+ },
+ {
+ .callback = dmi_hvm_deny_port80,
+ .ident = "HP Pavilion dv6000",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+ DMI_MATCH(DMI_BOARD_NAME, "30B8")
+ }
+ },
+ {
+ .callback = dmi_hvm_deny_port80,
+ .ident = "HP Pavilion tx1000",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+ DMI_MATCH(DMI_BOARD_NAME, "30BF")
+ }
+ },
+ {
+ .callback = dmi_hvm_deny_port80,
+ .ident = "Presario F700",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+ DMI_MATCH(DMI_BOARD_NAME, "30D3")
+ }
+ },
+ { }
+ };
+
+ dmi_check_system(hvm_no_port80_dmi_table);
+
+ return 0;
+}
+__initcall(check_port80);