From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WudZj-0000La-B8 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 04:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WudZd-0003Mh-PP for qemu-devel@nongnu.org; Wed, 11 Jun 2014 04:08:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WudZd-0003Mc-Fs for qemu-devel@nongnu.org; Wed, 11 Jun 2014 04:07:57 -0400 Date: Wed, 11 Jun 2014 11:08:22 +0300 From: "Michael S. Tsirkin" Message-ID: <20140611080822.GC7248@redhat.com> References: <1401715529-636-1-git-send-email-imammedo@redhat.com> <20140608130101.GA23847@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 00/33] pc: ACPI memory hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Santosh Shukla Cc: Igor Mammedov , qemu-devel@nongnu.org, aliguori@amazon.com, lcapitulino@redhat.com On Wed, Jun 11, 2014 at 12:43:03PM +0530, Santosh Shukla wrote: > Hi Igor, >=20 > I tried building your repository and got build break on ssdt-mem.hex, h= ave you > face this problem or Its just me (:- >=20 > =A0No rule to make target `hw/i386/ssdt-mem.hex', needed by `hw/i386/ > acpi-build.o'. =A0Stop >=20 > using this rule to qemu config:=A0../configure --enable-kvm --enable-de= bug > --target-list=3Dx86_64-softmmu --iasl=3DIASL >=20 > Thanks. This means you don't have iasl. Try this tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git pci >=20 > On Sun, Jun 8, 2014 at 6:31 PM, Michael S. Tsirkin wro= te: >=20 > On Mon, Jun 02, 2014 at 03:24:56PM +0200, Igor Mammedov wrote: > > NOTE to commiter: > > =A0* update precompiled ACPI hex files for iasl-less hosts > > =A0 =A0and ACPI tables test to match new ACPI tables. >=20 > Applied, thanks everyone! >=20 >=20 > > What's new since v10: > > =A0* rename DimmDevice to PCDIMMDevice > > =A0* allow anonymous DIMMs > > =A0* fix error handling in hostmemory_backend_set_size() > > =A0* fix ACPI read callback for case when guest tries to read > > =A0 =A0addr/length from slot without a present DIMM > > > > What's new since v9: > > =A0* drop usage of error_is_set() > > =A0* exit QEMU if it's started with memory hotplug but > > =A0 =A0compat machine doesn't support it > > =A0* rename cpu_hotplug_defs.h to pc-hotplug.h > > =A0* use subsection when migrating acpi memory hotplug state > > =A0* add property to PC_MACHINE for getting hotplug memory region= size > > > > What's new since v8: > > =A0* rebased on top of Marcel's QOMyfing machine work > > =A0 =A0 depends on patch from qom-next: > > =A0 =A0 =A0"machine: Conversion of QEMUMachineInitArgs to Machine= State" > > =A0* fixed QEMU abort if it's running in daemonized mode > > =A0* fixed leak in memdev backend > > =A0* introduced custom PCMachine > > =A0* DIMM devices are now bus-less and use bus-less hotplug metho= d > > =A0* DIMMDevice: renamed property/field 'start' to 'addr' > > =A0* ACPI tables: > > =A0 =A0* avoid punching hotples in PCI CRS by placing > > =A0 =A0 =A0MEMORY_HOPTLUG_DEVICE on PCI0 bus > > =A0* incorporated most of comments/fixes from reviewers > > > > What's new since v7: > > * Per Andreas' suggestion dropped DIMMBus concept. > > * Added hotplug binding for bus-less devices > > * DIMM device is split to backend and frontend. Therefore followi= ng > > =A0 command/options were added for supporting it: > > > > =A0 For memory-ram backend: > > =A0 =A0 =A0 CLI: -object-add memory-ram, > > =A0 =A0 =A0 =A0 =A0 with options: 'id' and 'size' > > =A0 For dimm frontend: > > =A0 =A0 =A0 option "size" became readonly, pulling it's size from= attached > backend > > =A0 =A0 =A0 added option "memdev" for specifying backend by 'id' > > > > * dropped support for 32 bit guests > > * failed hotplug action doesn't consume 1 slot anymore > > * vaious fixes adressing reviewer's comments most of them in ACPI= part > > --- > > > > This series allows to hotplug 'arbitrary' DIMM devices specifying= size, > > NUMA node mapping (guest side), slot and address where to map it,= at > runtime. > > > > Due to ACPI limitation there is need to specify a number of possi= ble > > DIMM devices. For this task -m option was extended to support > > following format: > > > > =A0 -m [mem=3D]RamSize[,slots=3DN,maxmem=3DM] > > > > To allow memory hotplug user must specify a pair of additional > parameters: > > =A0 =A0 'slots' - number of possible increments > > =A0 =A0 'maxmem' - max possible total memory size QEMU is allowed= to use, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0including RamSize. > > > > minimal monitor command syntax to hotplug DIMM device: > > > > =A0 object_add memory-ram,id=3DmemX,size=3D1G > > =A0 device_add pc-dimm,id=3DdimmX,memdev=3DmemX > > > > pc-dimm device provides following properties that could be used w= ith > > device_add / -device to alter default behavior: > > > > =A0 id =A0 =A0- unique string identifying device [mandatory] > > =A0 slot =A0- number in range [0-slots) [optional], if not specif= ied > > =A0 =A0 =A0 =A0 =A0 the first free slot is used > > =A0 node =A0- NUMA node id [optional] (default: 0) > > =A0 size =A0- amount of memory to add, readonly derived from back= ing memdev > > =A0 addr - guest's physical address where to plug DIMM [optional]= , > > =A0 =A0 =A0 =A0 =A0 if not specified the first gap in hotplug mem= ory region > > =A0 =A0 =A0 =A0 =A0 that fits DIMM is used > > > > =A0-device option could be used for adding potentially hotunpluga= ble DIMMs > > and also for specifying hotplugged DIMMs in migration case. > > > > Tested guests: > > =A0- RHEL 6x64 > > =A0- Windows 2012DCx64 > > =A0- Windows 2008DCx64 > > > > Known limitations/bugs/TODOs: > > =A0- hot-remove is not supported, yet > > =A0- max number of supported DIMM devices 256 (due to ACPI object= name > > =A0 =A0limit), could be increased creating several containers and= putting > > =A0 =A0DIMMs there. (exercise for future) > > =A0- e820 table doesn't include DIMM devices added with -device / > > =A0 =A0(or after reboot devices added with device_add) > > =A0- Windows 2008 remembers DIMM configuration, so if DIMM with o= ther > > =A0 =A0addr/size is added into the same slot, it refuses to use i= t insisting > > =A0 =A0on old mapping. > > > > QEMU git tree for testing is available at: > > =A0 https://github.com/imammedo/qemu/commits/memory-hotplug-v11 > > > > Example QEMU cmd line: > > =A0 qemu-system-x86_64 -enable-kvm -monitor unix:/tmp/mon,server,= nowait \ > > =A0 =A0 =A0-m 4096,slots=3D4,maxmem=3D8G guest.img > > > > PS: > > =A0 Windows guest requires SRAT table for hotplug to work so add = an extra > option: > > =A0 =A0-numa node > > > > Igor Mammedov (32): > > =A0 pc: create custom generic PC machine type > > =A0 pc: ACPI BIOS: use enum for defining memory affinity flags > > =A0 object_add: allow completion handler to get canonical path > > =A0 vl.c: daemonize before guest memory allocation > > =A0 add memdev backend infrastructure > > =A0 vl.c: extend -m option to support options for memory hotplug > > =A0 qdev: hotplug for buss-less devices > > =A0 qdev: expose DeviceState.hotplugged field as a property > > =A0 memory: add memory_region_is_mapped() API > > =A0 pc-dimm: do not allow to set already used memdev > > =A0 pc: initialize memory hotplug address space > > =A0 pc: exit QEMU if number of slots more than supported 256 > > =A0 pc: add 'etc/reserved-memory-end' fw_cfg interface for SeaBIO= S > > =A0 pc: exit QEMU if compat machine doesn't support memory hotlpu= g > > =A0 pc: add memory hotplug handler to PC_MACHINE > > =A0 pc-dimm: add busy address check and address auto-allocation > > =A0 pc-dimm: add busy slot check and slot auto-allocation > > =A0 acpi: rename cpu_hotplug_defs.h to pc-hotplug.h > > =A0 acpi: memory hotplug ACPI hardware implementation > > =A0 trace: add acpi memory hotplug IO region events > > =A0 trace: pc: add PC_DIMM slot & address allocation > > =A0 acpi:piix4: allow plug/unlug callbacks handle not only PCI de= vices > > =A0 acpi:piix4: add memory hotplug handling > > =A0 pc: ich9 lpc: make it work with global/compat properties > > =A0 acpi:ich9: add memory hotplug handling > > =A0 pc: migrate piix4 & ich9 MemHotplugState > > =A0 pc: add acpi-device link to PCMachineState > > =A0 pc: propagate memory hotplug event to ACPI device > > =A0 pc: ACPI BIOS: implement memory hotplug interface > > =A0 pc: add "hotplug-memory-region-size" property to PC_MACHINE > > =A0 pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole > > =A0 pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX= and Q35 > > =A0 =A0 machines > > > > Vasilis Liaskovitis (1): > > =A0 pc: implement pc-dimm device abstraction > > > > =A0backends/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 + > > =A0backends/hostmem-ram.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0 54 ++++++= ++ > > =A0backends/hostmem.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 97 ++= +++++++++++++ > > =A0default-configs/i386-softmmu.mak =A0 | =A0 =A01 + > > =A0default-configs/x86_64-softmmu.mak | =A0 =A01 + > > =A0docs/specs/acpi_mem_hotplug.txt =A0 =A0| =A0 44 +++++++ > > =A0hw/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0= 1 + > > =A0hw/acpi/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A01 + > > =A0hw/acpi/ich9.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 6= 2 ++++++++++ > > =A0hw/acpi/memory_hotplug.c =A0 =A0 =A0 =A0 =A0 | =A0187 ++++++++= ++++++++++++++++++++ > > =A0hw/acpi/piix4.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 7= 4 ++++++++++-- > > =A0hw/core/qdev.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 3= 0 +++++ > > =A0hw/i386/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A03 +- > > =A0hw/i386/acpi-build.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 75 ++++= ++++++- > > =A0hw/i386/acpi-dsdt.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A07 +- > > =A0hw/i386/pc.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 227 > ++++++++++++++++++++++++++++++++++- > > =A0hw/i386/pc_piix.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 51 = +++++--- > > =A0hw/i386/pc_q35.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 25 = +++- > > =A0hw/i386/q35-acpi-dsdt.dsl =A0 =A0 =A0 =A0 =A0| =A0 =A07 +- > > =A0hw/i386/ssdt-mem.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 77 ++++= ++++++++ > > =A0hw/i386/ssdt-misc.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0164 ++++= +++++++++++++++++++++ > > =A0hw/isa/lpc_ich9.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 33 = +++++- > > =A0hw/mem/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01 + > > =A0hw/mem/pc-dimm.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0236 > ++++++++++++++++++++++++++++++++++++ > > =A0hw/mips/mips_malta.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > > =A0include/exec/memory.h =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A08 ++ > > =A0include/hw/acpi/acpi.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A06 + > > =A0include/hw/acpi/cpu_hotplug.h =A0 =A0 =A0| =A0 =A02 +- > > =A0include/hw/acpi/cpu_hotplug_defs.h | =A0 32 ----- > > =A0include/hw/acpi/ich9.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A04 + > > =A0include/hw/acpi/memory_hotplug.h =A0 | =A0 37 ++++++ > > =A0include/hw/acpi/pc-hotplug.h =A0 =A0 =A0 | =A0 56 +++++++++ > > =A0include/hw/boards.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 10 ++ > > =A0include/hw/i386/pc.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 64 ++++= ++++++- > > =A0include/hw/mem/pc-dimm.h =A0 =A0 =A0 =A0 =A0 | =A0 79 ++++++++= ++++ > > =A0include/sysemu/hostmem.h =A0 =A0 =A0 =A0 =A0 | =A0 60 ++++++++= + > > =A0memory.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |= =A0 10 ++- > > =A0qemu-options.hx =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0= 9 +- > > =A0qmp.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 11 ++- > > =A0trace-events =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 17 +++ > > =A0vl.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 64 +++++++++- > > =A041 files changed, 1829 insertions(+), 102 deletions(-) > > =A0create mode 100644 backends/hostmem-ram.c > > =A0create mode 100644 backends/hostmem.c > > =A0create mode 100644 docs/specs/acpi_mem_hotplug.txt > > =A0create mode 100644 hw/acpi/memory_hotplug.c > > =A0create mode 100644 hw/i386/ssdt-mem.dsl > > =A0create mode 100644 hw/mem/Makefile.objs > > =A0create mode 100644 hw/mem/pc-dimm.c > > =A0delete mode 100644 include/hw/acpi/cpu_hotplug_defs.h > > =A0create mode 100644 include/hw/acpi/memory_hotplug.h > > =A0create mode 100644 include/hw/acpi/pc-hotplug.h > > =A0create mode 100644 include/hw/mem/pc-dimm.h > > =A0create mode 100644 include/sysemu/hostmem.h >=20 >=20 >=20