From: Sean Christopherson <seanjc@google.com>
To: alexjlzheng@gmail.com
Cc: pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Jinliang Zheng <alexjlzheng@tencent.com>
Subject: Re: [PATCH v2] KVM: x86: Fix poll command
Date: Fri, 14 Apr 2023 17:50:16 +0000 [thread overview]
Message-ID: <ZDmSWIEOTYo3qHf7@google.com> (raw)
In-Reply-To: <20230413121112.2563319-1-alexjlzheng@tencent.com>
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.
next prev parent reply other threads:[~2023-04-14 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 12:11 [PATCH v2] KVM: x86: Fix poll command alexjlzheng
2023-04-14 17:50 ` Sean Christopherson [this message]
2023-04-15 3:30 ` alexjlzheng
2023-04-17 16:51 ` Sean Christopherson
2023-04-18 7:59 ` alexjlzheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZDmSWIEOTYo3qHf7@google.com \
--to=seanjc@google.com \
--cc=alexjlzheng@gmail.com \
--cc=alexjlzheng@tencent.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox