1. 16 7月, 2007 2 次提交
  2. 03 5月, 2007 13 次提交
  3. 19 4月, 2007 1 次提交
    • A
      KVM: Fix off-by-one when writing to a nonpae guest pde · 6b8d0f9b
      Avi Kivity 提交于
      Nonpae guest pdes are shadowed by two pae ptes, so we double the offset
      twice: once to account for the pte size difference, and once because we
      need to shadow pdes for a single guest pde.
      
      But when writing to the upper guest pde we also need to truncate the
      lower bits, otherwise the multiply shifts these bits into the pde index
      and causes an access to the wrong shadow pde.  If we're at the end of the
      page (accessing the very last guest pde) we can even overflow into the
      next host page and oops.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      6b8d0f9b
  4. 18 3月, 2007 2 次提交
    • A
      KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram · 27aba766
      Avi Kivity 提交于
      PAGE_MASK is an unsigned long, so using it to mask physical addresses on
      i386 (which are 64-bit wide) leads to truncation.  This can result in
      page->private of unrelated memory pages being modified, with disasterous
      results.
      
      Fix by not using PAGE_MASK for physical addresses; instead calculate
      the correct value directly from PAGE_SIZE.  Also fix a similar BUG_ON().
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      27aba766
    • A
      KVM: MMU: Fix guest writes to nonpae pde · ac1b714e
      Avi Kivity 提交于
      KVM shadow page tables are always in pae mode, regardless of the guest
      setting.  This means that a guest pde (mapping 4MB of memory) is mapped
      to two shadow pdes (mapping 2MB each).
      
      When the guest writes to a pte or pde, we intercept the write and emulate it.
      We also remove any shadowed mappings corresponding to the write.  Since the
      mmu did not account for the doubling in the number of pdes, it removed the
      wrong entry, resulting in a mismatch between shadow page tables and guest
      page tables, followed shortly by guest memory corruption.
      
      This patch fixes the problem by detecting the special case of writing to
      a non-pae pde and adjusting the address and number of shadow pdes zapped
      accordingly.
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      ac1b714e
  5. 04 3月, 2007 1 次提交
  6. 10 2月, 2007 1 次提交
  7. 27 1月, 2007 2 次提交
  8. 06 1月, 2007 18 次提交