Previously we clobbered bits 63:8 of RAX when responding to this inb.
This is not technically correct. We now only change the low 8 bits.

Signed-off-by: Gan Shun <[email protected]>
Change-Id: Iacb0c72cbbb0b4dfa229824c19ba4b000177e567
---
 user/vmm/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/user/vmm/io.c b/user/vmm/io.c
index 62766ee..b8fae46 100644
--- a/user/vmm/io.c
+++ b/user/vmm/io.c
@@ -208,7 +208,7 @@ int io(struct guest_thread *vm_thread)
         */
        if (*ip16 == 0x21e4) {
                vm_tf->tf_rip += 2;
-               vm_tf->tf_rax = ~0ULL;
+               vm_tf->tf_rax |= 0x00000ff;
                return 0;
        }
        if (*ip16 == 0xed66) {
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to