From: Paolo Bonzini <pbonzini@redhat.com>
To: Li Qiang <liq3ea@163.com>, Alex Williamson <alex.l.williamson@gmail.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Question about piix3's PIRQC register set
Date: Wed, 5 Dec 2018 22:18:50 +0100 [thread overview]
Message-ID: <bf0be83a-2df7-7ed1-04d3-f457ce97de53@redhat.com> (raw)
In-Reply-To: <5C07EB0A.0934FA.23346@m12-11.163.com>
On 05/12/18 16:13, Li Qiang wrote:
> Here my question when the piix3’s PIRQx route control registers is set
> and by who?
>
> I mean when this ‘‘piix3->dev.config[PIIX_PIRQC + pin];’’ is set?
>
> Once I think this is set by seabios.
Hi,
it's set by the operating system via ACPI. Search for define_link in
SeaBIOS's src/fw/acpi-dsdt.dsl, it refers to fields called PRQ0-PRQ3
which in turn are defined like this:
/* PIIX PCI to ISA irq remapping */
OperationRegion(P40C, PCI_Config, 0x60, 0x04)
...
Field(PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) {
PRQ0, 8,
PRQ1, 8,
PRQ2, 8,
PRQ3, 8
}
Current QEMU doesn't use anymore the SeaBIOS copy of the DSDT, but the
same thing can be found in build_piix4_isa_bridge and
build_piix4_pci0_int, in hw/i386/acpi-build.c.
> But seems it is not as this function is called in vfio_realize, the
> guest dones’t begin.
vfio also calls it (from vfio_intx_update) every time the routing
registers are updated. The ISA bridge calls
pci_bus_fire_intx_routing_notifier, and then that function calls
vfio_intx_update, because it was registered with
pci_device_set_intx_routing_notifier.
Thanks,
Paolo
prev parent reply other threads:[~2018-12-05 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 15:13 [Qemu-devel] Question about piix3's PIRQC register set Li Qiang
2018-12-05 21:18 ` Paolo Bonzini [this message]
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=bf0be83a-2df7-7ed1-04d3-f457ce97de53@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.l.williamson@gmail.com \
--cc=liq3ea@163.com \
--cc=qemu-devel@nongnu.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).