lkml.org 
[lkml]   [2023]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] KVM: x86: Fix poll command
From
On Thu, Apr 13, 2023, alexjlzheng@gmail.com wrote:
> From: Jinliang Zheng <alexjlzheng@tencent.com>
>
> According to the hardware manual, when the Poll command is issued, the

Please add "8259", i.e. "According to the 8259 hardware manual".

> byte returned by the I/O read is 1 in Bit 7 when there is an interrupt,
> and the highest priority binary code in Bits 2:0. The current pic
> simulation code is not implemented strictly according to the above
> expression.
>
> Fix the implementation of pic_poll_read():
> 1. Set Bit 7 when there is an interrupt
> 2. Return 0 when there is no interrupt

I don't think #2 is justified. The spec says:

The interrupt requests are ordered in priority from 0 through 7 (0 highest).

I.e. the current code enumerates the _lowest_ priority when there is no interrupt,
which seems more correct than reporting the highest priority possible.

\
 
 \ /
  Last update: 2023-04-14 19:50    [W:0.059 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site