1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/******************************************************************************
* 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>
#include <xen/bitmap.h>
#include <asm/hvm/support.h>
s8 __read_mostly 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);
if ( !hvm_port80_allowed )
__set_bit(0x80, hvm_io_bitmap);
return 0;
}
__initcall(check_port80);
|