aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaobibo <maobibo@loongson.cn>2021-05-18 20:20:48 +0800
committerGerd Hoffmann <kraxel@redhat.com>2021-05-27 11:55:59 +0200
commitce7015d9e8669e2a45aba7a95fe6ef8a8f55bfe0 (patch)
tree6b8bc24dbd752de79442a7f235bddb27339b6c7a
parent3ea32d1355d446057c17458238db2749c52ee8f0 (diff)
downloadqemu-ce7015d9e8669e2a45aba7a95fe6ef8a8f55bfe0.zip
qemu-ce7015d9e8669e2a45aba7a95fe6ef8a8f55bfe0.tar.gz
qemu-ce7015d9e8669e2a45aba7a95fe6ef8a8f55bfe0.tar.bz2
hw/display/qxl: Set pci rom address aligned with page size
On some MIPS system, page size is 16K, and qxl vga device can be used for VM in kvm mode. Qxl pci rom size is set 8K fixed, smaller than 16K page size on host system, it fails to be added into memslots in kvm mode where memory_size and GPA are required to align with page size. This patch fixes this issue. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <1621340448-31617-1-git-send-email-maobibo@loongson.cn> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--hw/display/qxl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 2ba7563..6e1f8ff 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -321,7 +321,7 @@ static ram_addr_t qxl_rom_size(void)
#define QXL_ROM_SZ 8192
QEMU_BUILD_BUG_ON(QXL_REQUIRED_SZ > QXL_ROM_SZ);
- return QXL_ROM_SZ;
+ return QEMU_ALIGN_UP(QXL_REQUIRED_SZ, qemu_real_host_page_size);
}
static void init_qxl_rom(PCIQXLDevice *d)