From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80BCBC433ED for ; Fri, 16 Apr 2021 16:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FE046115B for ; Fri, 16 Apr 2021 16:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235985AbhDPQjb (ORCPT ); Fri, 16 Apr 2021 12:39:31 -0400 Received: from linux.microsoft.com ([13.77.154.182]:49964 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233976AbhDPQja (ORCPT ); Fri, 16 Apr 2021 12:39:30 -0400 Received: from [192.168.86.23] (c-73-38-52-84.hsd1.vt.comcast.net [73.38.52.84]) by linux.microsoft.com (Postfix) with ESMTPSA id 7D24820B8001; Fri, 16 Apr 2021 09:39:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7D24820B8001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1618591145; bh=3PViebWvpQki0qxQgRMJwoKxPXwLSMJuODoXwPbGsM8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WvicHTix8W1ANGpRffj46E3m3IqgKhkPxr2GwEn4adYCxo9K3YNGtHbI6Z2lBenVk xIod+ow7tRBFzOZpKxsLV8xhn3WbQMrDQ+nAVv7DL03AyDNC7fM7j4JEBt0ADBPyv4 cnah3hBMkCOMTntTORzoK6XzHPuiqpYwxHY9Buos= Subject: Re: [PATCH v2 3/7] KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx To: Vitaly Kuznetsov Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "K. Y. Srinivasan" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, Lan Tianyu , Michael Kelley , Paolo Bonzini , Sean Christopherson , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang , viremana@linux.microsoft.com References: <92207433d0784e123347caaa955c04fbec51eaa7.1618492553.git.viremana@linux.microsoft.com> <87y2di7hiz.fsf@vitty.brq.redhat.com> From: Vineeth Pillai Message-ID: Date: Fri, 16 Apr 2021 12:39:00 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <87y2di7hiz.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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