[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 1/4] spapr: add pre_plug function for memory
From: |
Greg Kurz |
Subject: |
Re: [Qemu-ppc] [PATCH 1/4] spapr: add pre_plug function for memory |
Date: |
Wed, 24 May 2017 11:55:13 +0200 |
On Wed, 24 May 2017 14:52:36 +1000
David Gibson <address@hidden> wrote:
[...]
>
> This patch seems like a good idea regardless of the rest, so I've
> fixed the minor nits Greg pointed out and merged to ppc-for-2.10.
>
David,
Commit d2e4c6a1437fab2fbb4553b598f25e282c475199 in your ppc-for-2.10 branch
doesn't compile:
+static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState
*dev,
+ Error **errp)
+{
+ PCDIMMDevice *dimm = PC_DIMM(dev);
+ PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
+ MemoryRegion *mr = ddc->get_memory_region(dimm);
+ uint64_t size = memory_region_size(mr);
+ char *mem_dev;
+
+ if (size % SPAPR_MEMORY_BLOCK_SIZE) {
+ error_setg(&local_err, "Hotplugged memory size must be a multiple of "
s/&local_err/errp/
+ "%lld MB", SPAPR_MEMORY_BLOCK_SIZE / M_BYTE);
+ goto out;
s/goto out/return/
+ }
+
+ mem_dev = object_property_get_str(OBJECT(dimm), PC_DIMM_MEMDEV_PROP, NULL);
+ if (mem_dev && !kvmppc_is_mem_backend_page_size_ok(mem_dev)) {
+ error_setg(errp, "Memory backend has bad page size. "
+ "Use 'memory-backend-file' with correct mem-path.");
+ }
+}
+
pgpp85YbhZkj_.pgp
Description: OpenPGP digital signature
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/4] spapr: disable hotplugging without OS, (continued)
[Qemu-ppc] [PATCH 4/4] Revert "spapr: fix memory hot-unplugging", Laurent Vivier, 2017/05/23
Re: [Qemu-ppc] [PATCH 0/4] spapr: disable hotplugging without OS, Daniel Henrique Barboza, 2017/05/23