From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1DFBA91795 for ; Thu, 2 Feb 2023 12:04:04 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E61F9B15D for ; Thu, 2 Feb 2023 12:04:03 +0100 (CET) Received: from bastionodiso.odiso.net (bastionodiso.odiso.net [185.151.191.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 2 Feb 2023 12:03:56 +0100 (CET) Received: from kvmformation3.odiso.net (formationkvm3.odiso.net [10.3.94.12]) by bastionodiso.odiso.net (Postfix) with ESMTP id 078B98108; Thu, 2 Feb 2023 12:03:50 +0100 (CET) Received: by kvmformation3.odiso.net (Postfix, from userid 0) id F02C722A61C; Thu, 2 Feb 2023 12:03:49 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Thu, 2 Feb 2023 12:03:33 +0100 Message-Id: <20230202110344.840195-3-aderumier@odiso.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230202110344.840195-1-aderumier@odiso.com> References: <20230202110344.840195-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.082 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods NO_DNS_FOR_FROM 0.001 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [8006.pid] Subject: [pve-devel] [PATCH v3 qemu-server 02/13] tests: add memory tests X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2023 11:04:04 -0000 Signed-off-by: Alexandre Derumier --- test/cfg2cmd/memory-hotplug-hugepages.conf | 12 ++ .../cfg2cmd/memory-hotplug-hugepages.conf.cmd | 62 +++++++ test/cfg2cmd/memory-hotplug.conf | 11 ++ test/cfg2cmd/memory-hotplug.conf.cmd | 174 ++++++++++++++++++ test/cfg2cmd/memory-hugepages-1g.conf | 11 ++ test/cfg2cmd/memory-hugepages-1g.conf.cmd | 30 +++ test/cfg2cmd/memory-hugepages-2m.conf | 11 ++ test/cfg2cmd/memory-hugepages-2m.conf.cmd | 30 +++ test/run_config2command_tests.pl | 15 ++ 9 files changed, 356 insertions(+) create mode 100644 test/cfg2cmd/memory-hotplug-hugepages.conf create mode 100644 test/cfg2cmd/memory-hotplug-hugepages.conf.cmd create mode 100644 test/cfg2cmd/memory-hotplug.conf create mode 100644 test/cfg2cmd/memory-hotplug.conf.cmd create mode 100644 test/cfg2cmd/memory-hugepages-1g.conf create mode 100644 test/cfg2cmd/memory-hugepages-1g.conf.cmd create mode 100644 test/cfg2cmd/memory-hugepages-2m.conf create mode 100644 test/cfg2cmd/memory-hugepages-2m.conf.cmd diff --git a/test/cfg2cmd/memory-hotplug-hugepages.conf b/test/cfg2cmd/memory-hotplug-hugepages.conf new file mode 100644 index 0000000..6cba31e --- /dev/null +++ b/test/cfg2cmd/memory-hotplug-hugepages.conf @@ -0,0 +1,12 @@ +# TEST: memory hotplug with 1GB hugepage +# QEMU_VERSION: 3.0 +cores: 2 +memory: 18432 +name: simple +numa: 1 +ostype: l26 +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 2 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +hotplug: memory +hugepages: 1024 \ No newline at end of file diff --git a/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd b/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd new file mode 100644 index 0000000..6d4d8e8 --- /dev/null +++ b/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd @@ -0,0 +1,62 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'simple,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '4,sockets=2,cores=2,maxcpus=4' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 'size=2048,slots=255,maxmem=524288M' \ + -object 'memory-backend-file,id=ram-node0,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \ + -object 'memory-backend-file,id=ram-node1,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \ + -object 'memory-backend-file,id=mem-dimm0,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' \ + -object 'memory-backend-file,id=mem-dimm1,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' \ + -object 'memory-backend-file,id=mem-dimm2,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' \ + -object 'memory-backend-file,id=mem-dimm3,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1' \ + -object 'memory-backend-file,id=mem-dimm4,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm4,memdev=mem-dimm4,node=0' \ + -object 'memory-backend-file,id=mem-dimm5,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm5,memdev=mem-dimm5,node=1' \ + -object 'memory-backend-file,id=mem-dimm6,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm6,memdev=mem-dimm6,node=0' \ + -object 'memory-backend-file,id=mem-dimm7,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm7,memdev=mem-dimm7,node=1' \ + -object 'memory-backend-file,id=mem-dimm8,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm8,memdev=mem-dimm8,node=0' \ + -object 'memory-backend-file,id=mem-dimm9,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm9,memdev=mem-dimm9,node=1' \ + -object 'memory-backend-file,id=mem-dimm10,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm10,memdev=mem-dimm10,node=0' \ + -object 'memory-backend-file,id=mem-dimm11,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm11,memdev=mem-dimm11,node=1' \ + -object 'memory-backend-file,id=mem-dimm12,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm12,memdev=mem-dimm12,node=0' \ + -object 'memory-backend-file,id=mem-dimm13,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm13,memdev=mem-dimm13,node=1' \ + -object 'memory-backend-file,id=mem-dimm14,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm14,memdev=mem-dimm14,node=0' \ + -object 'memory-backend-file,id=mem-dimm15,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -device 'pc-dimm,id=dimm15,memdev=mem-dimm15,node=1' \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc' diff --git a/test/cfg2cmd/memory-hotplug.conf b/test/cfg2cmd/memory-hotplug.conf new file mode 100644 index 0000000..386e61f --- /dev/null +++ b/test/cfg2cmd/memory-hotplug.conf @@ -0,0 +1,11 @@ +# TEST: basic memory hotplug +# QEMU_VERSION: 3.0 +cores: 2 +memory: 66560 +name: simple +numa: 1 +ostype: l26 +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 2 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +hotplug: memory diff --git a/test/cfg2cmd/memory-hotplug.conf.cmd b/test/cfg2cmd/memory-hotplug.conf.cmd new file mode 100644 index 0000000..2da7955 --- /dev/null +++ b/test/cfg2cmd/memory-hotplug.conf.cmd @@ -0,0 +1,174 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'simple,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '4,sockets=2,cores=2,maxcpus=4' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 'size=1024,slots=255,maxmem=524288M' \ + -object 'memory-backend-ram,id=ram-node0,size=512M' \ + -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \ + -object 'memory-backend-ram,id=ram-node1,size=512M' \ + -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \ + -object 'memory-backend-ram,id=mem-dimm0,size=512M' \ + -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' \ + -object 'memory-backend-ram,id=mem-dimm1,size=512M' \ + -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' \ + -object 'memory-backend-ram,id=mem-dimm2,size=512M' \ + -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' \ + -object 'memory-backend-ram,id=mem-dimm3,size=512M' \ + -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1' \ + -object 'memory-backend-ram,id=mem-dimm4,size=512M' \ + -device 'pc-dimm,id=dimm4,memdev=mem-dimm4,node=0' \ + -object 'memory-backend-ram,id=mem-dimm5,size=512M' \ + -device 'pc-dimm,id=dimm5,memdev=mem-dimm5,node=1' \ + -object 'memory-backend-ram,id=mem-dimm6,size=512M' \ + -device 'pc-dimm,id=dimm6,memdev=mem-dimm6,node=0' \ + -object 'memory-backend-ram,id=mem-dimm7,size=512M' \ + -device 'pc-dimm,id=dimm7,memdev=mem-dimm7,node=1' \ + -object 'memory-backend-ram,id=mem-dimm8,size=512M' \ + -device 'pc-dimm,id=dimm8,memdev=mem-dimm8,node=0' \ + -object 'memory-backend-ram,id=mem-dimm9,size=512M' \ + -device 'pc-dimm,id=dimm9,memdev=mem-dimm9,node=1' \ + -object 'memory-backend-ram,id=mem-dimm10,size=512M' \ + -device 'pc-dimm,id=dimm10,memdev=mem-dimm10,node=0' \ + -object 'memory-backend-ram,id=mem-dimm11,size=512M' \ + -device 'pc-dimm,id=dimm11,memdev=mem-dimm11,node=1' \ + -object 'memory-backend-ram,id=mem-dimm12,size=512M' \ + -device 'pc-dimm,id=dimm12,memdev=mem-dimm12,node=0' \ + -object 'memory-backend-ram,id=mem-dimm13,size=512M' \ + -device 'pc-dimm,id=dimm13,memdev=mem-dimm13,node=1' \ + -object 'memory-backend-ram,id=mem-dimm14,size=512M' \ + -device 'pc-dimm,id=dimm14,memdev=mem-dimm14,node=0' \ + -object 'memory-backend-ram,id=mem-dimm15,size=512M' \ + -device 'pc-dimm,id=dimm15,memdev=mem-dimm15,node=1' \ + -object 'memory-backend-ram,id=mem-dimm16,size=512M' \ + -device 'pc-dimm,id=dimm16,memdev=mem-dimm16,node=0' \ + -object 'memory-backend-ram,id=mem-dimm17,size=512M' \ + -device 'pc-dimm,id=dimm17,memdev=mem-dimm17,node=1' \ + -object 'memory-backend-ram,id=mem-dimm18,size=512M' \ + -device 'pc-dimm,id=dimm18,memdev=mem-dimm18,node=0' \ + -object 'memory-backend-ram,id=mem-dimm19,size=512M' \ + -device 'pc-dimm,id=dimm19,memdev=mem-dimm19,node=1' \ + -object 'memory-backend-ram,id=mem-dimm20,size=512M' \ + -device 'pc-dimm,id=dimm20,memdev=mem-dimm20,node=0' \ + -object 'memory-backend-ram,id=mem-dimm21,size=512M' \ + -device 'pc-dimm,id=dimm21,memdev=mem-dimm21,node=1' \ + -object 'memory-backend-ram,id=mem-dimm22,size=512M' \ + -device 'pc-dimm,id=dimm22,memdev=mem-dimm22,node=0' \ + -object 'memory-backend-ram,id=mem-dimm23,size=512M' \ + -device 'pc-dimm,id=dimm23,memdev=mem-dimm23,node=1' \ + -object 'memory-backend-ram,id=mem-dimm24,size=512M' \ + -device 'pc-dimm,id=dimm24,memdev=mem-dimm24,node=0' \ + -object 'memory-backend-ram,id=mem-dimm25,size=512M' \ + -device 'pc-dimm,id=dimm25,memdev=mem-dimm25,node=1' \ + -object 'memory-backend-ram,id=mem-dimm26,size=512M' \ + -device 'pc-dimm,id=dimm26,memdev=mem-dimm26,node=0' \ + -object 'memory-backend-ram,id=mem-dimm27,size=512M' \ + -device 'pc-dimm,id=dimm27,memdev=mem-dimm27,node=1' \ + -object 'memory-backend-ram,id=mem-dimm28,size=512M' \ + -device 'pc-dimm,id=dimm28,memdev=mem-dimm28,node=0' \ + -object 'memory-backend-ram,id=mem-dimm29,size=512M' \ + -device 'pc-dimm,id=dimm29,memdev=mem-dimm29,node=1' \ + -object 'memory-backend-ram,id=mem-dimm30,size=512M' \ + -device 'pc-dimm,id=dimm30,memdev=mem-dimm30,node=0' \ + -object 'memory-backend-ram,id=mem-dimm31,size=512M' \ + -device 'pc-dimm,id=dimm31,memdev=mem-dimm31,node=1' \ + -object 'memory-backend-ram,id=mem-dimm32,size=1024M' \ + -device 'pc-dimm,id=dimm32,memdev=mem-dimm32,node=0' \ + -object 'memory-backend-ram,id=mem-dimm33,size=1024M' \ + -device 'pc-dimm,id=dimm33,memdev=mem-dimm33,node=1' \ + -object 'memory-backend-ram,id=mem-dimm34,size=1024M' \ + -device 'pc-dimm,id=dimm34,memdev=mem-dimm34,node=0' \ + -object 'memory-backend-ram,id=mem-dimm35,size=1024M' \ + -device 'pc-dimm,id=dimm35,memdev=mem-dimm35,node=1' \ + -object 'memory-backend-ram,id=mem-dimm36,size=1024M' \ + -device 'pc-dimm,id=dimm36,memdev=mem-dimm36,node=0' \ + -object 'memory-backend-ram,id=mem-dimm37,size=1024M' \ + -device 'pc-dimm,id=dimm37,memdev=mem-dimm37,node=1' \ + -object 'memory-backend-ram,id=mem-dimm38,size=1024M' \ + -device 'pc-dimm,id=dimm38,memdev=mem-dimm38,node=0' \ + -object 'memory-backend-ram,id=mem-dimm39,size=1024M' \ + -device 'pc-dimm,id=dimm39,memdev=mem-dimm39,node=1' \ + -object 'memory-backend-ram,id=mem-dimm40,size=1024M' \ + -device 'pc-dimm,id=dimm40,memdev=mem-dimm40,node=0' \ + -object 'memory-backend-ram,id=mem-dimm41,size=1024M' \ + -device 'pc-dimm,id=dimm41,memdev=mem-dimm41,node=1' \ + -object 'memory-backend-ram,id=mem-dimm42,size=1024M' \ + -device 'pc-dimm,id=dimm42,memdev=mem-dimm42,node=0' \ + -object 'memory-backend-ram,id=mem-dimm43,size=1024M' \ + -device 'pc-dimm,id=dimm43,memdev=mem-dimm43,node=1' \ + -object 'memory-backend-ram,id=mem-dimm44,size=1024M' \ + -device 'pc-dimm,id=dimm44,memdev=mem-dimm44,node=0' \ + -object 'memory-backend-ram,id=mem-dimm45,size=1024M' \ + -device 'pc-dimm,id=dimm45,memdev=mem-dimm45,node=1' \ + -object 'memory-backend-ram,id=mem-dimm46,size=1024M' \ + -device 'pc-dimm,id=dimm46,memdev=mem-dimm46,node=0' \ + -object 'memory-backend-ram,id=mem-dimm47,size=1024M' \ + -device 'pc-dimm,id=dimm47,memdev=mem-dimm47,node=1' \ + -object 'memory-backend-ram,id=mem-dimm48,size=1024M' \ + -device 'pc-dimm,id=dimm48,memdev=mem-dimm48,node=0' \ + -object 'memory-backend-ram,id=mem-dimm49,size=1024M' \ + -device 'pc-dimm,id=dimm49,memdev=mem-dimm49,node=1' \ + -object 'memory-backend-ram,id=mem-dimm50,size=1024M' \ + -device 'pc-dimm,id=dimm50,memdev=mem-dimm50,node=0' \ + -object 'memory-backend-ram,id=mem-dimm51,size=1024M' \ + -device 'pc-dimm,id=dimm51,memdev=mem-dimm51,node=1' \ + -object 'memory-backend-ram,id=mem-dimm52,size=1024M' \ + -device 'pc-dimm,id=dimm52,memdev=mem-dimm52,node=0' \ + -object 'memory-backend-ram,id=mem-dimm53,size=1024M' \ + -device 'pc-dimm,id=dimm53,memdev=mem-dimm53,node=1' \ + -object 'memory-backend-ram,id=mem-dimm54,size=1024M' \ + -device 'pc-dimm,id=dimm54,memdev=mem-dimm54,node=0' \ + -object 'memory-backend-ram,id=mem-dimm55,size=1024M' \ + -device 'pc-dimm,id=dimm55,memdev=mem-dimm55,node=1' \ + -object 'memory-backend-ram,id=mem-dimm56,size=1024M' \ + -device 'pc-dimm,id=dimm56,memdev=mem-dimm56,node=0' \ + -object 'memory-backend-ram,id=mem-dimm57,size=1024M' \ + -device 'pc-dimm,id=dimm57,memdev=mem-dimm57,node=1' \ + -object 'memory-backend-ram,id=mem-dimm58,size=1024M' \ + -device 'pc-dimm,id=dimm58,memdev=mem-dimm58,node=0' \ + -object 'memory-backend-ram,id=mem-dimm59,size=1024M' \ + -device 'pc-dimm,id=dimm59,memdev=mem-dimm59,node=1' \ + -object 'memory-backend-ram,id=mem-dimm60,size=1024M' \ + -device 'pc-dimm,id=dimm60,memdev=mem-dimm60,node=0' \ + -object 'memory-backend-ram,id=mem-dimm61,size=1024M' \ + -device 'pc-dimm,id=dimm61,memdev=mem-dimm61,node=1' \ + -object 'memory-backend-ram,id=mem-dimm62,size=1024M' \ + -device 'pc-dimm,id=dimm62,memdev=mem-dimm62,node=0' \ + -object 'memory-backend-ram,id=mem-dimm63,size=1024M' \ + -device 'pc-dimm,id=dimm63,memdev=mem-dimm63,node=1' \ + -object 'memory-backend-ram,id=mem-dimm64,size=2048M' \ + -device 'pc-dimm,id=dimm64,memdev=mem-dimm64,node=0' \ + -object 'memory-backend-ram,id=mem-dimm65,size=2048M' \ + -device 'pc-dimm,id=dimm65,memdev=mem-dimm65,node=1' \ + -object 'memory-backend-ram,id=mem-dimm66,size=2048M' \ + -device 'pc-dimm,id=dimm66,memdev=mem-dimm66,node=0' \ + -object 'memory-backend-ram,id=mem-dimm67,size=2048M' \ + -device 'pc-dimm,id=dimm67,memdev=mem-dimm67,node=1' \ + -object 'memory-backend-ram,id=mem-dimm68,size=2048M' \ + -device 'pc-dimm,id=dimm68,memdev=mem-dimm68,node=0' \ + -object 'memory-backend-ram,id=mem-dimm69,size=2048M' \ + -device 'pc-dimm,id=dimm69,memdev=mem-dimm69,node=1' \ + -object 'memory-backend-ram,id=mem-dimm70,size=2048M' \ + -device 'pc-dimm,id=dimm70,memdev=mem-dimm70,node=0' \ + -object 'memory-backend-ram,id=mem-dimm71,size=2048M' \ + -device 'pc-dimm,id=dimm71,memdev=mem-dimm71,node=1' \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc' diff --git a/test/cfg2cmd/memory-hugepages-1g.conf b/test/cfg2cmd/memory-hugepages-1g.conf new file mode 100644 index 0000000..8db2cca --- /dev/null +++ b/test/cfg2cmd/memory-hugepages-1g.conf @@ -0,0 +1,11 @@ +# TEST: memory wih 1gb hugepages +# QEMU_VERSION: 3.0 +cores: 2 +memory: 8192 +name: simple +numa: 1 +ostype: l26 +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 2 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +hugepages: 1024 \ No newline at end of file diff --git a/test/cfg2cmd/memory-hugepages-1g.conf.cmd b/test/cfg2cmd/memory-hugepages-1g.conf.cmd new file mode 100644 index 0000000..63792d2 --- /dev/null +++ b/test/cfg2cmd/memory-hugepages-1g.conf.cmd @@ -0,0 +1,30 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'simple,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '4,sockets=2,cores=2,maxcpus=4' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 8192 \ + -object 'memory-backend-file,id=ram-node0,size=4096M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \ + -object 'memory-backend-file,id=ram-node1,size=4096M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc' diff --git a/test/cfg2cmd/memory-hugepages-2m.conf b/test/cfg2cmd/memory-hugepages-2m.conf new file mode 100644 index 0000000..f0d65fb --- /dev/null +++ b/test/cfg2cmd/memory-hugepages-2m.conf @@ -0,0 +1,11 @@ +# TEST: memory wih 2mb hugepages +# QEMU_VERSION: 3.0 +cores: 2 +memory: 8192 +name: simple +numa: 1 +ostype: l26 +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 2 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +hugepages: 2 \ No newline at end of file diff --git a/test/cfg2cmd/memory-hugepages-2m.conf.cmd b/test/cfg2cmd/memory-hugepages-2m.conf.cmd new file mode 100644 index 0000000..287c0ed --- /dev/null +++ b/test/cfg2cmd/memory-hugepages-2m.conf.cmd @@ -0,0 +1,30 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'simple,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '4,sockets=2,cores=2,maxcpus=4' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 8192 \ + -object 'memory-backend-file,id=ram-node0,size=4096M,mem-path=/run/hugepages/kvm/2048kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \ + -object 'memory-backend-file,id=ram-node1,size=4096M,mem-path=/run/hugepages/kvm/2048kB,share=on,prealloc=yes' \ + -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \ + -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \ + -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -machine 'type=pc' diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index f097811..dafc3b8 100755 --- a/test/run_config2command_tests.pl +++ b/test/run_config2command_tests.pl @@ -178,6 +178,21 @@ $qemu_server_config->mock( }, ); +my $qemu_server_memory; +$qemu_server_memory = Test::MockModule->new('PVE::QemuServer::Memory'); +$qemu_server_memory->mock( + page_chunk => sub { + return 1; + }, + host_numanode_exist => sub { + my ($id) = @_; + return 1; + }, + get_host_phys_address_bits => sub { + return 46; + } +); + my $pve_common_tools; $pve_common_tools = Test::MockModule->new('PVE::Tools'); $pve_common_tools->mock( -- 2.30.2