[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/23] kvmvapic: Disable if there is insufficient me
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 05/23] kvmvapic: Disable if there is insufficient memory |
Date: |
Tue, 21 Aug 2012 12:05:39 -0500 |
From: Jan Kiszka <address@hidden>
We need at least 1M of RAM to map the option ROM. Otherwise, we will
corrupt host memory or even crash:
$ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k
Segmentation fault (core dumped)
Reported-and-tested-by: Markus Armbruster <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
(cherry picked from commit a9605e0317c7a6d5e68f3a3b6708c8ef1096f4bc)
Signed-off-by: Michael Roth <address@hidden>
---
hw/apic_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/apic_common.c b/hw/apic_common.c
index 60b8259..e4612bb 100644
--- a/hw/apic_common.c
+++ b/hw/apic_common.c
@@ -289,7 +289,9 @@ static int apic_init_common(SysBusDevice *dev)
sysbus_init_mmio(dev, &s->io_memory);
- if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK) {
+ /* Note: We need at least 1M to map the VAPIC option ROM */
+ if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK &&
+ ram_size >= 1024 * 1024) {
vapic = sysbus_create_simple("kvmvapic", -1, NULL);
}
s->vapic = vapic;
--
1.7.9.5
- [Qemu-devel] [stable-1.1] Patch Round-up for stable 1.1.2, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 02/23] configure: Don't override user's --cpu on MacOS and Solaris, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 03/23] ppc: Fix bug in handling of PAPR hypercall exits, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 05/23] kvmvapic: Disable if there is insufficient memory,
Michael Roth <=
- [Qemu-devel] [PATCH 04/23] s390: Fix error handling and condition code of service call, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 01/23] qtest: fix infinite loop when QEMU aborts abruptly, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 07/23] virtio-blk: fix use-after-free while handling scsi commands, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 08/23] ehci: fix reset, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 06/23] qdev: fix use-after-free in the error path of qdev_init_nofail, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 13/23] usb-ehci: Fix an assert whenever isoc transfers are used, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 11/23] usb: restore USBDevice->attached on vmload, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 10/23] uhci: fix uhci_async_cancel_all, Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 14/23] qlist: add qlist_size(), Michael Roth, 2012/08/21
- [Qemu-devel] [PATCH 09/23] ehci: don't flush cache on doorbell rings., Michael Roth, 2012/08/21