From: Aleksandr Bezzubikov <zuban32s@gmail.com>
To: seabios@seabios.org
Cc: marcel@redhat.com, kraxel@redhat.com, kevin@koconnor.net,
lersek@redhat.com, qemu-devel@nongnu.org, konrad.wilk@oracle.com,
mst@redhat.com, Aleksandr Bezzubikov <zuban32s@gmail.com>
Subject: [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure
Date: Sun, 23 Jul 2017 01:11:49 +0300 [thread overview]
Message-ID: <1500761510-1556-4-git-send-email-zuban32s@gmail.com> (raw)
In-Reply-To: <1500761510-1556-1-git-send-email-zuban32s@gmail.com>
On PCI init PCI bridge devices may need some
extra info about bus number to reserve, IO, memory and
prefetchable memory limits. QEMU can provide this
with special vendor-specific PCI capability.
This capability is intended to be used only
for Red Hat PCI bridges, i.e. QEMU cooperation.
Sizes of limits match ones from
PCI Type 1 Configuration Space Header,
number of buses to reserve occupies only 1 byte
since it is the size of Subordinate Bus Number register.
Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
---
src/hw/pci_cap.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 src/hw/pci_cap.h
diff --git a/src/hw/pci_cap.h b/src/hw/pci_cap.h
new file mode 100644
index 0000000..1382b0b
--- /dev/null
+++ b/src/hw/pci_cap.h
@@ -0,0 +1,23 @@
+#ifndef _PCI_CAP_H
+#define _PCI_CAP_H
+
+#include "types.h"
+
+struct vendor_pci_cap {
+ u8 id;
+ u8 next;
+ u8 len;
+};
+
+struct redhat_pci_bridge_cap {
+ struct vendor_pci_cap hdr;
+ u8 bus_res;
+ u32 pref_lim_upper;
+ u16 pref_lim;
+ u16 mem_lim;
+ u16 io_lim_upper;
+ u8 io_lim;
+ u8 padd;
+};
+
+#endif /* _PCI_CAP_H */
--
2.7.4
next prev parent reply other threads:[~2017-07-22 22:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-22 22:11 [Qemu-devel] [RFC PATCH v2 0/4] Allow RedHat PCI bridges reserve more buses than necessary during init Aleksandr Bezzubikov
2017-07-22 22:11 ` [Qemu-devel] [RFC PATCH v2 1/4] pci: refactor pci_find_capapibilty to get bdf as the first argument instead of the whole pci_device Aleksandr Bezzubikov
2017-07-23 16:04 ` Marcel Apfelbaum
2017-07-23 16:24 ` Kevin O'Connor
2017-07-22 22:11 ` [Qemu-devel] [RFC PATCH v2 2/4] pci: add RedHat vendor ID Aleksandr Bezzubikov
2017-07-23 16:05 ` Marcel Apfelbaum
2017-07-22 22:11 ` Aleksandr Bezzubikov [this message]
2017-07-23 2:44 ` [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure Michael S. Tsirkin
2017-07-23 16:12 ` Alexander Bezzubikov
2017-07-23 16:30 ` Kevin O'Connor
2017-07-23 16:47 ` Alexander Bezzubikov
2017-07-22 22:11 ` [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init Aleksandr Bezzubikov
2017-07-23 2:49 ` Michael S. Tsirkin
2017-07-23 16:43 ` Alexander Bezzubikov
2017-07-23 19:44 ` Alexander Bezzubikov
2017-07-24 9:42 ` Gerd Hoffmann
2017-07-24 14:39 ` Alexander Bezzubikov
2017-07-24 14:55 ` Marcel Apfelbaum
2017-07-25 15:46 ` [Qemu-devel] [RFC PATCH v2 0/4] Allow RedHat PCI bridges reserve more buses than necessary during init Laszlo Ersek
2017-07-26 6:48 ` Marcel Apfelbaum
2017-07-26 15:20 ` Laszlo Ersek
2017-07-26 16:22 ` Marcel Apfelbaum
2017-07-26 18:31 ` Laszlo Ersek
2017-07-27 18:18 ` Marcel Apfelbaum
2017-07-26 18:49 ` Michael S. Tsirkin
2017-07-27 18:24 ` Marcel Apfelbaum
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=1500761510-1556-4-git-send-email-zuban32s@gmail.com \
--to=zuban32s@gmail.com \
--cc=kevin@koconnor.net \
--cc=konrad.wilk@oracle.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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).