[PATCH v3] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-08-22 Thread Jingqi Liu
s and PCMachineState::node_mem, since they are just copied from MachineState::numa_state. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jingqi Liu --- hw/i386/acpi-build.c | 12 +++- hw/i386/pc.c | 9 - include/hw/i386/pc.h | 4 3 files changed, 7 inserti

[PATCH v2] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-08-05 Thread Jingqi Liu
We can get NUMA information completely from MachineState::numa_state. Remove PCMachineState::numa_nodes and PCMachineState::node_mem, since they are just copied from MachineState::numa_state. Signed-off-by: Jingqi Liu --- hw/i386/acpi-build.c | 12 +++- hw/i386/pc.c | 9

[PATCH] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-08-02 Thread Jingqi Liu
The NUMA information in PCMachineState is copied from MachineState. We get this information uniformly from struct NumaState in MachineState. Signed-off-by: Jingqi Liu --- hw/i386/acpi-build.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c b

[PATCH v2 1/1] nvdimm: add 'target-node' option

2021-07-18 Thread Jingqi Liu
reconfigure-device dax0.0 --mode=system-ram There are two existing NUMA nodes in Guest. After these operations, persistent memory is configured as a separate Node 2 and can be used as a volatile memory. This NUMA node is dynamically created according to 'target-node'. Signed-off-by:

[PATCH v2 0/1] nvdimm: add 'target-node' option

2021-07-18 Thread Jingqi Liu
rget-node' properties mutually exclusive. Create a callback of nvdimm_pre_plug() for checking whether the 'target-node' is correct. v1: - It's the initial version. Jingqi Liu (1): nvdimm: add 'target-node' option docs/nvdimm.txt

[PATCH] nvdimm: add 'target-node' option

2021-06-24 Thread Jingqi Liu
reconfigure-device dax0.0 --mode=system-ram There are two existing NUMA nodes in Guest. After these operations, persistent memory is configured as a separate Node 2 and can be used as a volatile memory. This NUMA node is dynamically created according to 'target-node'. Signed-off-by:

[PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-08-02 Thread Jingqi Liu
sync memory range“ So we add 'pmem=on' to avoid calling msync(), use the QEMU command line: -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G Reviewed-by: Stefan Hajnoczi Reviewed-by: Pankaj Gupta Signed-off-by: Jingqi Liu --- docs/nvdimm.txt | 7 +++

[PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-29 Thread Jingqi Liu
sync memory range“ So we add 'pmem=on' to avoid calling msync(), use the QEMU command line: -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G Reviewed-by: Stefan Hajnoczi Signed-off-by: Jingqi Liu --- docs/nvdimm.txt | 7 +++ 1 file changed, 7 inse

[PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file

2020-07-14 Thread Jingqi Liu
sync memory range“ So we add 'pmem=on' to avoid calling msync(), use the QEMU command line: -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G Signed-off-by: Jingqi Liu --- docs/nvdimm.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/nv

[PATCH v3 3/3] configure: add libdaxctl support

2020-04-29 Thread Jingqi Liu
of: pmem/ndctl/daxctl/lib/libdaxctl.c. Reviewed-by: Joao Martins Signed-off-by: Jingqi Liu --- configure | 29 + 1 file changed, 29 insertions(+) diff --git a/configure b/configure index e225a1e3ff..d2418084c1 100755 --- a/configure +++ b/configure @@

[PATCH v3 2/3] docs/nvdimm: add description of alignment requirement of device dax

2020-04-29 Thread Jingqi Liu
For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option needs to match the alignment requirement of the device dax. It must be larger than or equal to the 'align' of device dax. Reviewed-by: Joao Martins Signed-off-by: Jingqi Liu --- docs/nvdimm.txt | 10 ++

[PATCH v3 1/3] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-29 Thread Jingqi Liu
s less than the devdax pmem file 'align'. Suggested-by: Dan Williams Reviewed-by: Joao Martins Signed-off-by: Jingqi Liu --- exec.c | 54 +- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index d

[PATCH v3 0/3] fetch the alignment of device dax

2020-04-29 Thread Jingqi Liu
cs/nvdimm.txt. v2: - Per Paolo and Dan's suggestions, fetch the alignment of device dax through libdaxctl APIs. v1: - The initial version. Fetch the alignment through "/sys/dev/char/%d:%d/device/align". Jingqi Liu (3): exec: fetch the alignment of Linux dev

[PATCH v2 1/3] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-04-14 Thread Jingqi Liu
s less than the devdax pmem file 'align'. Suggested-by: Dan Williams Signed-off-by: Jingqi Liu --- exec.c | 54 +- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index de9d949902..2c3444e47e 100644 --- a

[PATCH v2 2/3] docs/nvdimm: add description of alignment requirement of device dax

2020-04-14 Thread Jingqi Liu
For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option needs to match the alignment requirement of the device dax. It must be larger than or equal to the 'align' of device dax. Signed-off-by: Jingqi Liu --- docs/nvdimm.txt | 9 + 1 file changed, 9 inserti

[PATCH v2 0/3] fetch the alignment of device dax

2020-04-14 Thread Jingqi Liu
[1] Libdaxctl is a part of ndctl project. The project's repository is: https://github.com/pmem/ndctl Changelog: v2: Per Paolo and Dan suggestions, fetch the alignment of device dax through libdaxctl APIs. v1: The initial version. Fetch the alignment through "/sys/dev/cha

[PATCH v2 3/3] configure: add libdaxctl support

2020-04-14 Thread Jingqi Liu
tl/daxctl/lib/libdaxctl.c. Signed-off-by: Jingqi Liu --- configure | 30 ++ 1 file changed, 30 insertions(+) diff --git a/configure b/configure index e225a1e3ff..df1752cf08 100755 --- a/configure +++ b/configure @@ -509,6 +509,7 @@ libpmem="" default_devic

[PATCH] exec: fetch the alignment of Linux devdax pmem character device nodes

2020-03-31 Thread Jingqi Liu
so that we can compare it with the NUM of 'align=NUM'. The NUM needs to be larger than or equal to the devdax pmem file 'align'. It also fixes the problem that mmap() returns failure in qemu_ram_mmap() when the NUM of 'align=NUM' is less than the devdax pme

[PATCH] util: fix to check if target OS is linux in util/mmap-alloc.c

2020-03-06 Thread Jingqi Liu
The CONFIG_LINUX symbol is always undefined before including "qemu/osdep.h". Use __linux__ to check if target OS is linux instead of CONFIG_LINUX. Signed-off-by: Jingqi Liu --- util/mmap-alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/mmap-allo

[PATCH] util: fix to get configuration macros in util/mmap-alloc.c

2020-03-05 Thread Jingqi Liu
The CONFIG_LINUX symbol is always not defined in this file. This fixes that "config-host.h" header file is not included for getting macros. Signed-off-by: Jingqi Liu --- util/mmap-alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/mmap-alloc.c b/util/mmap-all

[Qemu-devel] [PATCH 0/3] x86/cpu: Enable a few new cpu features

2018-07-10 Thread Jingqi Liu
-programming-reference.pdf Jingqi Liu (3): x86/cpu: Enable UMONITOR/UMWAIT/TPAUSE cpu features x86/cpu: Enable MOVDIRI cpu feature x86/cpu: Enable MOVDIR64B cpu feature target/i386/cpu.c | 6 +++--- target/i386/cpu.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -- 1.8.3.1

[Qemu-devel] [PATCH 2/3] x86/cpu: Enable MOVDIRI cpu feature

2018-07-10 Thread Jingqi Liu
: https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf Signed-off-by: Jingqi Liu --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target

[Qemu-devel] [PATCH 1/3] x86/cpu: Enable UMONITOR/UMWAIT/TPAUSE cpu features

2018-07-10 Thread Jingqi Liu
-reference.pdf Signed-off-by: Jingqi Liu --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index e0e2f2e..e0d151f 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -978,7 +978,7

[Qemu-devel] [PATCH 3/3] x86/cpu: Enable MOVDIR64B cpu feature

2018-07-10 Thread Jingqi Liu
: https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf Signed-off-by: Jingqi Liu --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target

[Qemu-devel] [PATCH] i386: Add support to get/set/migrate MSR (33H)

2018-07-04 Thread Jingqi Liu
The MSR (33H) controls support for #AC exception for split locked accesses. When bit 29 of the MSR (33H) is set, the processor causes an #AC exception to be issued instead of suppressing LOCK on bus (during split lock access). Signed-off-by: Jingqi Liu --- target/i386/cpu.h | 2 ++ target

[Qemu-devel] [PATCH] kvm: x86: Add support for -machine split-lock-ac

2018-07-04 Thread Jingqi Liu
exception to be issued instead of suppressing LOCK on bus(during split lock access). Signed-off-by: Jingqi Liu --- accel/kvm/kvm-all.c | 10 ++ hw/core/machine.c | 19 +++ include/hw/boards.h | 1 + linux-headers/linux/kvm.h | 1 + qemu-options.hx

[Qemu-devel] [PATCH] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature

2018-05-02 Thread Jingqi Liu
below link: https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf Signed-off-by: Jingqi Liu --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.