x86: Assign a canonical address before execute invpcid
Accidently we see pcid test failed as INVPCID_DESC[127:64] is uninitialized before execute invpcid. According to Intel spec: "#GP If INVPCID_TYPE is 0 and the linear address in INVPCID_DESC[127:64] is not canonical." By zeroing the whole invpcid_desc structure, ensure the address canonical and reserved bit zero in desc. Also change invpcid_desc to be clearly 128bit in size no matter in 64bit or 32bit mode to match the description in spec. Fixes: b44d84da ("Add PCID/INVPCID test") Suggested-by:Sean Christopherson <seanjc@google.com> Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220117084618.442906-1-zhenzhong.duan@intel.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading
Please register or sign in to comment