qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Eduardo Habkost <eduardo@habkost.net>,
	Bernhard Beschow <shentey@gmail.com>
Subject: [PATCH 0/2] Fix PIC interrupt handling of x86 CPUs if APIC is globally disabled
Date: Wed,  3 Jan 2024 09:48:58 +0100	[thread overview]
Message-ID: <20240103084900.22856-1-shentey@gmail.com> (raw)

This two-patch series is part of my work emulating the VIA Apollo Pro 133T
chipset in QEMU [1] and testing it by running real-world BIOSes on it. The first
patch fixes an issue regarding PIC interrupt handling, the second one just fixes
a typo in a comment.

During testing, I've found that the boot process gets stuck for some BIOSes that
disable the LAPIC globally (by disabling the enable bit in the base address
register). QEMU seems to emulate PIC interrupt handling only if a CPU doesn't
have a LAPIC, and always emulates LAPIC interrupt handling if one is present.
According to the Intel documentation, a CPU should resort to PIC interrupt
handling if its LAPIC is globally didabled. This series fixes this corner case
which makes the boot process succeed. More details can be found in the commit
message.

Testing done:
* `make check`
* `make check-avocado`

[1] https://github.com/shentok/qemu/tree/via-apollo-pro-133t

Bernhard Beschow (2):
  hw/i386/x86: Fix PIC interrupt handling if APIC globally disabled
  target/i386/cpu: Fix small typo in comment

 hw/i386/x86.c     | 10 +++++-----
 target/i386/cpu.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.43.0



             reply	other threads:[~2024-01-03  8:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  8:48 Bernhard Beschow [this message]
2024-01-03  8:48 ` [PATCH 1/2] hw/i386/x86: Fix PIC interrupt handling if APIC globally disabled Bernhard Beschow
2024-01-03  9:12   ` Alex Bennée
2024-01-03 17:36     ` Bernhard Beschow
2024-01-03  8:49 ` [PATCH 2/2] target/i386/cpu: Fix small typo in comment Bernhard Beschow
2024-01-03  9:07   ` Alex Bennée

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=20240103084900.22856-1-shentey@gmail.com \
    --to=shentey@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).