qemu-discuss
[Top][All Lists]
Advanced

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

Re: [QEMU TCG] Qeustion about the PCID Feature in TCG


From: Alex Bennée
Subject: Re: [QEMU TCG] Qeustion about the PCID Feature in TCG
Date: Thu, 18 Feb 2021 11:43:14 +0000
User-agent: mu4e 1.5.8; emacs 28.0.50

Kaifeng Xu <kaifengx@princeton.edu> writes:

> Hi,
> 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?

Typically the TCG implementation of x86 is fairly behind the features
that may be reported or need to be handled for KVM. For example TCG
doesn't support the most recent AVX instructions.

I can't speak to how much effort it would be to implement PCID for x86
TCG, that is probably a question best aimed at the maintainers for the
architecture (cc'd).

> 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*

Ahh good to see another plugin user. Be aware I just recently posted
a pull request that fixes some recent breakages in the inline handling.

What are you trying to measure with the plugin?

-- 
Alex Bennée



reply via email to

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