summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/KVM/1859310
blob: d2618ce07025024706f967c3f469556f42b743c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
KVM: 0.975
i386: 0.960
architecture: 0.925
device: 0.916
register: 0.905
x86: 0.869
semantic: 0.804
mistranslation: 0.791
PID: 0.776
performance: 0.765
socket: 0.751
graphic: 0.745
hypervisor: 0.707
ppc: 0.672
permissions: 0.644
virtual: 0.621
kernel: 0.620
network: 0.593
peripherals: 0.588
user-level: 0.547
vnc: 0.542
risc-v: 0.542
TCG: 0.540
files: 0.530
debug: 0.507
VMM: 0.480
arm: 0.473
boot: 0.425
assembly: 0.157

libvirt probing fails due to assertion failure with KVM and 'none' machine type

Using libvirt on Ubuntu 19.10, I get the following error when I try to set <emulator> to the latest qemu from git (commit dc65a5bdc9):

    error: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-x86_64 for probing: /home/joey/git/qemu/target/i386/kvm.c:2176:kvm_arch_init: Object 0x564bfd5c3200 is not an instance of type x86-machine

Qemu command line to reproduce:

    sudo x86_64-softmmu/qemu-system-x86_64 -machine 'none,accel=kvm'

Commit ed9e923c3c (Dec 12, 2019) introduced the issue by removing an object_dynamic_cast call.  In this scenario, kvm_arch_init is passed an instance of "none-machine" instead of "x86-machine".

The following one-line change to target/i386/kvm.c reintroduces the cast:

     if (kvm_check_extension(s, KVM_CAP_X86_SMM) &&
+        object_dynamic_cast(OBJECT(ms), TYPE_X86_MACHINE) &&
         x86_machine_is_smm_enabled(X86_MACHINE(ms))) {
         smram_machine_done.notify = register_smram_listener;
         qemu_add_machine_init_done_notifier(&smram_machine_done);
     }

This was fixed in commit 8f54bbd0b4 "x86: Check for machine state object class before typecasting it".