kvm: libkvm: kvm_show_code() for ROM code
Userland-located memory is not unconditionally available via
kvm->physical_memory + guest_address. To let kvm_show_code also dump
useful information when, e.g., some problem in ROM (BIOS...) occurs,
this patch tries to obtain the memory content via the mmio_read
callback. If the callback fails, the code byte is marked as invalid.
This patch also removes the check for protected mode and dumps the code
in any case - I didn't find the reason for this restriction.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>