[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 7/9] pc: skip setting CMOS data when RTC device is una
From: |
Chao Peng |
Subject: |
[Qemu-devel] [RFC 7/9] pc: skip setting CMOS data when RTC device is unavailable |
Date: |
Fri, 17 Jun 2016 04:14:15 -0400 |
... to make sure hotplug for new platform that without RTC support
can still work.
Signed-off-by: Chao Peng <address@hidden>
---
hw/i386/pc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7198ed5..46ca0e3 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1695,8 +1695,10 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
goto out;
}
- /* increment the number of CPUs */
- rtc_set_memory(pcms->rtc, 0x5f, rtc_get_memory(pcms->rtc, 0x5f) + 1);
+ if (pcms->rtc) {
+ /* increment the number of CPUs */
+ rtc_set_memory(pcms->rtc, 0x5f, rtc_get_memory(pcms->rtc, 0x5f) + 1);
+ }
apic_id.arch_id = cc->get_arch_id(CPU(dev));
found_cpu = bsearch(&apic_id, pcms->possible_cpus->cpus,
--
1.8.3.1
- [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 2/9] pci: introduce light weight PCIE Host emulation pci-lite, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 3/9] acpi: add support for pc-lite platform, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 1/9] acpi: introduce light weight ACPI PM emulation pm-lite, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 7/9] pc: skip setting CMOS data when RTC device is unavailable,
Chao Peng <=
- [Qemu-devel] [RFC 5/9] acpi: expose acpi_checksum(), Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 4/9] acpi: expose data structurs and functions of BIOS linker loader, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 8/9] pc: support direct loading protected/long mode kernel, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 6/9] acpi: patch guest ACPI for pc-lite, Chao Peng, 2016/06/17
- [Qemu-devel] [RFC 9/9] pc: introduce light weight PC board pc-lite, Chao Peng, 2016/06/17
- Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite, Paolo Bonzini, 2016/06/17