File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,12 @@ int io_instr_vmexit_handler(struct vcpu *vcpu)
108
108
if ((port >= handler -> desc .addr + handler -> desc .len ) ||
109
109
(port + sz <= handler -> desc .addr ))
110
110
continue ;
111
-
112
- /* Dom0 do not require IO emulation */
113
- if (is_vm0 (vm ))
114
- status = 0 ;
111
+ else if (!((port >= handler -> desc .addr ) && ((port + sz )
112
+ <= (handler -> desc .addr + handler -> desc .len )))) {
113
+ pr_fatal ("Err:IO, port 0x%04x, size=%u spans devices" ,
114
+ port , sz );
115
+ return - EIO ;
116
+ }
115
117
116
118
if (direction == 0 ) {
117
119
if (handler -> desc .io_write == NULL )
@@ -149,14 +151,11 @@ int io_instr_vmexit_handler(struct vcpu *vcpu)
149
151
}
150
152
151
153
if (status != 0 ) {
152
- pr_fatal ("IO %s access to port 0x%04x, size=%u" ,
154
+ pr_fatal ("Err: IO %s access to port 0x%04x, size=%u" ,
153
155
direction ? "read" : "write" , port , sz );
154
156
155
157
}
156
158
157
- /* Catch any problems */
158
- ASSERT (status == 0 , "Invalid IO access" );
159
-
160
159
return status ;
161
160
}
162
161
You can’t perform that action at this time.
0 commit comments