|
|
Log in / Subscribe / Register

Using the KVM API

Using the KVM API

Posted Oct 4, 2016 2:24 UTC (Tue) by sahil (guest, #100553)
Parent article: Using the KVM API

Why is 0x3f8 chosen for serial port?
Is this related to the guest physical address range, in which we have mapped the memory?


to post comments

Using the KVM API

Posted Oct 4, 2016 4:15 UTC (Tue) by zlynx (guest, #2285) [Link] (3 responses)

As far back as I can remember that was the serial port address. It's historical.

See COM on Wikipedia.

Using the KVM API

Posted Oct 4, 2016 6:28 UTC (Tue) by sahil (guest, #100553) [Link] (2 responses)

I searched the Intel software developer manual, didn't find any reference to it. Seems, to have a purely historical meaning.

Using the KVM API

Posted Oct 4, 2016 7:01 UTC (Tue) by jem (subscriber, #24231) [Link] (1 responses)

> I searched the Intel software developer manual, didn't find any reference to it. Seems, to have a purely historical meaning.

You should search the IBM PC reference manual instead.

Using the KVM API

Posted Oct 4, 2016 16:51 UTC (Tue) by sahil (guest, #100553) [Link]

I initially thought that this number '0x3f8' has a special significance for kvm api, as in, kvm would recognize this address as an memory mapped I/O or some other special address. The truth is that KVM exits due to 'out' opcode, and not because of the address. In the host, we then check the 1st operand of this 'out' opcode matches the value we gave, '0x3f8' in this case. We can have any other number (as long as it is 1 byte long) as operand, thus even 'out 0x4000, al', or 'out 0x0000, al' (intel syntax) would work just fine.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds