qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-i386: do not duplicate page protection c


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] target-i386: do not duplicate page protection checks
Date: Thu, 17 Dec 2015 08:43:39 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 12/17/2015 06:00 AM, Paolo Bonzini wrote:
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.

Signed-off-by: Paolo Bonzini<address@hidden>
---
  target-i386/helper.c | 65 +++++++++++++++++++---------------------------------
  1 file changed, 23 insertions(+), 42 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]