On 14/10/21 13:30, Liu, Jing2 wrote:
I guess we're worrying about is when KVM is sched_out, a nonzero XFD_ERR can be lost by other host thread. We can save guest XFD_ERR in sched_out and restore before next vmenter. Kernel is assumed not using AMX thus softirq won't make it lost. I think this solves the problem. So we can directly passthrough RW of it, and no need to rdmsr(XFD_ERR) in vmexit.
Correct; you can also use the "user-return MSRs" machinery (until Linux starts using AMX in the kernel, but that shouldn't happen too soon).
Paolo