Re: [PATCH 6/7] target/i386: implement RDPID in TCG

2023-06-20 Thread Paolo Bonzini
On Mon, Jun 19, 2023 at 9:40 AM Richard Henderson wrote: > What is our minimum glibc version? This requires 2.29. Ok, I'll add a test to meson.build. > Also, not especially fond of the placement. target/ including linux-user/ > header isn't > nice. Might as well just place these 3 lines in m

Re: [PATCH 6/7] target/i386: implement RDPID in TCG

2023-06-19 Thread Richard Henderson
On 6/18/23 23:51, Paolo Bonzini wrote: RDPID corresponds to a RDMSR(TSC_AUX); however, it is unprivileged so for user-mode emulation we must provide the value that the kernel places in the MSR. For Linux, it is a combination of the current CPU and the current NUMA node, both of which can be retr

[PATCH 6/7] target/i386: implement RDPID in TCG

2023-06-18 Thread Paolo Bonzini
RDPID corresponds to a RDMSR(TSC_AUX); however, it is unprivileged so for user-mode emulation we must provide the value that the kernel places in the MSR. For Linux, it is a combination of the current CPU and the current NUMA node, both of which can be retrieved with getcpu(2). For BSD, just retur