]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
i386: move kvm accel files into kvm/
authorClaudio Fontana <cfontana@suse.de>
Sat, 12 Dec 2020 15:55:08 +0000 (16:55 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 16 Dec 2020 19:06:52 +0000 (14:06 -0500)
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>
25 files changed:
MAINTAINERS
hw/i386/fw_cfg.c
hw/i386/intel_iommu.c
hw/i386/kvm/apic.c
hw/i386/kvm/clock.c
hw/i386/microvm.c
hw/i386/pc.c
hw/i386/x86.c
meson.build
target/i386/cpu.c
target/i386/cpu.h
target/i386/helper.c
target/i386/kvm/hyperv-proto.h [moved from target/i386/hyperv-proto.h with 100% similarity]
target/i386/kvm/hyperv-stub.c [moved from target/i386/hyperv-stub.c with 100% similarity]
target/i386/kvm/hyperv.c [moved from target/i386/hyperv.c with 100% similarity]
target/i386/kvm/hyperv.h [moved from target/i386/hyperv.h with 100% similarity]
target/i386/kvm/kvm-stub.c [moved from target/i386/kvm-stub.c with 100% similarity]
target/i386/kvm/kvm.c [moved from target/i386/kvm.c with 100% similarity]
target/i386/kvm/kvm_i386.h [moved from target/i386/kvm_i386.h with 100% similarity]
target/i386/kvm/meson.build [new file with mode: 0644]
target/i386/kvm/trace-events [new file with mode: 0644]
target/i386/kvm/trace.h [new file with mode: 0644]
target/i386/machine.c
target/i386/meson.build
target/i386/trace-events

index d5ea7fbb8ff2e9e6f7a0309d3ae928384848ed22..a77553833a0cd4241511d22035b4a76eac1fa892 100644 (file)
@@ -426,7 +426,7 @@ M: Paolo Bonzini <pbonzini@redhat.com>
 M: Marcelo Tosatti <mtosatti@redhat.com>
 L: kvm@vger.kernel.org
 S: Supported
-F: target/i386/kvm.c
+F: target/i386/kvm/
 F: scripts/kvm/vmxcap
 
 Guest CPU Cores (other accelerators)
index b87f0e50703eeb9e0128ab3b86d2cc9b8119ad5c..e48a54fa364b9f244a5f572e7d0ccd320cdae4fb 100644 (file)
@@ -21,7 +21,7 @@
 #include "hw/timer/hpet.h"
 #include "hw/nvram/fw_cfg.h"
 #include "e820_memory_layout.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include CONFIG_DEVICES
 
 struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
index 0cc71e4057f59ae120300a3b90b475784f671141..b4f5094259e1c18e72cb9787cbaece22632461ed 100644 (file)
@@ -37,7 +37,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/sysemu.h"
 #include "hw/i386/apic_internal.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include "migration/vmstate.h"
 #include "trace.h"
 
index b226b674e808b803f2534ab516d45181b3fa6036..3dbff2be2e2fcfdc5374e5f39f89606f206ff692 100644 (file)
@@ -17,7 +17,7 @@
 #include "hw/pci/msi.h"
 #include "sysemu/hw_accel.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,
                                     int reg_id, uint32_t val)
index 24fe5091b6b47c9a9de83553c6a603f22e9fe978..2d8a3663693652344cd9651690b561240877f4e7 100644 (file)
@@ -20,7 +20,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
 #include "sysemu/hw_accel.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include "migration/vmstate.h"
 #include "hw/sysbus.h"
 #include "hw/kvm/clock.h"
index f111ef87d84b19ebb92c69af18433986a8c6bb28..edf2b0f0618c4299a64c99e53f7137d58564342f 100644 (file)
@@ -51,7 +51,7 @@
 
 #include "cpu.h"
 #include "elf.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include "hw/xen/start_info.h"
 
 #define MICROVM_QBOOT_FILENAME "qboot.rom"
index 640fb5b0b70997748c4468800d3bcb2501d3d0f0..5458f61d10082aad279367ca9cd23ca483a4cd31 100644 (file)
@@ -61,7 +61,7 @@
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include "hw/xen/xen.h"
 #include "hw/xen/start_info.h"
 #include "ui/qemu-spice.h"
index 49e1d419b2ceb2a067e7f355fe58df38d5e4601c..6329f90ef9095e6f507f1f83ec396b61c02b02b6 100644 (file)
@@ -54,7 +54,7 @@
 #include "elf.h"
 #include "standard-headers/asm-x86/bootparam.h"
 #include CONFIG_DEVICES
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 
 /* Physical Address of PVH entry point read from kernel ELF NOTE */
 static size_t pvh_start_addr;
index fba6413056a3e8b5c4da3004593e375bfbbddd24..372576f82c5054080e0174851667b8d015876b72 100644 (file)
@@ -1497,6 +1497,7 @@ trace_events_subdirs += [
   'target/arm',
   'target/hppa',
   'target/i386',
+  'target/i386/kvm',
   'target/mips',
   'target/ppc',
   'target/riscv',
index ca997a68cd10f3af185b991514ddda3b8ffeefd7..77f0e44df80005983f3d48fc14604f9ce2fce6d0 100644 (file)
@@ -31,7 +31,7 @@
 #include "sysemu/cpus.h"
 #include "sysemu/xen.h"
 #include "sysemu/whpx.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #include "sev_i386.h"
 
 #include "qemu/error-report.h"
index c4a49c06a8bc36743f40b0a15ac6fe1ed6dde665..d6bb053837135f79fbcd29d2b136769f43672c13 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "sysemu/tcg.h"
 #include "cpu-qom.h"
-#include "hyperv-proto.h"
+#include "kvm/hyperv-proto.h"
 #include "exec/cpu-defs.h"
 #include "qapi/qapi-types-common.h"
 
index 034f46bcc2100f8e0472e4e43f8fd22b66101394..a1b3367ab2d6e61bf52a8c7363a93e247e9d0a29 100644 (file)
@@ -24,7 +24,7 @@
 #include "qemu/qemu-print.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 #ifndef CONFIG_USER_ONLY
 #include "sysemu/tcg.h"
 #include "sysemu/hw_accel.h"
similarity index 100%
rename from target/i386/kvm.c
rename to target/i386/kvm/kvm.c
diff --git a/target/i386/kvm/meson.build b/target/i386/kvm/meson.build
new file mode 100644 (file)
index 0000000..1d66559
--- /dev/null
@@ -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'))
diff --git a/target/i386/kvm/trace-events b/target/i386/kvm/trace-events
new file mode 100644 (file)
index 0000000..b4e2d9e
--- /dev/null
@@ -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"
diff --git a/target/i386/kvm/trace.h b/target/i386/kvm/trace.h
new file mode 100644 (file)
index 0000000..46b75c6
--- /dev/null
@@ -0,0 +1 @@
+#include "trace/trace-target_i386_kvm.h"
index 233e46bb70b5334b78183c1d47ba2a120f31f173..1614e8c2f817414afd0c33529547bc0821b87e2d 100644 (file)
@@ -3,9 +3,9 @@
 #include "exec/exec-all.h"
 #include "hw/isa/isa.h"
 #include "migration/cpu.h"
-#include "hyperv.h"
+#include "kvm/hyperv.h"
 #include "hw/i386/x86.h"
-#include "kvm_i386.h"
+#include "kvm/kvm_i386.h"
 
 #include "sysemu/kvm.h"
 #include "sysemu/tcg.h"
index fc3ee803860cea930f032cef06fd2d0d07d3ba29..53637571315e488a116cc3eeb7fa247311def1c9 100644 (file)
@@ -18,7 +18,6 @@ i386_ss.add(when: 'CONFIG_TCG', if_true: files(
   'smm_helper.c',
   'svm_helper.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_softmmu_ss = ss.source_set()
@@ -28,8 +27,6 @@ i386_softmmu_ss.add(files(
   'machine.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(
   'whpx-all.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_WIN32'], if_true: files('hax-windows.c'))
 
+subdir('kvm')
 subdir('hvf')
 
 target_arch += {'i386': i386_ss}
index 246158ae1f00c8f79b6dc560419376b228ee8b61..a22ab24e214f862934c988ab3dc3cb9a135124d2 100644 (file)
@@ -1,11 +1,5 @@
 # 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
 kvm_sev_init(void) ""
 kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"