* [Qemu-devel] [PATCH v5 1/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram
2018-06-13 12:29 [Qemu-devel] [PATCH v5 0/4] ramfb: simple boot framebuffer Gerd Hoffmann
@ 2018-06-13 12:29 ` Gerd Hoffmann
2018-06-15 16:45 ` Laszlo Ersek
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 2/4] hw/display: add standalone ramfb device Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Gerd Hoffmann @ 2018-06-13 12:29 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Eduardo Habkost, Marcel Apfelbaum,
Richard Henderson, qemu-arm, Michael S. Tsirkin, Alex Williamson,
Peter Maydell, László Érsek, Gerd Hoffmann
The boot framebuffer is expected to be configured by the firmware, so it
uses fw_cfg as interface. Initialization goes as follows:
(1) Check whenever etc/ramfb is present.
(2) Allocate framebuffer from RAM.
(3) Fill struct RAMFBCfg, write it to etc/ramfb.
Done. You can write stuff to the framebuffer now, and it should appear
automagically on the screen.
Note that this isn't very efficient because it does a full display
update on each refresh. No dirty tracking. Dirty tracking would have
to be active for the whole ram slot, so that wouldn't be very efficient
either. For a boot display which is active for a short time only this
isn't a big deal. As permanent guest display something better should be
used (if possible).
This is the ramfb core code. Some windup is needed for display devices
which want have a ramfb boot display.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/hw/display/ramfb.h | 9 +++++
hw/display/ramfb.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++
hw/display/Makefile.objs | 2 +
3 files changed, 106 insertions(+)
create mode 100644 include/hw/display/ramfb.h
create mode 100644 hw/display/ramfb.c
diff --git a/include/hw/display/ramfb.h b/include/hw/display/ramfb.h
new file mode 100644
index 0000000000..a3d4c79942
--- /dev/null
+++ b/include/hw/display/ramfb.h
@@ -0,0 +1,9 @@
+#ifndef RAMFB_H
+#define RAMFB_H
+
+/* ramfb.c */
+typedef struct RAMFBState RAMFBState;
+void ramfb_display_update(QemuConsole *con, RAMFBState *s);
+RAMFBState *ramfb_setup(Error **errp);
+
+#endif /* RAMFB_H */
diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c
new file mode 100644
index 0000000000..6867bce8ae
--- /dev/null
+++ b/hw/display/ramfb.c
@@ -0,0 +1,95 @@
+/*
+ * early boot framebuffer in guest ram
+ * configured using fw_cfg
+ *
+ * Copyright Red Hat, Inc. 2017
+ *
+ * Author:
+ * Gerd Hoffmann <kraxel@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "hw/loader.h"
+#include "hw/display/ramfb.h"
+#include "ui/console.h"
+#include "sysemu/sysemu.h"
+
+struct QEMU_PACKED RAMFBCfg {
+ uint64_t addr;
+ uint32_t fourcc;
+ uint32_t flags;
+ uint32_t width;
+ uint32_t height;
+ uint32_t stride;
+};
+
+struct RAMFBState {
+ DisplaySurface *ds;
+ uint32_t width, height;
+ struct RAMFBCfg cfg;
+};
+
+static void ramfb_fw_cfg_write(void *dev, off_t offset, size_t len)
+{
+ RAMFBState *s = dev;
+ void *framebuffer;
+ uint32_t stride, fourcc, format;
+ hwaddr addr, length;
+
+ s->width = be32_to_cpu(s->cfg.width);
+ s->height = be32_to_cpu(s->cfg.height);
+ stride = be32_to_cpu(s->cfg.stride);
+ fourcc = be32_to_cpu(s->cfg.fourcc);
+ addr = be64_to_cpu(s->cfg.addr);
+ length = stride * s->height;
+ format = qemu_drm_format_to_pixman(fourcc);
+
+ fprintf(stderr, "%s: %dx%d @ 0x%" PRIx64 "\n", __func__,
+ s->width, s->height, addr);
+ framebuffer = address_space_map(&address_space_memory,
+ addr, &length, false,
+ MEMTXATTRS_UNSPECIFIED);
+ if (!framebuffer || length < stride * s->height) {
+ s->width = 0;
+ s->height = 0;
+ return;
+ }
+ s->ds = qemu_create_displaysurface_from(s->width, s->height,
+ format, stride, framebuffer);
+}
+
+void ramfb_display_update(QemuConsole *con, RAMFBState *s)
+{
+ if (!s->width || !s->height) {
+ return;
+ }
+
+ if (s->ds) {
+ dpy_gfx_replace_surface(con, s->ds);
+ s->ds = NULL;
+ }
+
+ /* simple full screen update */
+ dpy_gfx_update_full(con);
+}
+
+RAMFBState *ramfb_setup(Error **errp)
+{
+ FWCfgState *fw_cfg = fw_cfg_find();
+ RAMFBState *s;
+
+ if (!fw_cfg || !fw_cfg->dma_enabled) {
+ error_setg(errp, "ramfb device requires fw_cfg with DMA");
+ return NULL;
+ }
+
+ s = g_new0(RAMFBState, 1);
+
+ fw_cfg_add_file_callback(fw_cfg, "etc/ramfb",
+ NULL, ramfb_fw_cfg_write, s,
+ &s->cfg, sizeof(s->cfg), false);
+ return s;
+}
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index b5d97ab26d..0af04985d2 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -1,3 +1,5 @@
+common-obj-y += ramfb.o
+
common-obj-$(CONFIG_ADS7846) += ads7846.o
common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
common-obj-$(CONFIG_G364FB) += g364fb.o
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v5 1/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 1/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram Gerd Hoffmann
@ 2018-06-15 16:45 ` Laszlo Ersek
0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2018-06-15 16:45 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Peter Maydell, Eduardo Habkost, Michael S. Tsirkin,
Alex Williamson, qemu-arm, Paolo Bonzini, Richard Henderson
On 06/13/18 14:29, Gerd Hoffmann wrote:
> The boot framebuffer is expected to be configured by the firmware, so it
> uses fw_cfg as interface. Initialization goes as follows:
>
> (1) Check whenever etc/ramfb is present.
> (2) Allocate framebuffer from RAM.
> (3) Fill struct RAMFBCfg, write it to etc/ramfb.
>
> Done. You can write stuff to the framebuffer now, and it should appear
> automagically on the screen.
>
> Note that this isn't very efficient because it does a full display
> update on each refresh. No dirty tracking. Dirty tracking would have
> to be active for the whole ram slot, so that wouldn't be very efficient
> either. For a boot display which is active for a short time only this
> isn't a big deal. As permanent guest display something better should be
> used (if possible).
>
> This is the ramfb core code. Some windup is needed for display devices
> which want have a ramfb boot display.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/hw/display/ramfb.h | 9 +++++
> hw/display/ramfb.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++
> hw/display/Makefile.objs | 2 +
> 3 files changed, 106 insertions(+)
> create mode 100644 include/hw/display/ramfb.h
> create mode 100644 hw/display/ramfb.c
I tested this on KVM, built from Gerd's sirius/ramfb branch @ 778450b87275. Works fine with Gerd's corresponding edk2 QemuRamfbDxe driver (already merged):
[edk2] [PATCH v3 0/4] Add QemuRamfbDxe driver
http://mid.mail-archive.com/20180613072936.12480-1-kraxel@redhat.com
It also works fine with Ard's efifb patches:
[PATCH 0/2] efi: add support for cacheable efifb mappings
http://mid.mail-archive.com/20180615104818.23013-1-ard.biesheuvel@linaro.org
So, for this patch (not the series):
Tested-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
Laszlo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v5 2/4] hw/display: add standalone ramfb device
2018-06-13 12:29 [Qemu-devel] [PATCH v5 0/4] ramfb: simple boot framebuffer Gerd Hoffmann
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 1/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram Gerd Hoffmann
@ 2018-06-13 12:29 ` Gerd Hoffmann
2018-06-15 16:46 ` Laszlo Ersek
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 3/4] hw/vfio/display: add ramfb support Gerd Hoffmann
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 4/4] Add ramfb MAINTAINERS entry Gerd Hoffmann
3 siblings, 1 reply; 8+ messages in thread
From: Gerd Hoffmann @ 2018-06-13 12:29 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Eduardo Habkost, Marcel Apfelbaum,
Richard Henderson, qemu-arm, Michael S. Tsirkin, Alex Williamson,
Peter Maydell, László Érsek, Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/hw/display/ramfb.h | 3 +++
hw/arm/sysbus-fdt.c | 7 +++++
hw/arm/virt.c | 2 ++
hw/display/ramfb-standalone.c | 62 +++++++++++++++++++++++++++++++++++++++++++
hw/i386/pc_piix.c | 2 ++
hw/i386/pc_q35.c | 2 ++
hw/display/Makefile.objs | 1 +
7 files changed, 79 insertions(+)
create mode 100644 hw/display/ramfb-standalone.c
diff --git a/include/hw/display/ramfb.h b/include/hw/display/ramfb.h
index a3d4c79942..b33a2c467b 100644
--- a/include/hw/display/ramfb.h
+++ b/include/hw/display/ramfb.h
@@ -6,4 +6,7 @@ typedef struct RAMFBState RAMFBState;
void ramfb_display_update(QemuConsole *con, RAMFBState *s);
RAMFBState *ramfb_setup(Error **errp);
+/* ramfb-standalone.c */
+#define TYPE_RAMFB_DEVICE "ramfb"
+
#endif /* RAMFB_H */
diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
index e4c492ea44..277ed872e7 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/arm/sysbus-fdt.c
@@ -36,6 +36,7 @@
#include "hw/vfio/vfio-platform.h"
#include "hw/vfio/vfio-calxeda-xgmac.h"
#include "hw/vfio/vfio-amd-xgbe.h"
+#include "hw/display/ramfb.h"
#include "hw/arm/fdt.h"
/*
@@ -406,12 +407,18 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev, void *opaque)
#endif /* CONFIG_LINUX */
+static int no_fdt_node(SysBusDevice *sbdev, void *opaque)
+{
+ return 0;
+}
+
/* list of supported dynamic sysbus devices */
static const NodeCreationPair add_fdt_node_functions[] = {
#ifdef CONFIG_LINUX
{TYPE_VFIO_CALXEDA_XGMAC, add_calxeda_midway_xgmac_fdt_node},
{TYPE_VFIO_AMD_XGBE, add_amd_xgbe_fdt_node},
#endif
+ {TYPE_RAMFB_DEVICE, no_fdt_node},
{"", NULL}, /* last element */
};
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index f0a4fa004c..98b99cf236 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -36,6 +36,7 @@
#include "hw/arm/virt.h"
#include "hw/vfio/vfio-calxeda-xgmac.h"
#include "hw/vfio/vfio-amd-xgbe.h"
+#include "hw/display/ramfb.h"
#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/device_tree.h"
@@ -1659,6 +1660,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 255;
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_CALXEDA_XGMAC);
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_AMD_XGBE);
+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
mc->block_default_type = IF_VIRTIO;
mc->no_cdrom = 1;
mc->pci_allow_0_address = true;
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
new file mode 100644
index 0000000000..c0d241ba01
--- /dev/null
+++ b/hw/display/ramfb-standalone.c
@@ -0,0 +1,62 @@
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "hw/loader.h"
+#include "hw/isa/isa.h"
+#include "hw/display/ramfb.h"
+#include "ui/console.h"
+#include "sysemu/sysemu.h"
+
+#define RAMFB(obj) OBJECT_CHECK(RAMFBStandaloneState, (obj), TYPE_RAMFB_DEVICE)
+
+typedef struct RAMFBStandaloneState {
+ SysBusDevice parent_obj;
+ QemuConsole *con;
+ RAMFBState *state;
+} RAMFBStandaloneState;
+
+static void display_update_wrapper(void *dev)
+{
+ RAMFBStandaloneState *ramfb = RAMFB(dev);
+
+ if (0 /* native driver active */) {
+ /* non-standalone device would run native display update here */;
+ } else {
+ ramfb_display_update(ramfb->con, ramfb->state);
+ }
+}
+
+static const GraphicHwOps wrapper_ops = {
+ .gfx_update = display_update_wrapper,
+};
+
+static void ramfb_realizefn(DeviceState *dev, Error **errp)
+{
+ RAMFBStandaloneState *ramfb = RAMFB(dev);
+
+ ramfb->con = graphic_console_init(dev, 0, &wrapper_ops, dev);
+ ramfb->state = ramfb_setup(errp);
+}
+
+static void ramfb_class_initfn(ObjectClass *klass, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(klass);
+
+ set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
+ dc->realize = ramfb_realizefn;
+ dc->desc = "ram framebuffer standalone device";
+ dc->user_creatable = true;
+}
+
+static const TypeInfo ramfb_info = {
+ .name = TYPE_RAMFB_DEVICE,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(RAMFBStandaloneState),
+ .class_init = ramfb_class_initfn,
+};
+
+static void ramfb_register_types(void)
+{
+ type_register_static(&ramfb_info);
+}
+
+type_init(ramfb_register_types)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 3b87f3cedb..e9b6f064fb 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -28,6 +28,7 @@
#include "hw/loader.h"
#include "hw/i386/pc.h"
#include "hw/i386/apic.h"
+#include "hw/display/ramfb.h"
#include "hw/smbios/smbios.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_ids.h"
@@ -423,6 +424,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
m->desc = "Standard PC (i440FX + PIIX, 1996)";
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
}
static void pc_i440fx_3_0_machine_options(MachineClass *m)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 087f2630f9..1a73e1848a 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -45,6 +45,7 @@
#include "hw/i386/ich9.h"
#include "hw/i386/amd_iommu.h"
#include "hw/i386/intel_iommu.h"
+#include "hw/display/ramfb.h"
#include "hw/smbios/smbios.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"
@@ -305,6 +306,7 @@ static void pc_q35_machine_options(MachineClass *m)
m->no_floppy = 1;
machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
m->max_cpus = 288;
}
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index 0af04985d2..fb8408c6d0 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -1,4 +1,5 @@
common-obj-y += ramfb.o
+common-obj-y += ramfb-standalone.o
common-obj-$(CONFIG_ADS7846) += ads7846.o
common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v5 2/4] hw/display: add standalone ramfb device
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 2/4] hw/display: add standalone ramfb device Gerd Hoffmann
@ 2018-06-15 16:46 ` Laszlo Ersek
0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2018-06-15 16:46 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Peter Maydell, Eduardo Habkost, Michael S. Tsirkin,
Alex Williamson, qemu-arm, Paolo Bonzini, Richard Henderson
On 06/13/18 14:29, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/hw/display/ramfb.h | 3 +++
> hw/arm/sysbus-fdt.c | 7 +++++
> hw/arm/virt.c | 2 ++
> hw/display/ramfb-standalone.c | 62 +++++++++++++++++++++++++++++++++++++++++++
> hw/i386/pc_piix.c | 2 ++
> hw/i386/pc_q35.c | 2 ++
> hw/display/Makefile.objs | 1 +
> 7 files changed, 79 insertions(+)
> create mode 100644 hw/display/ramfb-standalone.c
Tested-by: Laszlo Ersek <lersek@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v5 3/4] hw/vfio/display: add ramfb support
2018-06-13 12:29 [Qemu-devel] [PATCH v5 0/4] ramfb: simple boot framebuffer Gerd Hoffmann
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 1/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram Gerd Hoffmann
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 2/4] hw/display: add standalone ramfb device Gerd Hoffmann
@ 2018-06-13 12:29 ` Gerd Hoffmann
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 4/4] Add ramfb MAINTAINERS entry Gerd Hoffmann
3 siblings, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2018-06-13 12:29 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Eduardo Habkost, Marcel Apfelbaum,
Richard Henderson, qemu-arm, Michael S. Tsirkin, Alex Williamson,
Peter Maydell, László Érsek, Gerd Hoffmann
So we have a boot display when using a vgpu as primary display.
Use vfio-pci-ramfb instead of vfio-pci to enable it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/hw/vfio/vfio-common.h | 2 ++
hw/vfio/display.c | 12 ++++++++++++
hw/vfio/pci.c | 15 +++++++++++++++
3 files changed, 29 insertions(+)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index a9036929b2..a58d7e7e77 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -26,6 +26,7 @@
#include "qemu/queue.h"
#include "qemu/notify.h"
#include "ui/console.h"
+#include "hw/display/ramfb.h"
#ifdef CONFIG_LINUX
#include <linux/vfio.h>
#endif
@@ -143,6 +144,7 @@ typedef struct VFIODMABuf {
typedef struct VFIODisplay {
QemuConsole *con;
+ RAMFBState *ramfb;
struct {
VFIORegion buffer;
DisplaySurface *surface;
diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index 59c0e5d1d7..3901f580c6 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -124,6 +124,9 @@ static void vfio_display_dmabuf_update(void *opaque)
primary = vfio_display_get_dmabuf(vdev, DRM_PLANE_TYPE_PRIMARY);
if (primary == NULL) {
+ if (dpy->ramfb) {
+ ramfb_display_update(dpy->con, dpy->ramfb);
+ }
return;
}
@@ -181,6 +184,9 @@ static int vfio_display_dmabuf_init(VFIOPCIDevice *vdev, Error **errp)
vdev->dpy->con = graphic_console_init(DEVICE(vdev), 0,
&vfio_display_dmabuf_ops,
vdev);
+ if (strcmp(object_get_typename(OBJECT(vdev)), "vfio-pci-ramfb") == 0) {
+ vdev->dpy->ramfb = ramfb_setup(errp);
+ }
return 0;
}
@@ -228,6 +234,9 @@ static void vfio_display_region_update(void *opaque)
return;
}
if (!plane.drm_format || !plane.size) {
+ if (dpy->ramfb) {
+ ramfb_display_update(dpy->con, dpy->ramfb);
+ }
return;
}
format = qemu_drm_format_to_pixman(plane.drm_format);
@@ -300,6 +309,9 @@ static int vfio_display_region_init(VFIOPCIDevice *vdev, Error **errp)
vdev->dpy->con = graphic_console_init(DEVICE(vdev), 0,
&vfio_display_region_ops,
vdev);
+ if (strcmp(object_get_typename(OBJECT(vdev)), "vfio-pci-ramfb") == 0) {
+ vdev->dpy->ramfb = ramfb_setup(errp);
+ }
return 0;
}
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 18c493b49e..6a2b42a595 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3234,9 +3234,24 @@ static const TypeInfo vfio_pci_dev_info = {
},
};
+static void vfio_pci_ramfb_dev_class_init(ObjectClass *klass, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(klass);
+
+ dc->hotpluggable = false;
+}
+
+static const TypeInfo vfio_pci_ramfb_dev_info = {
+ .name = "vfio-pci-ramfb",
+ .parent = "vfio-pci",
+ .instance_size = sizeof(VFIOPCIDevice),
+ .class_init = vfio_pci_ramfb_dev_class_init,
+};
+
static void register_vfio_pci_dev_type(void)
{
type_register_static(&vfio_pci_dev_info);
+ type_register_static(&vfio_pci_ramfb_dev_info);
}
type_init(register_vfio_pci_dev_type)
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v5 4/4] Add ramfb MAINTAINERS entry
2018-06-13 12:29 [Qemu-devel] [PATCH v5 0/4] ramfb: simple boot framebuffer Gerd Hoffmann
` (2 preceding siblings ...)
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 3/4] hw/vfio/display: add ramfb support Gerd Hoffmann
@ 2018-06-13 12:29 ` Gerd Hoffmann
2018-06-15 16:51 ` Laszlo Ersek
3 siblings, 1 reply; 8+ messages in thread
From: Gerd Hoffmann @ 2018-06-13 12:29 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Eduardo Habkost, Marcel Apfelbaum,
Richard Henderson, qemu-arm, Michael S. Tsirkin, Alex Williamson,
Peter Maydell, László Érsek, Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
MAINTAINERS | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 8a94517e9e..2401028766 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1331,6 +1331,12 @@ F: hw/display/bochs-display.c
F: include/hw/display/vga.h
F: include/hw/display/bochs-vbe.h
+ramfb
+M: Gerd Hoffmann <kraxel@redhat.com>
+S: Maintained
+F: hw/display/ramfb*.c
+F: include/hw/display/ramfb.h
+
virtio-gpu
M: Gerd Hoffmann <kraxel@redhat.com>
S: Maintained
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v5 4/4] Add ramfb MAINTAINERS entry
2018-06-13 12:29 ` [Qemu-devel] [PATCH v5 4/4] Add ramfb MAINTAINERS entry Gerd Hoffmann
@ 2018-06-15 16:51 ` Laszlo Ersek
0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2018-06-15 16:51 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Peter Maydell, Eduardo Habkost, Michael S. Tsirkin,
Alex Williamson, qemu-arm, Paolo Bonzini, Richard Henderson
On 06/13/18 14:29, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> MAINTAINERS | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8a94517e9e..2401028766 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1331,6 +1331,12 @@ F: hw/display/bochs-display.c
> F: include/hw/display/vga.h
> F: include/hw/display/bochs-vbe.h
>
> +ramfb
> +M: Gerd Hoffmann <kraxel@redhat.com>
> +S: Maintained
> +F: hw/display/ramfb*.c
> +F: include/hw/display/ramfb.h
> +
> virtio-gpu
> M: Gerd Hoffmann <kraxel@redhat.com>
> S: Maintained
>
I wonder if we should have a separate "display" section in this text
file, or some such.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks
Laszlo
^ permalink raw reply [flat|nested] 8+ messages in thread