|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.19] x86/hvm: fix reading from 0xe9 IO port if port E9 hack is active
commit 5dc4685d1327b273d2cacc63233b4da62932e27c
Author: Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Tue Oct 21 15:27:28 2025 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Oct 21 15:27:28 2025 +0200
x86/hvm: fix reading from 0xe9 IO port if port E9 hack is active
Reading from the E9 port if the emergency console is active should return
0xe9 according to the documentation from Bochs:
https://bochs.sourceforge.io/doc/docbook/user/bochsrc.html
See `port_e9_hack` section description.
Fix Xen so it also returns the port address. OSes can use it to detect
whether the emergency console is available or not.
Fixes: d1bd157fbc9b ("Big merge the HVM full-virtualisation abstractions.")
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
master commit: db5a3c31a650d3fb0945f77f8ceda133412b5ce0
master date: 2025-10-02 18:05:50 +0200
---
xen/arch/x86/hvm/hvm.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index fbca7e4949..7c5a5314ba 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -557,9 +557,15 @@ static int cf_check hvm_print_line(
ASSERT(bytes == 1 && port == XEN_HVM_DEBUGCONS_IOPORT);
- /* Deny any input requests. */
- if ( dir != IOREQ_WRITE )
- return X86EMUL_UNHANDLEABLE;
+ if ( dir == IOREQ_READ )
+ {
+ /*
+ * According to Bochs documentation, reading from the E9 port should
+ * return 0xE9 if the "port E9 hack" is implemented.
+ */
+ *val = XEN_HVM_DEBUGCONS_IOPORT;
+ return X86EMUL_OKAY;
+ }
/* Accept only printable characters, newline, and horizontal tab. */
if ( !isprint(c) && (c != '\n') && (c != '\t') )
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |