On 2015-03-19 12:41, Gerd Hoffmann wrote: > On Di, 2015-03-17 at 15:11 +0800, Gonglei wrote: >> On 2015/3/15 20:49, Weidong Huang wrote: >>> Hi ALL: >>> >>> IO port 0x61 is used by pc speaker and NMI reason port. >>> >>> This is ambiguous. How to distinguish in QEMU?
That register is a mess functionality-wise because it serves multiple hardware units that are at least logically separated - legacy. In QEMU, the speaker emulation adopted it as it is the only unit that actually has some functionality behind the bits (see below). >>> >>> I see that NMI reason port is not realized in QEMU. >>> >>> But linux guest will access this port to determine what the NMI reason code >>> means. >>> >>> It will access pc speaker's io port. Is this a bug? >>> >> Gerd, any thoughts? > > Not my area of expertise, but can qemu send NMIs to the guest in the > first place? QEMU doesn't generate the kind of NMI events that would normally be reported via the status bits in port 0x61. Therefore, bits 6 and 7 will always remain unset for now. Jan PS: The port name shown in "info mtree" is wrong. Will send a trivial fix to help identifying the device model behind it. -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux