From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WufEa-0005Dc-IP for qemu-devel@nongnu.org; Wed, 11 Jun 2014 05:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WufEV-0002HB-Ix for qemu-devel@nongnu.org; Wed, 11 Jun 2014 05:54:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WufEV-0002H6-7j for qemu-devel@nongnu.org; Wed, 11 Jun 2014 05:54:15 -0400 Date: Wed, 11 Jun 2014 12:54:37 +0300 From: "Michael S. Tsirkin" Message-ID: <20140611095437.GA7826@redhat.com> References: <1401715529-636-1-git-send-email-imammedo@redhat.com> <20140608130101.GA23847@redhat.com> <20140611080822.GC7248@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 03:05:07PM +0530, Santosh Shukla wrote: >=20 >=20 >=20 > On Wed, Jun 11, 2014 at 1:38 PM, Michael S. Tsirkin wr= ote: >=20 > On Wed, Jun 11, 2014 at 12:43:03PM +0530, Santosh Shukla wrote: > > Hi Igor, > > > > I tried building your repository and got build break on ssdt-mem.= hex, > have you > > face this problem or Its just me (:- > > > > =A0No rule to make target `hw/i386/ssdt-mem.hex', needed by `hw/i= 386/ > > acpi-build.o'. =A0Stop > > > > using this rule to qemu config:=A0../configure --enable-kvm --ena= ble-debug > > --target-list=3Dx86_64-softmmu --iasl=3DIASL > > > > Thanks. >=20 > This means you don't have iasl. >=20 > Try this tree: > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git pci >=20 >=20 > I have iasl installed in my system, and tried both repo, getting same e= rror, I > believe to build acpi's dls file, iasl=3DIASL option good enough, right. Is your iasl binary really named IASL in upper case? And is it on path? > any iasl vs qemu version dependency am i missing?=A0 >=20 > Thanks. >=20 Try removing --iasl=3DIASL from configure line. >=20 > > > > On Sun, Jun 8, 2014 at 6:31 PM, Michael S. Tsirkin > wrote: > > > > =A0 =A0 On Mon, Jun 02, 2014 at 03:24:56PM +0200, Igor Mammedov w= rote: > > =A0 =A0 > NOTE to commiter: > > =A0 =A0 > =A0* update precompiled ACPI hex files for iasl-less ho= sts > > =A0 =A0 > =A0 =A0and ACPI tables test to match new ACPI tables. > > > > =A0 =A0 Applied, thanks everyone! > > > > > > =A0 =A0 > What's new since v10: > > =A0 =A0 > =A0* rename DimmDevice to PCDIMMDevice > > =A0 =A0 > =A0* allow anonymous DIMMs > > =A0 =A0 > =A0* fix error handling in hostmemory_backend_set_size(= ) > > =A0 =A0 > =A0* fix ACPI read callback for case when guest tries t= o read > > =A0 =A0 > =A0 =A0addr/length from slot without a present DIMM > > =A0 =A0 > > > =A0 =A0 > What's new since v9: > > =A0 =A0 > =A0* drop usage of error_is_set() > > =A0 =A0 > =A0* exit QEMU if it's started with memory hotplug but > > =A0 =A0 > =A0 =A0compat machine doesn't support it > > =A0 =A0 > =A0* rename cpu_hotplug_defs.h to pc-hotplug.h > > =A0 =A0 > =A0* use subsection when migrating acpi memory hotplug = state > > =A0 =A0 > =A0* add property to PC_MACHINE for getting hotplug mem= ory region > size > > =A0 =A0 > > > =A0 =A0 > What's new since v8: > > =A0 =A0 > =A0* rebased on top of Marcel's QOMyfing machine work > > =A0 =A0 > =A0 =A0 depends on patch from qom-next: > > =A0 =A0 > =A0 =A0 =A0"machine: Conversion of QEMUMachineInitArgs = to MachineState" > > =A0 =A0 > =A0* fixed QEMU abort if it's running in daemonized mod= e > > =A0 =A0 > =A0* fixed leak in memdev backend > > =A0 =A0 > =A0* introduced custom PCMachine > > =A0 =A0 > =A0* DIMM devices are now bus-less and use bus-less hot= plug method > > =A0 =A0 > =A0* DIMMDevice: renamed property/field 'start' to 'add= r' > > =A0 =A0 > =A0* ACPI tables: > > =A0 =A0 > =A0 =A0* avoid punching hotples in PCI CRS by placing > > =A0 =A0 > =A0 =A0 =A0MEMORY_HOPTLUG_DEVICE on PCI0 bus > > =A0 =A0 > =A0* incorporated most of comments/fixes from reviewers > > =A0 =A0 > > > =A0 =A0 > What's new since v7: > > =A0 =A0 > * Per Andreas' suggestion dropped DIMMBus concept. > > =A0 =A0 > * Added hotplug binding for bus-less devices > > =A0 =A0 > * DIMM device is split to backend and frontend. Therefo= re following > > =A0 =A0 > =A0 command/options were added for supporting it: > > =A0 =A0 > > > =A0 =A0 > =A0 For memory-ram backend: > > =A0 =A0 > =A0 =A0 =A0 CLI: -object-add memory-ram, > > =A0 =A0 > =A0 =A0 =A0 =A0 =A0 with options: 'id' and 'size' > > =A0 =A0 > =A0 For dimm frontend: > > =A0 =A0 > =A0 =A0 =A0 option "size" became readonly, pulling it's= size from > attached > > =A0 =A0 backend > > =A0 =A0 > =A0 =A0 =A0 added option "memdev" for specifying backen= d by 'id' > > =A0 =A0 > > > =A0 =A0 > * dropped support for 32 bit guests > > =A0 =A0 > * failed hotplug action doesn't consume 1 slot anymore > > =A0 =A0 > * vaious fixes adressing reviewer's comments most of th= em in ACPI > part > > =A0 =A0 > --- > > =A0 =A0 > > > =A0 =A0 > This series allows to hotplug 'arbitrary' DIMM devices = specifying > size, > > =A0 =A0 > NUMA node mapping (guest side), slot and address where = to map it, > at > > =A0 =A0 runtime. > > =A0 =A0 > > > =A0 =A0 > Due to ACPI limitation there is need to specify a numbe= r of > possible > > =A0 =A0 > DIMM devices. For this task -m option was extended to s= upport > > =A0 =A0 > following format: > > =A0 =A0 > > > =A0 =A0 > =A0 -m [mem=3D]RamSize[,slots=3DN,maxmem=3DM] > > =A0 =A0 > > > =A0 =A0 > To allow memory hotplug user must specify a pair of add= itional > > =A0 =A0 parameters: > > =A0 =A0 > =A0 =A0 'slots' - number of possible increments > > =A0 =A0 > =A0 =A0 'maxmem' - max possible total memory size QEMU = is allowed to > use, > > =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0including RamSize. > > =A0 =A0 > > > =A0 =A0 > minimal monitor command syntax to hotplug DIMM device: > > =A0 =A0 > > > =A0 =A0 > =A0 object_add memory-ram,id=3DmemX,size=3D1G > > =A0 =A0 > =A0 device_add pc-dimm,id=3DdimmX,memdev=3DmemX > > =A0 =A0 > > > =A0 =A0 > pc-dimm device provides following properties that could= be used > with > > =A0 =A0 > device_add / -device to alter default behavior: > > =A0 =A0 > > > =A0 =A0 > =A0 id =A0 =A0- unique string identifying device [manda= tory] > > =A0 =A0 > =A0 slot =A0- number in range [0-slots) [optional], if = not specified > > =A0 =A0 > =A0 =A0 =A0 =A0 =A0 the first free slot is used > > =A0 =A0 > =A0 node =A0- NUMA node id [optional] (default: 0) > > =A0 =A0 > =A0 size =A0- amount of memory to add, readonly derived= from backing > memdev > > =A0 =A0 > =A0 addr - guest's physical address where to plug DIMM = [optional], > > =A0 =A0 > =A0 =A0 =A0 =A0 =A0 if not specified the first gap in h= otplug memory region > > =A0 =A0 > =A0 =A0 =A0 =A0 =A0 that fits DIMM is used > > =A0 =A0 > > > =A0 =A0 > =A0-device option could be used for adding potentially = hotunplugable > DIMMs > > =A0 =A0 > and also for specifying hotplugged DIMMs in migration c= ase. > > =A0 =A0 > > > =A0 =A0 > Tested guests: > > =A0 =A0 > =A0- RHEL 6x64 > > =A0 =A0 > =A0- Windows 2012DCx64 > > =A0 =A0 > =A0- Windows 2008DCx64 > > =A0 =A0 > > > =A0 =A0 > Known limitations/bugs/TODOs: > > =A0 =A0 > =A0- hot-remove is not supported, yet > > =A0 =A0 > =A0- max number of supported DIMM devices 256 (due to A= CPI object > name > > =A0 =A0 > =A0 =A0limit), could be increased creating several cont= ainers and > putting > > =A0 =A0 > =A0 =A0DIMMs there. (exercise for future) > > =A0 =A0 > =A0- e820 table doesn't include DIMM devices added with= -device / > > =A0 =A0 > =A0 =A0(or after reboot devices added with device_add) > > =A0 =A0 > =A0- Windows 2008 remembers DIMM configuration, so if D= IMM with other > > =A0 =A0 > =A0 =A0addr/size is added into the same slot, it refuse= s to use it > insisting > > =A0 =A0 > =A0 =A0on old mapping. > > =A0 =A0 > > > =A0 =A0 > QEMU git tree for testing is available at: > > =A0 =A0 > =A0 https://github.com/imammedo/qemu/commits/memory-hot= plug-v11 > > =A0 =A0 > > > =A0 =A0 > Example QEMU cmd line: > > =A0 =A0 > =A0 qemu-system-x86_64 -enable-kvm -monitor unix:/tmp/ > mon,server,nowait \ > > =A0 =A0 > =A0 =A0 =A0-m 4096,slots=3D4,maxmem=3D8G guest.img > > =A0 =A0 > > > =A0 =A0 > PS: > > =A0 =A0 > =A0 Windows guest requires SRAT table for hotplug to wo= rk so add an > extra > > =A0 =A0 option: > > =A0 =A0 > =A0 =A0-numa node > > =A0 =A0 > > > =A0 =A0 > Igor Mammedov (32): > > =A0 =A0 > =A0 pc: create custom generic PC machine type > > =A0 =A0 > =A0 pc: ACPI BIOS: use enum for defining memory affinit= y flags > > =A0 =A0 > =A0 object_add: allow completion handler to get canonic= al path > > =A0 =A0 > =A0 vl.c: daemonize before guest memory allocation > > =A0 =A0 > =A0 add memdev backend infrastructure > > =A0 =A0 > =A0 vl.c: extend -m option to support options for memor= y hotplug > > =A0 =A0 > =A0 qdev: hotplug for buss-less devices > > =A0 =A0 > =A0 qdev: expose DeviceState.hotplugged field as a prop= erty > > =A0 =A0 > =A0 memory: add memory_region_is_mapped() API > > =A0 =A0 > =A0 pc-dimm: do not allow to set already used memdev > > =A0 =A0 > =A0 pc: initialize memory hotplug address space > > =A0 =A0 > =A0 pc: exit QEMU if number of slots more than supporte= d 256 > > =A0 =A0 > =A0 pc: add 'etc/reserved-memory-end' fw_cfg interface = for SeaBIOS > > =A0 =A0 > =A0 pc: exit QEMU if compat machine doesn't support mem= ory hotlpug > > =A0 =A0 > =A0 pc: add memory hotplug handler to PC_MACHINE > > =A0 =A0 > =A0 pc-dimm: add busy address check and address auto-al= location > > =A0 =A0 > =A0 pc-dimm: add busy slot check and slot auto-allocati= on > > =A0 =A0 > =A0 acpi: rename cpu_hotplug_defs.h to pc-hotplug.h > > =A0 =A0 > =A0 acpi: memory hotplug ACPI hardware implementation > > =A0 =A0 > =A0 trace: add acpi memory hotplug IO region events > > =A0 =A0 > =A0 trace: pc: add PC_DIMM slot & address allocation > > =A0 =A0 > =A0 acpi:piix4: allow plug/unlug callbacks handle not o= nly PCI > devices > > =A0 =A0 > =A0 acpi:piix4: add memory hotplug handling > > =A0 =A0 > =A0 pc: ich9 lpc: make it work with global/compat prope= rties > > =A0 =A0 > =A0 acpi:ich9: add memory hotplug handling > > =A0 =A0 > =A0 pc: migrate piix4 & ich9 MemHotplugState > > =A0 =A0 > =A0 pc: add acpi-device link to PCMachineState > > =A0 =A0 > =A0 pc: propagate memory hotplug event to ACPI device > > =A0 =A0 > =A0 pc: ACPI BIOS: implement memory hotplug interface > > =A0 =A0 > =A0 pc: add "hotplug-memory-region-size" property to PC= _MACHINE > > =A0 =A0 > =A0 pc: ACPI BIOS: reserve SRAT entry for hotplug mem h= ole > > =A0 =A0 > =A0 pc: ACPI BIOS: make GPE.3 handle memory hotplug eve= nt on PIIX and > Q35 > > =A0 =A0 > =A0 =A0 machines > > =A0 =A0 > > > =A0 =A0 > Vasilis Liaskovitis (1): > > =A0 =A0 > =A0 pc: implement pc-dimm device abstraction > > =A0 =A0 > > > =A0 =A0 > =A0backends/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 | =A0= =A02 + > > =A0 =A0 > =A0backends/hostmem-ram.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 54 ++++++++ > > =A0 =A0 > =A0backends/hostmem.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |= =A0 97 +++++++++++++++ > > =A0 =A0 > =A0default-configs/i386-softmmu.mak =A0 | =A0 =A01 + > > =A0 =A0 > =A0default-configs/x86_64-softmmu.mak | =A0 =A01 + > > =A0 =A0 > =A0docs/specs/acpi_mem_hotplug.txt =A0 =A0| =A0 44 ++++= +++ > > =A0 =A0 > =A0hw/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 =A01 + > > =A0 =A0 > =A0hw/acpi/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0= =A01 + > > =A0 =A0 > =A0hw/acpi/ich9.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 62 ++++++++++ > > =A0 =A0 > =A0hw/acpi/memory_hotplug.c =A0 =A0 =A0 =A0 =A0 | =A018= 7 > ++++++++++++++++++++++++++++ > > =A0 =A0 > =A0hw/acpi/piix4.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 74 ++++++++++-- > > =A0 =A0 > =A0hw/core/qdev.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 30 +++++ > > =A0 =A0 > =A0hw/i386/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0= =A03 +- > > =A0 =A0 > =A0hw/i386/acpi-build.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 75 ++++++++++- > > =A0 =A0 > =A0hw/i386/acpi-dsdt.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0= =A07 +- > > =A0 =A0 > =A0hw/i386/pc.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 | =A0227 > > =A0 =A0 ++++++++++++++++++++++++++++++++++- > > =A0 =A0 > =A0hw/i386/pc_piix.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 51 +++++--- > > =A0 =A0 > =A0hw/i386/pc_q35.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 25 +++- > > =A0 =A0 > =A0hw/i386/q35-acpi-dsdt.dsl =A0 =A0 =A0 =A0 =A0| =A0 =A0= 7 +- > > =A0 =A0 > =A0hw/i386/ssdt-mem.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 77 ++++++++++++ > > =A0 =A0 > =A0hw/i386/ssdt-misc.dsl =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0= 164 > +++++++++++++++++++++++++ > > =A0 =A0 > =A0hw/isa/lpc_ich9.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0 33 +++++- > > =A0 =A0 > =A0hw/mem/Makefile.objs =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= =A01 + > > =A0 =A0 > =A0hw/mem/pc-dimm.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= | =A0236 > > =A0 =A0 ++++++++++++++++++++++++++++++++++++ > > =A0 =A0 > =A0hw/mips/mips_malta.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= =A02 +- > > =A0 =A0 > =A0include/exec/memory.h =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0= =A08 ++ > > =A0 =A0 > =A0include/hw/acpi/acpi.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0= =A06 + > > =A0 =A0 > =A0include/hw/acpi/cpu_hotplug.h =A0 =A0 =A0| =A0 =A02 = +- > > =A0 =A0 > =A0include/hw/acpi/cpu_hotplug_defs.h | =A0 32 ----- > > =A0 =A0 > =A0include/hw/acpi/ich9.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0= =A04 + > > =A0 =A0 > =A0include/hw/acpi/memory_hotplug.h =A0 | =A0 37 ++++++ > > =A0 =A0 > =A0include/hw/acpi/pc-hotplug.h =A0 =A0 =A0 | =A0 56 ++= +++++++ > > =A0 =A0 > =A0include/hw/boards.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|= =A0 10 ++ > > =A0 =A0 > =A0include/hw/i386/pc.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0= 64 ++++++++++- > > =A0 =A0 > =A0include/hw/mem/pc-dimm.h =A0 =A0 =A0 =A0 =A0 | =A0 7= 9 ++++++++++++ > > =A0 =A0 > =A0include/sysemu/hostmem.h =A0 =A0 =A0 =A0 =A0 | =A0 6= 0 +++++++++ > > =A0 =A0 > =A0memory.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 | =A0 10 ++- > > =A0 =A0 > =A0qemu-options.hx =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 =A09 +- > > =A0 =A0 > =A0qmp.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0| =A0 11 ++- > > =A0 =A0 > =A0trace-events =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 | =A0 17 +++ > > =A0 =A0 > =A0vl.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 | =A0 64 +++++++++- > > =A0 =A0 > =A041 files changed, 1829 insertions(+), 102 deletions(= -) > > =A0 =A0 > =A0create mode 100644 backends/hostmem-ram.c > > =A0 =A0 > =A0create mode 100644 backends/hostmem.c > > =A0 =A0 > =A0create mode 100644 docs/specs/acpi_mem_hotplug.txt > > =A0 =A0 > =A0create mode 100644 hw/acpi/memory_hotplug.c > > =A0 =A0 > =A0create mode 100644 hw/i386/ssdt-mem.dsl > > =A0 =A0 > =A0create mode 100644 hw/mem/Makefile.objs > > =A0 =A0 > =A0create mode 100644 hw/mem/pc-dimm.c > > =A0 =A0 > =A0delete mode 100644 include/hw/acpi/cpu_hotplug_defs.= h > > =A0 =A0 > =A0create mode 100644 include/hw/acpi/memory_hotplug.h > > =A0 =A0 > =A0create mode 100644 include/hw/acpi/pc-hotplug.h > > =A0 =A0 > =A0create mode 100644 include/hw/mem/pc-dimm.h > > =A0 =A0 > =A0create mode 100644 include/sysemu/hostmem.h > > > > > > >=20 >=20