[Top][All Lists]

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

[QEMU TCG] Qeustion about the PCID Feature in TCG

From: Kaifeng Xu
Subject: [QEMU TCG] Qeustion about the PCID Feature in TCG
Date: Thu, 28 Jan 2021 17:20:21 -0500

I am running QEMU in TCG mode (my server doesn't have kvm support), and I am getting the memory traces in a x86 guest machine of all memory accesses, including the PCID (process-context identifier, and I need that for my current research), on a linux host. I have seen the TCG PCID feature flag is commented out in target/i386/cpu.c, and if I directly emulate a CPU which has PCID flag I got the warning: 

warning: TCG doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]

so I uncommented the CPUID_EXT_PCID in TCG_EXT_FEATURES, and the CPUID_7_0_EBX_INVPCID in TCG_7_0_EBX_FEATURES, in  target/i386/cpu.c. I have seen the PCID in the cr3 register in cpu get set, my question is that I am not sure if there will be any issues with this flag. Why is it commented out by default?

Just in case, I will put my commands here. Here are my configurations for compiling:

./configure --prefix=/tigress/kaifengx/sysroot/ --target-list=x86_64-softmmu,x86_64-linux-user --disable-kvm --disable-vnc --enable-gtk --enable-plugins

And my command for running the QEMU:

qemu-system-x86_64 \
    -cpu qemu64,+pcid\
    -m 4G \
    -icount shift=0 \
    -drive if=virtio,file=${DISK},cache=none \
    -device pqii \
    -trace events=`pwd`/events \
    -D ${LOG_FILE} \
    -net user,hostfwd=tcp::10022-:22 \
    -net nic \
    -display none \
    -nographic \
    -plugin QEMU_PATH/tests/plugin/libtlb.so,arg=inline,arg=io

Kaifeng Xu
Electrical Engineering
Princeton University
Mobile Phone: 6094011564

reply via email to

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