[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] f874bf: exec: Handle multipage ranges in inva

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f874bf: exec: Handle multipage ranges in invalidate_and_se...
Date: Tue, 18 Nov 2014 03:30:06 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f874bf905ff2f8dcc17acbfc61e49a92a6f4d04b
  Author: Peter Maydell <address@hidden>
  Date:   2014-11-18 (Tue, 18 Nov 2014)

  Changed paths:
    M exec.c
    M include/exec/ram_addr.h

  Log Message:
  exec: Handle multipage ranges in invalidate_and_set_dirty()

The code in invalidate_and_set_dirty() needs to handle addr/length
combinations which cross guest physical page boundaries. This can happen,
for example, when disk I/O reads large blocks into guest RAM which previously
held code that we have cached translations for. Unfortunately we were only
checking the clean/dirty status of the first page in the range, and then
were calling a tb_invalidate function which only handles ranges that don't
cross page boundaries. Fix the function to deal with multipage ranges.

The symptoms of this bug were that guest code would misbehave (eg segfault),
in particular after a guest reboot but potentially any time the guest
reused a page of its physical RAM for new code.

Cc: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden

reply via email to

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