On Wed, Jun 27, 2018 at 3:13 PM, Liran Alon <liran.alon@xxxxxxxxxx> wrote: > > On 28/06/18 00:41, Sean Christopherson wrote: >> >> On Sat, Jun 23, 2018 at 02:35:22AM +0300, Liran Alon wrote: >>> >>> From: Jim Mattson <jmattson@xxxxxxxxxx> >>> >>> Haswell and later hardware masks off the irrelevant bits if the guest >>> access rights fields on vmwrite, storing only the 13 relevant >>> bits. This masking isn't documented anywhere. When using VMCS >>> shadowing for these fields, these fields will be masked when written >>> to the shadow vmcs12. For consistency, mask these fields when the >>> vmwrite is handled in software. >> >> Is there software that actively relies on this hardware behavior >> or is this more of a cosmetic issue, e.g. it causes failures in a >> fuzzer or memory checker of some form? >> >> Not that it really matters, but I think it'd be more correct to >> model this behavior in the VMREAD path. >> > > > Because you think that CPU writes full content to access right field in VMCS > memory > but VMREAD is the one that actually mask the content? VMWRITE definitely does not write the full content to memory. The VMCS format for Haswell and later packs the access rights fields. (You can verify this by doing a VMCLEAR.)