PPC: openpic_kvm: Filter memory events properly
PATCH 1/1 PPC: openpic_kvm: Filter memory events properly
Commit 6f1834a2b exposed a bug in openpic_kvm where we don't filter for memory events that only happen to the region we want to know events about.
Add proper filtering, fixing the e500plat target with KVM.
Signed-off-by Alexander Graf <[email protected]>
--- hw/intc/openpic_kvm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
hw/intc/openpic_kvm.c +10 -0
@@ -118,6 +118,11 @@ static void kvm_openpic_region_add(MemoryListener *listener,abort (); } +/* Ignore events on regions that are not us */ +if (section->mr != &opp->mem) { +return ; + } + reg_base = section->offset_within_address_space; attr.group =KVM_DEV_MPIC_GRP_MISC ;
@@ -140,6 +145,11 @@ static void kvm_openpic_region_del(MemoryListener *listener,uint64_t reg_base =0 ;int ret; +/* Ignore events on regions that are not us */ +if (section->mr != &opp->mem) { +return ; + } + attr.group =KVM_DEV_MPIC_GRP_MISC ; attr.attr =KVM_DEV_MPIC_BASE_ADDR ; attr.addr = (uint64_t )(unsigned long )®_base;
Signature · 1 line
1.8.1.4
Quoted 7 lines · Alexander Graf
Commit
6f1834a2bexposed a bug inopenpic_kvmwhere we don't filter for memory events that only happen to the region we want to know events about.Add proper filtering, fixing the e500plat target with KVM.
Signed-off-by Alexander Graf <[email protected]>
Acked-by Scott Wood <[email protected]>
-Scott
Peter Maydell
AppliedQuoted 7 lines · Alexander Graf
Commit
6f1834a2bexposed a bug inopenpic_kvmwhere we don't filter for memory events that only happen to the region we want to know events about.Add proper filtering, fixing the e500plat target with KVM.
Signed-off-by Alexander Graf <[email protected]>
Applied, thanks.
-- PMM