mirror of https://github.com/xemu-project/xemu.git
kvm: require KVM_CAP_INTERNAL_ERROR_DATA
This was introduced in KVM in Linux 2.6.33, we can require it unconditionally. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
cd08948840
commit
aacec9aee1
|
@ -111,6 +111,7 @@ static const KVMCapabilityInfo kvm_required_capabilites[] = {
|
||||||
KVM_CAP_INFO(USER_MEMORY),
|
KVM_CAP_INFO(USER_MEMORY),
|
||||||
KVM_CAP_INFO(DESTROY_MEMORY_REGION_WORKS),
|
KVM_CAP_INFO(DESTROY_MEMORY_REGION_WORKS),
|
||||||
KVM_CAP_INFO(JOIN_MEMORY_REGIONS_WORKS),
|
KVM_CAP_INFO(JOIN_MEMORY_REGIONS_WORKS),
|
||||||
|
KVM_CAP_INFO(INTERNAL_ERROR_DATA),
|
||||||
KVM_CAP_LAST_INFO
|
KVM_CAP_LAST_INFO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2794,16 +2795,14 @@ static void kvm_handle_io(uint16_t port, MemTxAttrs attrs, void *data, int direc
|
||||||
|
|
||||||
static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
|
static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
fprintf(stderr, "KVM internal error. Suberror: %d\n",
|
fprintf(stderr, "KVM internal error. Suberror: %d\n",
|
||||||
run->internal.suberror);
|
run->internal.suberror);
|
||||||
|
|
||||||
if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {
|
for (i = 0; i < run->internal.ndata; ++i) {
|
||||||
int i;
|
fprintf(stderr, "extra data[%d]: 0x%016"PRIx64"\n",
|
||||||
|
i, (uint64_t)run->internal.data[i]);
|
||||||
for (i = 0; i < run->internal.ndata; ++i) {
|
|
||||||
fprintf(stderr, "extra data[%d]: 0x%016"PRIx64"\n",
|
|
||||||
i, (uint64_t)run->internal.data[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {
|
if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {
|
||||||
fprintf(stderr, "emulation failure\n");
|
fprintf(stderr, "emulation failure\n");
|
||||||
|
|
Loading…
Reference in New Issue