diff options
| author | Sean Christopherson <[email protected]> | 2020-03-02 18:02:34 -0800 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2020-03-16 17:57:42 +0100 |
| commit | a102a674e423f41eed3bcdfe887287b7a68fb735 (patch) | |
| tree | 613a5bd0e6ddced936b7fa97c91a225ea69d4c0e /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | e743664bea8e04d2735b958fe912e7cce3ab350f (diff) | |
KVM: x86/mmu: Don't drop level/direct from MMU role calculation
Use the calculated role as-is when propagating it to kvm_mmu.mmu_role,
i.e. stop masking off meaningful fields. The concept of masking off
fields came from kvm_mmu_pte_write(), which (correctly) ignores certain
fields when comparing kvm_mmu_page.role against kvm_mmu.mmu_role, e.g.
the current mmu's access and level have no relation to a shadow page's
access and level.
Masking off the level causes problems for 5-level paging, e.g. CR4.LA57
has its own redundant flag in the extended role, and nested EPT would
need a similar hack to support 5-level paging for L2.
Opportunistically rework the mask for kvm_mmu_pte_write() to define the
fields that should be ignored as opposed to the fields that should be
checked, i.e. make it opt-out instead of opt-in so that new fields are
automatically picked up. While doing so, stop ignoring "direct". The
field is effectively ignored anyways because kvm_mmu_pte_write() is only
reached with an indirect mmu and the loop only walks indirect shadow
pages, but double checking "direct" literally costs nothing.
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions