lkml.org 
[lkml]   [2021]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/7] KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx
From
Date

On 4/16/2021 4:36 AM, Vitaly Kuznetsov wrote:
>
>> struct kvm_vm_stat {
>> 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
> I still think that using arch/x86/kvm/hyperv.[ch] for KVM-on-Hyper-V is
> 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).
Makes sense, creating new set of files looks good to me. The default
hyperv.c
for hyperv emulation also seems misleading - probably we should rename it
to hyperv_host_emul.[ch] or similar. That way, probably I can use
hyperv.[ch]
for kvm on hyperv code. If you feel, thats too big of a churn, I shall use
kvm_on_hyperv.[ch] (to avoid reading the file differently). What do you
think?


>> @@ -10470,7 +10474,6 @@ void kvm_arch_free_vm(struct kvm *kvm)
>> vfree(kvm);
>> }
>>
>> -
> Stray change?
It was kinda leftover, but I thought I'd keep it as it removes and
unnecessary line.

Thanks,
Vineeth

\
 
 \ /
  Last update: 2021-04-16 18:40    [W:0.075 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site