« Previous | Next » 

Revision 8f6f962b

ID8f6f962b994e1402935055ac7093ac977ccc9a5c

Added by Avi Kivity about 12 years ago

kvm: fix unaligned slots

kvm_set_phys_mem() may be passed sections that are not aligned to a page
boundary. The current code simply brute-forces the alignment which leads
to an inconsistency and an abort().

Fix by aligning the start and the end of the section correctly, discarding
and unaligned head or tail.

This was triggered by a guest sizing a 64-bit BAR that is smaller than a page
with PCI_COMMAND_MEMORY enabled and the upper dword clear.

Signed-off-by: Avi Kivity <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences