Hello,
HAP paging mode guests use direct MSR read/write into the VMCS/VMCB
for the guest PAT table, while the current save/restore code was
accessing only the pat_cr field in hvm_vcpu, used when intercepting
the MSR mostly in shadow mode (the Intel scenario is a bit more
complicated).
This patch fixes this issue creating a new couple of hvm_funcs,
get/set_guest_pat, that access the right PAT table based on the paging
mode and guest configuration.
As a major caveat, I haven't tested this patch on AMD, for lack of hardware.