Skip to content
Commit fb0e760a authored by Zhenzhong Duan's avatar Zhenzhong Duan Committed by Paolo Bonzini
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20220117084618.442906-1-zhenzhong.duan@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 342db9a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment