i386: move kvm accel files into kvm/

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201212155530.23098-2-cfontana@suse.de>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Claudio Fontana 2020-12-12 16:55:08 +01:00 committed by Eduardo Habkost
parent af3f37319c
commit a9dc68d9b2
25 changed files with 26 additions and 22 deletions

View File

@ -426,7 +426,7 @@ M: Paolo Bonzini <pbonzini@redhat.com>
M: Marcelo Tosatti <mtosatti@redhat.com> M: Marcelo Tosatti <mtosatti@redhat.com>
L: kvm@vger.kernel.org L: kvm@vger.kernel.org
S: Supported S: Supported
F: target/i386/kvm.c F: target/i386/kvm/
F: scripts/kvm/vmxcap F: scripts/kvm/vmxcap
Guest CPU Cores (other accelerators) Guest CPU Cores (other accelerators)

View File

@ -21,7 +21,7 @@
#include "hw/timer/hpet.h" #include "hw/timer/hpet.h"
#include "hw/nvram/fw_cfg.h" #include "hw/nvram/fw_cfg.h"
#include "e820_memory_layout.h" #include "e820_memory_layout.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include CONFIG_DEVICES #include CONFIG_DEVICES
struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};

View File

@ -37,7 +37,7 @@
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "hw/i386/apic_internal.h" #include "hw/i386/apic_internal.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "trace.h" #include "trace.h"

View File

@ -17,7 +17,7 @@
#include "hw/pci/msi.h" #include "hw/pci/msi.h"
#include "sysemu/hw_accel.h" #include "sysemu/hw_accel.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "target/i386/kvm_i386.h" #include "kvm/kvm_i386.h"
static inline void kvm_apic_set_reg(struct kvm_lapic_state *kapic, static inline void kvm_apic_set_reg(struct kvm_lapic_state *kapic,
int reg_id, uint32_t val) int reg_id, uint32_t val)

View File

@ -20,7 +20,7 @@
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "sysemu/hw_accel.h" #include "sysemu/hw_accel.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "hw/kvm/clock.h" #include "hw/kvm/clock.h"

View File

@ -51,7 +51,7 @@
#include "cpu.h" #include "cpu.h"
#include "elf.h" #include "elf.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "hw/xen/start_info.h" #include "hw/xen/start_info.h"
#define MICROVM_QBOOT_FILENAME "qboot.rom" #define MICROVM_QBOOT_FILENAME "qboot.rom"

View File

@ -61,7 +61,7 @@
#include "sysemu/qtest.h" #include "sysemu/qtest.h"
#include "sysemu/reset.h" #include "sysemu/reset.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "hw/xen/start_info.h" #include "hw/xen/start_info.h"
#include "ui/qemu-spice.h" #include "ui/qemu-spice.h"

View File

@ -54,7 +54,7 @@
#include "elf.h" #include "elf.h"
#include "standard-headers/asm-x86/bootparam.h" #include "standard-headers/asm-x86/bootparam.h"
#include CONFIG_DEVICES #include CONFIG_DEVICES
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
/* Physical Address of PVH entry point read from kernel ELF NOTE */ /* Physical Address of PVH entry point read from kernel ELF NOTE */
static size_t pvh_start_addr; static size_t pvh_start_addr;

View File

@ -1497,6 +1497,7 @@ trace_events_subdirs += [
'target/arm', 'target/arm',
'target/hppa', 'target/hppa',
'target/i386', 'target/i386',
'target/i386/kvm',
'target/mips', 'target/mips',
'target/ppc', 'target/ppc',
'target/riscv', 'target/riscv',

View File

@ -31,7 +31,7 @@
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
#include "sysemu/xen.h" #include "sysemu/xen.h"
#include "sysemu/whpx.h" #include "sysemu/whpx.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "sev_i386.h" #include "sev_i386.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"

View File

@ -22,7 +22,7 @@
#include "sysemu/tcg.h" #include "sysemu/tcg.h"
#include "cpu-qom.h" #include "cpu-qom.h"
#include "hyperv-proto.h" #include "kvm/hyperv-proto.h"
#include "exec/cpu-defs.h" #include "exec/cpu-defs.h"
#include "qapi/qapi-types-common.h" #include "qapi/qapi-types-common.h"

View File

@ -24,7 +24,7 @@
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY
#include "sysemu/tcg.h" #include "sysemu/tcg.h"
#include "sysemu/hw_accel.h" #include "sysemu/hw_accel.h"

View File

@ -0,0 +1,3 @@
i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
i386_softmmu_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))

View File

@ -0,0 +1,7 @@
# See docs/devel/tracing.txt for syntax documentation.
# kvm.c
kvm_x86_fixup_msi_error(uint32_t gsi) "VT-d failed to remap interrupt for GSI %" PRIu32
kvm_x86_add_msi_route(int virq) "Adding route entry for virq %d"
kvm_x86_remove_msi_route(int virq) "Removing route entry for virq %d"
kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"

1
target/i386/kvm/trace.h Normal file
View File

@ -0,0 +1 @@
#include "trace/trace-target_i386_kvm.h"

View File

@ -3,9 +3,9 @@
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "migration/cpu.h" #include "migration/cpu.h"
#include "hyperv.h" #include "kvm/hyperv.h"
#include "hw/i386/x86.h" #include "hw/i386/x86.h"
#include "kvm_i386.h" #include "kvm/kvm_i386.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "sysemu/tcg.h" #include "sysemu/tcg.h"

View File

@ -18,7 +18,6 @@ i386_ss.add(when: 'CONFIG_TCG', if_true: files(
'smm_helper.c', 'smm_helper.c',
'svm_helper.c', 'svm_helper.c',
'translate.c'), if_false: files('tcg-stub.c')) 'translate.c'), if_false: files('tcg-stub.c'))
i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
i386_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-stub.c')) i386_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-stub.c'))
i386_softmmu_ss = ss.source_set() i386_softmmu_ss = ss.source_set()
@ -28,8 +27,6 @@ i386_softmmu_ss.add(files(
'machine.c', 'machine.c',
'monitor.c', 'monitor.c',
)) ))
i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))
i386_softmmu_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
i386_softmmu_ss.add(when: 'CONFIG_WHPX', if_true: files( i386_softmmu_ss.add(when: 'CONFIG_WHPX', if_true: files(
'whpx-all.c', 'whpx-all.c',
'whpx-cpus.c', 'whpx-cpus.c',
@ -43,6 +40,7 @@ i386_softmmu_ss.add(when: 'CONFIG_HAX', if_true: files(
i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_POSIX'], if_true: files('hax-posix.c')) i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_POSIX'], if_true: files('hax-posix.c'))
i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_WIN32'], if_true: files('hax-windows.c')) i386_softmmu_ss.add(when: ['CONFIG_HAX', 'CONFIG_WIN32'], if_true: files('hax-windows.c'))
subdir('kvm')
subdir('hvf') subdir('hvf')
target_arch += {'i386': i386_ss} target_arch += {'i386': i386_ss}

View File

@ -1,11 +1,5 @@
# See docs/devel/tracing.txt for syntax documentation. # See docs/devel/tracing.txt for syntax documentation.
# kvm.c
kvm_x86_fixup_msi_error(uint32_t gsi) "VT-d failed to remap interrupt for GSI %" PRIu32
kvm_x86_add_msi_route(int virq) "Adding route entry for virq %d"
kvm_x86_remove_msi_route(int virq) "Removing route entry for virq %d"
kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
# sev.c # sev.c
kvm_sev_init(void) "" kvm_sev_init(void) ""
kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx" kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"