Skip to contentSkip to conversation

hw/i386: Rename kvmvapic.c -> vapic.c

PATCH In review Philippe Mathieu-Daudé 2 participants 4 messages Sep 5, 2023 – Nov 23, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386: Rename kvmvapic.c -> vapic.c

vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'.

---
Interestingly there is a strong dependency on (Kconfig) APIC, but I couldn't get a single x86 machine building without the Kconfig 'APIC' key.

---
 hw/i386/{kvmvapic.c => vapic.c} | 5 ++---
 hw/i386/meson.build             | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
 rename hw/i386/{kvmvapic.c => vapic.c} (99%)
hw/i386/vapic.c renamed from hw/i386/kvmvapic.c +2 -3
similarity index 99%
rename from hw/i386/kvmvapic.c
rename to hw/i386/vapic.c
index 43f8a8f679..35e3a56b35 100644
@@ -747,8 +747,7 @@ static void do_vapic_enable(CPUState *cs, run_on_cpu_data data)
     s->state = VAPIC_ACTIVE;
 }
 
-static void kvmvapic_vm_state_change(void *opaque, bool running,
-                                     RunState state)
+static void vapic_vm_state_change(void *opaque, bool running, RunState state)
 {
     MachineState *ms = MACHINE(qdev_get_machine());
     VAPICROMState *s = opaque;
@@ -793,7 +792,7 @@ static int vapic_post_load(void *opaque, int version_id)
 
     if (!s->vmsentry) {
         s->vmsentry =
-            qemu_add_vm_change_state_handler(kvmvapic_vm_state_change, s);
+            qemu_add_vm_change_state_handler(vapic_vm_state_change, s);
     }
     return 0;
 }
hw/i386/meson.build +1 -1
index cfdbfdcbcb..4909703a89 100644
@@ -1,7 +1,7 @@
 i386_ss = ss.source_set()
 i386_ss.add(files(
   'fw_cfg.c',
-  'kvmvapic.c',
+  'vapic.c',
   'e820_memory_layout.c',
   'multiboot.c',
   'x86.c',
Signature · 1 line
2.41.0
#1 lore raw

Ping for review?

Otherwise I plan to merge this when 9.0 opens.

Thanks, Phil.

Quoted 54 lines · Philippe Mathieu-Daudé

vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'.

---
Interestingly there is a strong dependency on (Kconfig) APIC, but I couldn't get a single x86 machine building without the Kconfig 'APIC' key.

---
  hw/i386/{kvmvapic.c => vapic.c} | 5 ++---
  hw/i386/meson.build             | 2 +-
  2 files changed, 3 insertions(+), 4 deletions(-)

rename hw/i386/{kvmvapic.c => vapic.c} (99%)

hw/i386/vapic.c renamed from hw/i386/kvmvapic.c +2 -3
similarity index 99%
rename from hw/i386/kvmvapic.c
rename to hw/i386/vapic.c
index 43f8a8f679..35e3a56b35 100644
@@ -747,8 +747,7 @@ static void do_vapic_enable(CPUState *cs, run_on_cpu_data data)
      s->state = VAPIC_ACTIVE;
  }
 
-static void kvmvapic_vm_state_change(void *opaque, bool running,
-                                     RunState state)
+static void vapic_vm_state_change(void *opaque, bool running, RunState state)
  {
      MachineState *ms = MACHINE(qdev_get_machine());
      VAPICROMState *s = opaque;
@@ -793,7 +792,7 @@ static int vapic_post_load(void *opaque, int version_id)
 
      if (!s->vmsentry) {
          s->vmsentry =
-            qemu_add_vm_change_state_handler(kvmvapic_vm_state_change, s);
+            qemu_add_vm_change_state_handler(vapic_vm_state_change, s);
      }
      return 0;
  }
hw/i386/meson.build +1 -1
index cfdbfdcbcb..4909703a89 100644
@@ -1,7 +1,7 @@
  i386_ss = ss.source_set()
  i386_ss.add(files(
    'fw_cfg.c',
-  'kvmvapic.c',
+  'vapic.c',
    'e820_memory_layout.c',
    'multiboot.c',
    'x86.c',
#2 lore raw
In reply to Philippe Mathieu-Daudé

Il mar 5 set 2023, 16:52 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 10 lines

vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'.

---
Interestingly there is a strong dependency on (Kconfig) APIC, but I couldn't get a single x86 machine building without the Kconfig 'APIC' key.

In theory ISAPC could be built without APIC. But it isn't quite there.

You can go ahead and queue it, thanks!

Paolo

#3 lore raw
Quoted 9 lines · Paolo Bonzini

Il mar 5 set 2023, 16:52 Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> ha scritto:

vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'.

Quoted 8 lines

<mailto:[email protected]>>
---
Interestingly there is a strong dependency on (Kconfig) APIC, but I couldn't get a single x86 machine building without the Kconfig 'APIC' key.

In theory ISAPC could be built without APIC. But it isn't quite there.

Ah I see, I'll keep that in mind.

Quoted 1 line

You can go ahead and queue it, thanks!

Thanks!