From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/4] bochs-display: add pcie support
Date: Thu, 17 May 2018 11:25:13 +0200 [thread overview]
Message-ID: <20180517092513.735-5-kraxel@redhat.com> (raw)
In-Reply-To: <20180517092513.735-1-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/bochs-display.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index 9ea6f798f4..23dbf57b8f 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -254,6 +254,7 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp)
{
BochsDisplayState *s = BOCHS_DISPLAY(dev);
Object *obj = OBJECT(dev);
+ int ret;
s->con = graphic_console_init(DEVICE(dev), 0, &bochs_display_gfx_ops, s);
@@ -280,6 +281,12 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp)
pci_register_bar(&s->pci, 0, PCI_BASE_ADDRESS_MEM_PREFETCH, &s->vram);
pci_register_bar(&s->pci, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->mmio);
+ if (pci_bus_is_express(pci_get_bus(dev))) {
+ dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
+ ret = pcie_endpoint_cap_init(dev, 0x80);
+ assert(ret > 0);
+ }
+
memory_region_set_log(&s->vram, true, DIRTY_MEMORY_VGA);
}
@@ -341,6 +348,7 @@ static const TypeInfo bochs_display_type_info = {
.instance_init = bochs_display_init,
.class_init = bochs_display_class_init,
.interfaces = (InterfaceInfo[]) {
+ { INTERFACE_PCIE_DEVICE },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
},
--
2.9.3
next prev parent reply other threads:[~2018-05-17 9:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 9:25 [Qemu-devel] [PATCH 0/4] display: add new bochs-display device Gerd Hoffmann
2018-05-17 9:25 ` [Qemu-devel] [PATCH 1/4] vga: move bochs vbe defines to header file Gerd Hoffmann
2018-05-17 15:20 ` Philippe Mathieu-Daudé
2018-05-18 8:12 ` Gerd Hoffmann
2018-05-18 13:12 ` Marc-André Lureau
2018-05-22 9:24 ` Gerd Hoffmann
2018-05-17 9:25 ` [Qemu-devel] [PATCH 2/4] display: add new bochs-display device Gerd Hoffmann
2018-05-18 15:01 ` Marc-André Lureau
2018-05-17 9:25 ` [Qemu-devel] [PATCH 3/4] bochs-display: add dirty tracking support Gerd Hoffmann
2018-05-18 15:10 ` Marc-André Lureau
2018-05-17 9:25 ` Gerd Hoffmann [this message]
2018-05-18 15:13 ` [Qemu-devel] [PATCH 4/4] bochs-display: add pcie support Marc-André Lureau
2018-05-22 9:33 ` Gerd Hoffmann
2018-05-17 9:32 ` [Qemu-devel] [PATCH 0/4] display: add new bochs-display device no-reply
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=20180517092513.735-5-kraxel@redhat.com \
--to=kraxel@redhat.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).