mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
7443b43758
commit
1b5ec23467
4 changed files with 26 additions and 19 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue