translate-all: make less of tb_invalidate_phys_page_range depend on is_cpu_write_access
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Apr 2015 12:20:35 +0000 (14:20 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jun 2015 15:09:59 +0000 (17:09 +0200)
commitfc377bcf617a48233a99a9fe0a26247c38b5cb76
tree3cc88d6f4d2758195ba9a3568d97ba469741d3f3
parent9564f52da7eb061326956ed9a468935e3352512d
translate-all: make less of tb_invalidate_phys_page_range depend on is_cpu_write_access

is_cpu_write_access is only set if tb_invalidate_phys_page_range is called
from tb_invalidate_phys_page_fast, and hence from notdirty_mem_write.
However:

- the code bitmap can be built directly in tb_invalidate_phys_page_fast
  (unconditionally, since is_cpu_write_access would always be passed as 1);

- the virtual address is not needed to mark the page as "not containing
  code" (dirty code bitmap = 1), so we can also remove that use of
  is_cpu_write_access.  For calls of tb_invalidate_phys_page_range
  that do not come from notdirty_mem_write, the next call to
  notdirty_mem_write will notice that the page does not contain code
  anymore, and will fix up the TLB entry.

The parameter needs to remain in order to guard accesses to cpu->mem_io_pc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
translate-all.c