diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-11-17 17:09:33 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-01-15 18:57:50 +0100 |
commit | 76c64d33601a4948d6f72022992574a75b6fab97 (patch) | |
tree | 184d3890142d5bec526e0b7a422803be14743e17 /tpm.c | |
parent | 3daa41078aedf227ec98b0d1c9d56b77b6d20153 (diff) |
target-i386: do not duplicate page protection checks
x86_cpu_handle_mmu_fault is currently checking twice for writability
and executability of pages; the first time to decide whether to
trigger a page fault, the second time to compute the "prot" argument
to tlb_set_page_with_attrs.
Reorganize code so that first "prot" is computed, then it is used
to check whether to raise a page fault, then finally PROT_WRITE is
removed if the D bit will have to be set.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tpm.c')
0 files changed, 0 insertions, 0 deletions