qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Property '.hmat' not found


From: Eduardo Habkost
Subject: Re: Property '.hmat' not found
Date: Wed, 18 Nov 2020 07:31:56 -0500

On Wed, Nov 18, 2020 at 06:16:36PM +0800, 郭俊甫 (Jack Kuo) wrote:
> >
> > Could you check what happens if you use
> > "-machine pc-i440fx-5.2,hmat=on" instead of "-machine hmat=on"?
> 
> 
> It failed, but `-machine pc-i440fx-4.2` worked without `hmat` option.
> So, the problem could be that I didn't fully compile QEMU, which specified
> `--target-list=x86_64-softmmu` in the configure command.
> 
> Thus, I re-compile QEMU without any additional arg, then the problem is
> solved!
> It's strange that `-machine pc,help` showed me `pc-i440fx-5.2` but actually
> loaded the `pc-i440fx-4.2`.

Yeah, it is strange.  Were the "-version" and "-machine pc,help"
commands executed on a different shell process?  If you have
installed a new qemu-system-x86_64 binary in a separate location
in $PATH (e.g. /usr/local/bin), existing shell processes might
still run the old binary if the old path was already in their
hash table.

> 
> BTW, originally, I thought that `-hmat-cache` is the arg for customizing
> CPU cache, and now I find that I'm wrong... It's for memory side cache.

Correct.  Unfortunately, there are not many CPU cache
configuration options in qemu-system-x86_64 today, except for
"l3-cache" and "host-cache-info" -cpu options.

> 
> Thank you very much, really help me a lot.

No problem!

> 
> Sincerely,
> Jack
> 
> Eduardo Habkost <ehabkost@redhat.com> 於 2020年11月17日 週二 下午11:09寫道:
> 
> > On Tue, Nov 17, 2020 at 11:49:38AM +0800, 郭俊甫 (Jack Kuo) wrote:
> > > >
> > > > Do you have the output of `qemu-system-x86_64 -version`, and more
> > > > information on how your binary was built?
> > >
> > >
> > > I have 2 machines, both of them encounter the .hmat problem.
> > >
> > > (1) *5.1.90 (v5.2.0-rc0*)
> > >     - follow this wiki [1], and configure cmd: `./configure
> > > --target-list=x86_64-softmmu`
> > >     - i5-8400, Ubuntu 20.04.1 LTS, kernel: 5.4.0-53-generic
> >
> > This one is supposed to work, and I see the pc-i440fx-5.2.hmat
> > property below.
> >
> >
> > >
> > > (2) *4.2.1 (Debian 1:4.2-3ubuntu6.8)*
> >
> > This one isn't expect to have "hmat", as the feature was
> > introduced in v5.0.0.
> >
> > >     - use apt install qemu
> > >     - E5-2670 * 2, Ubuntu 20.04.1 LTS, kernel: 5.4.0-53-generic, Dell
> > > PowerEdge-R720
> > >
> > > I can't reproduce it here.  I've tested both qemu.git master
> > >
> > >
> > > That’s strange, also I try the command you (Eduardo) provided, '.hmat'
> > not
> > > found, too.
> > > Does the kernel module matter? or PC architecture?
> >
> > Kernel or host architecture shouldn't matter.  The choice of
> > machine type matters, but the default is supposed to be "pc".
> > The output of "-machine help" might be useful to debug it.
> >
> > Could you check what happens if you use
> > "-machine pc-i440fx-5.2,hmat=on" instead of "-machine hmat=on"?
> >
> >
> > >
> > > Output of `-machine help` and `-machine pc,help` would be useful
> > > > to debug it, too.
> > >
> > >
> > >  (1) *5.1.90 (i5-8400)*
> > > *```*
> > > $ qemu-system-x86_64 -machine pc,help
> > > pc-i440fx-5.2.nvdimm-persistence=string (Set NVDIMM persistenceValid
> > values
> > > are cpu, mem-ctrl)
> > > pc-i440fx-5.2.hmat=bool (Set on/off to enable/disable ACPI Heterogeneous
> > > Memory Attribute Table (HMAT))
> > > pc-i440fx-5.2.nvdimm=bool (Set on/off to enable/disable NVDIMM
> > > instantiation)
> > > pc-i440fx-5.2.pcspk-audiodev=str (ID of an audiodev to use as a backend)
> > > pc-i440fx-5.2.pflash1=str (Node name or ID of a block device to use as a
> > > backend)
> > > pc-i440fx-5.2.pflash0=str (Node name or ID of a block device to use as a
> > > backend)
> > > pc-i440fx-5.2.hpet=bool
> > > pc-i440fx-5.2.vmport=OnOffAuto (Enable vmport (pc & q35))
> > > pc-i440fx-5.2.sata=bool
> > > pc-i440fx-5.2.pit=bool
> > > pc-i440fx-5.2.max-ram-below-4g=size (Maximum ram below the 4G boundary
> > > (32bit boundary))
> > > pc-i440fx-5.2.smbus=bool
> > > pc-i440fx-5.2.acpi=OnOffAuto (Enable ACPI)
> > > pc-i440fx-5.2.smm=OnOffAuto (Enable SMM)
> > > pc-i440fx-5.2.memory-backend=string (Set RAM backendValid value is ID of
> > > hostmem based backend)
> > > pc-i440fx-5.2.firmware=string (Firmware image)
> > > pc-i440fx-5.2.initrd=string (Linux initial ramdisk file)
> > > pc-i440fx-5.2.dumpdtb=string (Dump current dtb to a file and quit)
> > > pc-i440fx-5.2.kernel=string (Linux kernel image file)
> > > pc-i440fx-5.2.dt-compatible=string (Overrides the "compatible" property
> > of
> > > the dt root node)
> > > pc-i440fx-5.2.mem-merge=bool (Enable/disable memory merge support)
> > > pc-i440fx-5.2.suppress-vmdesc=bool (Set on to disable self-describing
> > > migration)
> > > pc-i440fx-5.2.append=string (Linux kernel command line)
> > > pc-i440fx-5.2.dump-guest-core=bool (Include guest memory in a core dump)
> > > pc-i440fx-5.2.phandle-start=int (The first phandle ID we may generate
> > > dynamically)
> > > pc-i440fx-5.2.usb=bool (Set on/off to enable/disable usb)
> > > pc-i440fx-5.2.dtb=string (Linux kernel device tree file)
> > > pc-i440fx-5.2.memory-encryption=string (Set memory encryption object to
> > use)
> > > pc-i440fx-5.2.graphics=bool (Set on/off to enable/disable graphics
> > > emulation)
> > > ```
> > >
> > > (2) *4.2.1 (E5-2670 * 2)*
> > > *```*
> > > qemu-system-x86_64 -machine pc,help
> > > pc-i440fx-4.2.nvdimm-persistence=string (Set NVDIMM persistenceValid
> > values
> > > are cpu, mem-ctrl)
> > > pc-i440fx-4.2.pflash0=str (Node name or ID of a block device to use as a
> > > backend)
> > > pc-i440fx-4.2.nvdimm=bool (Set on/off to enable/disable NVDIMM
> > > instantiation)
> > > pc-i440fx-4.2.pflash1=str (Node name or ID of a block device to use as a
> > > backend)
> > > pc-i440fx-4.2.vmport=OnOffAuto (Enable vmport (pc & q35))
> > > pc-i440fx-4.2.sata=bool
> > > pc-i440fx-4.2.pit=bool
> > > pc-i440fx-4.2.smm=OnOffAuto (Enable SMM (pc & q35))
> > > pc-i440fx-4.2.smbus=bool
> > > pc-i440fx-4.2.max-ram-below-4g=size (Maximum ram below the 4G boundary
> > > (32bit boundary))
> > > pc-i440fx-4.2.suppress-vmdesc=bool (Set on to disable self-describing
> > > migration)
> > > pc-i440fx-4.2.append=string (Linux kernel command line)
> > > pc-i440fx-4.2.accel=string (Accelerator list)
> > > pc-i440fx-4.2.dtb=string (Linux kernel device tree file)
> > > pc-i440fx-4.2.mem-merge=bool (Enable/disable memory merge support)
> > > pc-i440fx-4.2.dumpdtb=string (Dump current dtb to a file and quit)
> > > pc-i440fx-4.2.phandle-start=int (The first phandle ID we may generate
> > > dynamically)
> > > pc-i440fx-4.2.igd-passthru=bool (Set on/off to enable/disable igd
> > passthrou)
> > > pc-i440fx-4.2.kvm-shadow-mem=int (KVM shadow MMU size)
> > > pc-i440fx-4.2.dump-guest-core=bool (Include guest memory in a core dump)
> > > pc-i440fx-4.2.memory-encryption=string (Set memory encryption object to
> > use)
> > > pc-i440fx-4.2.firmware=string (Firmware image)
> > > pc-i440fx-4.2.usb=bool (Set on/off to enable/disable usb)
> > > pc-i440fx-4.2.kernel-irqchip=on|off|split (Configure KVM in-kernel
> > irqchip)
> > > pc-i440fx-4.2.graphics=bool (Set on/off to enable/disable graphics
> > > emulation)
> > > pc-i440fx-4.2.initrd=string (Linux initial ramdisk file)
> > > pc-i440fx-4.2.dt-compatible=string (Overrides the "compatible" property
> > of
> > > the dt root node)
> > > pc-i440fx-4.2.kernel=string (Linux kernel image file)
> > > pc-i440fx-4.2.enforce-config-section=bool (Set on to enforce
> > configuration
> > > section migration)
> > > ```
> > >
> > > [1] https://wiki.qemu.org/Hosts/Linux#Building_QEMU_for_Linux
> > >
> > > Sincerely,
> > > Jack
> > >
> > > Eduardo Habkost <ehabkost@redhat.com> 於 2020年11月17日 週二 上午3:02寫道:
> > >
> > > > On Mon, Nov 16, 2020 at 01:51:37PM +0100, Philippe Mathieu-Daudé wrote:
> > > > > Cc'ing Igor & Eduardo.
> > > >
> > > > Thanks!
> > > >
> > > > >
> > > > > On 11/13/20 10:17 AM, Jack wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > As I follow the document[1] to enable hmat, it fails and shows the
> > > > message:
> > > > > >   qemu-system-x86_64: Property '.hmat' not found
> > > > > >
> > > > > > My QEMU version is 5.1.90
> > > >
> > > > Do you have the output of `qemu-system-x86_64 -version`, and more
> > > > information on how your binary was built?
> > > >
> > > > Output of `-machine help` and `-machine pc,help` would be useful
> > > > to debug it, too.
> > > >
> > > > I can't reproduce it here.  I've tested both qemu.git master
> > > > (commit cb5ed407a1dd) and v5.2.0-rc (commit 3d6e32347a3b).
> > > >
> > > >   [build/(cb5ed407a1...)]$ ./qemu-system-x86_64 -version
> > > >   QEMU emulator version 5.1.91 (v5.2.0-rc1-107-gcb5ed407a1)
> > > >   Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project
> > developers
> > > >   [build/(cb5ed407a1...)]$ ./qemu-system-x86_64 -machine hmat=on -m 2G
> > > > -object memory-backend-ram,size=1G,id=m0 -object
> > > > memory-backend-ram,size=1G,id=m1 -smp 2 -numa node,nodeid=0,memdev=m0
> > -numa
> > > > node,nodeid=1,memdev=m1,initiator=0 -numa cpu ,node-id=0,socket-id=0
> > -numa
> > > > cpu,node-id=0,socket-id=1 -numa
> > > >
> > hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5
> > > > -numa
> > > >
> > hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M
> > > > -numa
> > > >
> > hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10
> > > > -numa
> > > >
> > hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M
> > > > -numa
> > > >
> > hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8
> > > > -numa
> > > >
> > hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8
> > > > -cpu host -vga virtio -accel kvm
> > > >   [VM boots]
> > > >
> > > >
> > > > > >
> > > > > > Does anyone know why?
> > > > > >
> > > > > > Here is my command:
> > > > > >
> > > > > > ```
> > > > > > $ sudo qemu-system-x86_64 \
> > > > > > -machine hmat=on \
> > > > > > -m 2G \
> > > > > > -object memory-backend-ram,size=1G,id=m0 \
> > > > > > -object memory-backend-ram,size=1G,id=m1 \
> > > > > > -smp 2 \
> > > > > > -numa node,nodeid=0,memdev=m0 \
> > > > > > -numa node,nodeid=1,memdev=m1,initiator=0 \
> > > > > > -numa cpu,node-id=0,socket-id=0 \
> > > > > > -numa cpu,node-id=0,socket-id=1 \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5
> > > > > > \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M
> > > > > > \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10
> > > > > > \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M
> > > > > > \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8
> > > > > > \
> > > > > > -numa
> > > > > >
> > > >
> > hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8
> > > > > > \
> > > > > > -cpu host \
> > > > > > -m 4g -vga virtio -hda ubuntu20.04.qcow2 \
> > > > > > -nic user,model=virtio \
> > > > > > -nic tap,model=e1000 \
> > > > > > -nic tap,model=e1000 \
> > > > > > -accel kvm
> > > > > > ```
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > [1]
> > > > > >
> > > >
> > https://www.qemu.org/docs/master/system/qemu-manpage.html?highlight=numa
> > > > > >
> > > > > >
> > > > > > Sincerely,
> > > > > > Jack
> > > > > >
> > > > >
> > > >
> > > > --
> > > > Eduardo
> > > >
> > > >
> >
> > --
> > Eduardo
> >
> >

-- 
Eduardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]