qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Clean up of target/i386/host-cpu.c
@ 2025-07-01  7:57 Xiaoyao Li
  2025-07-01  7:57 ` [PATCH 1/2] i386/cpu: Rename host_cpu_instance_init() to apply_host_vendor() Xiaoyao Li
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xiaoyao Li @ 2025-07-01  7:57 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Zhao Liu, Cameron Esfahani, Roman Bolshakov, Phil Dennis-Jordan,
	Marcelo Tosatti, qemu-devel, xiaoyao.li

Everytime I look at the flow of how x86 cpu is initialized, I get
confused by the name of host_cpu_instance_init() and
host_cpu_max_instance_init(). They look like related to "-cpu host" and
the .instance_init() callback of "-cpu host".

However, host_cpu_instance_init() even has noting to do with "-cpu
host". So patch 1, to rename host_cpu_instance_init(). I also want to
rename host_cpu_max_instance_init(), but I cannot think of a new better
name so I just leave it as-is.

Patch 2 is the cleanup found when I look at host-cpu.c

Note, this series is based on my another cleanup [1]. It might be able
to apply cleanly on master with [1].

[1] https://lore.kernel.org/qemu-devel/20250630080610.3151956-1-xiaoyao.li@intel.com/

Xiaoyao Li (2):
  i386/cpu: Rename host_cpu_instance_init() to apply_host_vendor()
  i386/cpu: Move the implementation of is_host_cpu_intel() host-cpu.c

 target/i386/host-cpu.c        | 21 +++++++++++++--------
 target/i386/host-cpu.h        |  3 ++-
 target/i386/hvf/hvf-cpu.c     |  5 ++++-
 target/i386/kvm/kvm-cpu.c     |  4 ++--
 target/i386/kvm/vmsr_energy.c |  9 ---------
 target/i386/kvm/vmsr_energy.h |  1 -
 6 files changed, 21 insertions(+), 22 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-11  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01  7:57 [PATCH 0/2] Clean up of target/i386/host-cpu.c Xiaoyao Li
2025-07-01  7:57 ` [PATCH 1/2] i386/cpu: Rename host_cpu_instance_init() to apply_host_vendor() Xiaoyao Li
2025-07-01 10:29   ` Claudio Fontana
2025-07-01 10:58     ` Xiaoyao Li
2025-07-01  7:57 ` [PATCH 2/2] i386/cpu: Move the implementation of is_host_cpu_intel() host-cpu.c Xiaoyao Li
2025-07-11  8:41 ` [PATCH 0/2] Clean up of target/i386/host-cpu.c Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).