[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/9] qxl: use uint64_t for vram size
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/9] qxl: use uint64_t for vram size |
Date: |
Wed, 6 Jul 2016 12:04:34 +0200 |
This allows for the 64bit vram bar to become larger than 2G
(try -device qxl-vga,vram64_size_mb=8192).
https://bugzilla.redhat.com/show_bug.cgi?id=1340439
Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden
---
hw/display/qxl.c | 8 ++++----
hw/display/qxl.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 919dc5c..ab96f24 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1914,7 +1914,7 @@ static void qxl_init_ramsize(PCIQXLDevice *qxl)
/* vram (surfaces, 64bit, bar 4+5) */
if (qxl->vram_size_mb != -1) {
- qxl->vram_size = qxl->vram_size_mb * 1024 * 1024;
+ qxl->vram_size = (uint64_t)qxl->vram_size_mb * 1024 * 1024;
}
if (qxl->vram_size < qxl->vram32_size) {
qxl->vram_size = qxl->vram32_size;
@@ -2020,9 +2020,9 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error
**errp)
dprint(qxl, 1, "ram/%s: %d MB [region 0]\n",
qxl->id == 0 ? "pri" : "sec",
qxl->vga.vram_size / (1024*1024));
- dprint(qxl, 1, "vram/32: %d MB [region 1]\n",
+ dprint(qxl, 1, "vram/32: %" PRIx64 "d MB [region 1]\n",
qxl->vram32_size / (1024*1024));
- dprint(qxl, 1, "vram/64: %d MB %s\n",
+ dprint(qxl, 1, "vram/64: %" PRIx64 "d MB %s\n",
qxl->vram_size / (1024*1024),
qxl->vram32_size < qxl->vram_size ? "[region 4]" : "[unmapped]");
@@ -2276,7 +2276,7 @@ static VMStateDescription qxl_vmstate = {
static Property qxl_properties[] = {
DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size,
64 * 1024 * 1024),
- DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram32_size,
+ DEFINE_PROP_UINT64("vram_size", PCIQXLDevice, vram32_size,
64 * 1024 * 1024),
DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision,
QXL_DEFAULT_REVISION),
diff --git a/hw/display/qxl.h b/hw/display/qxl.h
index 2ddf065..39ff004 100644
--- a/hw/display/qxl.h
+++ b/hw/display/qxl.h
@@ -104,9 +104,9 @@ typedef struct PCIQXLDevice {
#endif
/* vram pci bar */
- uint32_t vram_size;
+ uint64_t vram_size;
MemoryRegion vram_bar;
- uint32_t vram32_size;
+ uint64_t vram32_size;
MemoryRegion vram32_bar;
/* io bar */
--
1.8.3.1
- [Qemu-devel] [PULL 0/9] spice and qxl bugfixes, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 1/9] qxl: use uint64_t for vram size,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 6/9] spice: avoid .set_mm_time on >= 0.12.6, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 7/9] virgl: count the calls to gl_block, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 4/9] qxl: store memory region and offset instead of pointer for guest slots, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 3/9] qxl: factor out qxl_get_check_slot_offset, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 2/9] qxl: handle no updates in interface_update_area_complete, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 8/9] spice: use the right head for multi-monitor, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 9/9] virgl: pass whole GL scanout dimensions, Gerd Hoffmann, 2016/07/06
- [Qemu-devel] [PULL 5/9] qxl: fix surface migration, Gerd Hoffmann, 2016/07/06
- Re: [Qemu-devel] [PULL 0/9] spice and qxl bugfixes, Peter Maydell, 2016/07/06