qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] kvm: Fix incorrect re-register of in-kernel MPIC
@ 2014-09-03 17:38 Bogdan Purcareata
  2014-09-03 17:38 ` [Qemu-devel] [PATCH 1/2] memory: Add MemoryRegion get address space offset helper function Bogdan Purcareata
  2014-09-03 17:38 ` [Qemu-devel] [PATCH 2/2] kvm-openpic: Filter region add callbacks based on memory region offset Bogdan Purcareata
  0 siblings, 2 replies; 3+ messages in thread
From: Bogdan Purcareata @ 2014-09-03 17:38 UTC (permalink / raw)
  To: qemu-devel

On target-ppc, the kvm-openpic memory region is part of the E500-CCSR memory
region. On the kernel side, the MPIC is mapped at the same offset as the
kvm-openpic within the address space.

When adding the PCI BAR0 memory region, an alias is created to point to the
E500-CCSR memory region. This results in firing the kvm_openpic_region_add once
more, since kvm-openpic is part of the latter. Only this time, the offset is
wrong - it's part of the PCI memory region. This leads to the in-kernel MPIC to
be remapped at a wrong address, and thus all traps to the kvm-openpic
address to be emulated in userspace.

The fix consists in an additional filter in kvm_openpic_region_add to consider
only addresses matching the start of the kvm-openpic memory region.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-03 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 17:38 [Qemu-devel] [PATCH 0/2] kvm: Fix incorrect re-register of in-kernel MPIC Bogdan Purcareata
2014-09-03 17:38 ` [Qemu-devel] [PATCH 1/2] memory: Add MemoryRegion get address space offset helper function Bogdan Purcareata
2014-09-03 17:38 ` [Qemu-devel] [PATCH 2/2] kvm-openpic: Filter region add callbacks based on memory region offset Bogdan Purcareata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).