Re: [PATCH v2 10/10] target/i386: implement RDPID in TCG

2023-06-20 Thread Richard Henderson
On 6/20/23 17:16, 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 v2 10/10] target/i386: implement RDPID in TCG

2023-06-20 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