diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-06 14:36:15 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:46 +0200 |
commit | 1b5ec2346703c060d26ada7d95fe9aaf476b1947 (patch) | |
tree | 8fb0f0308a8390e5674d6dfac7d2b96e98f3767d /target-i386/kvm.c | |
parent | 7443b43758ba5eeca8f81ca15fe9fced8983be26 (diff) |
memory: return MemoryRegion from qemu_ram_addr_from_host
It will be needed in the next patch.
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r-- | target-i386/kvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 39f4fbb3cf..4b557b3a38 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -318,7 +318,7 @@ int kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) if ((env->mcg_cap & MCG_SER_P) && addr && (code == BUS_MCEERR_AR || code == BUS_MCEERR_AO)) { - if (qemu_ram_addr_from_host(addr, &ram_addr) || + if (qemu_ram_addr_from_host(addr, &ram_addr) == NULL || !kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) { fprintf(stderr, "Hardware memory error for memory used by " "QEMU itself instead of guest system!\n"); @@ -350,7 +350,7 @@ int kvm_arch_on_sigbus(int code, void *addr) hwaddr paddr; /* Hope we are lucky for AO MCE */ - if (qemu_ram_addr_from_host(addr, &ram_addr) || + if (qemu_ram_addr_from_host(addr, &ram_addr) == NULL || !kvm_physical_memory_addr_from_host(CPU(first_cpu)->kvm_state, addr, &paddr)) { fprintf(stderr, "Hardware memory error for memory used by " |