Makes sense, creating new set of files looks good to me. The default hyperv.c
struct kvm_vm_stat {I still think that using arch/x86/kvm/hyperv.[ch] for KVM-on-Hyper-V is
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 58fa8c029867..614b4448a028 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
misleading. Currently, these are dedicated to emulating Hyper-V
interface to KVM guests and this is orthogonal to nesting KVM on
Hyper-V. As a solution, I'd suggest you either:
- Put the stuff in x86.c
- Create a dedicated set of files, e.g. 'kvmonhyperv.[ch]' (I also
thought about 'hyperv_host.[ch]' but then I realized it's equally
misleading as one can read this as 'KVM is acting as Hyper-V host').
Personally, I'd vote for the later. Besides eliminating confusion, the
benefit of having dedicated files is that we can avoid compiling them
completely when !IS_ENABLED(CONFIG_HYPERV) (#ifdefs in C are ugly).
It was kinda leftover, but I thought I'd keep it as it removes and unnecessary line.@@ -10470,7 +10474,6 @@ void kvm_arch_free_vm(struct kvm *kvm)Stray change?
vfree(kvm);
}
-