Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp611484pxb; Fri, 16 Apr 2021 13:39:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOEM3HS93F1ZVsnTmXmmJVG9bQPDBf+wQVwXAS1bKqUYXAKhaWr+Dv9aHZE5+bExRq3dCp X-Received: by 2002:a63:ea06:: with SMTP id c6mr757303pgi.401.1618605556861; Fri, 16 Apr 2021 13:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618605556; cv=none; d=google.com; s=arc-20160816; b=uBd8Ig9pXyvMUH/AlG0LgOmPOLaWB3nAgvGV45UBmlLf2s7IYlfwPy2dcXdoQ2Eise PJ0ZGZbnuIywqrA0l+KFPHEY2jSUf+g/cDzZf4vCufiTZ23RLe22/krdEm+6sxmooten DEhH3GRv3qgaC2Zt1Dwnw0h008n82OltikIzqJBL8ibJWlS4ZYeP9ZK071a9PhjvUdiO znY0WFKi8DdqpQZsD+Ztsqaq33zyw+1dQaMbI/W/fGeX2ydtgOAvIC6PefjglqkJP+DK JmEVWja6B1aJ3sHItoh7hGZLAks7VIz9BIre/O3fxadIRpREBrMLNb39VEOxz3MrLFPW HeOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=3PViebWvpQki0qxQgRMJwoKxPXwLSMJuODoXwPbGsM8=; b=kCzxPe7rtr5cgicQmmvg+eUSPqrFzpF7YKXPI6L/mhR0BGgFtMt5XzJ8cyhXdcg+Y9 k5T4+g6XaYvbcGZWJBlQHBxbgIgRjiCPe+2tuOZCRJARsK5vWnh1tjZjWtqLVvtdgaS5 wlaXyASzSC4+EPFtFuUu0JdIIwfCNWxRFBx4+FQKFn7cyuDcvIJp5xY1YwEXRLtKImQF NoD8kQYZDfjBezc/dXgZJXts7aghTtRCpltxzGOgTEjF2gz78qQKJsIe0sBHd11plTIv qHTxFqJsSST9w1rAFw2M+g9wGwWaCIqwHrowATOUZVFKCXhJ+KYCquDQziLPpkz6LMkw Z/Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WvicHTix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si8451760pln.305.2021.04.16.13.39.04; Fri, 16 Apr 2021 13:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WvicHTix; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236005AbhDPQjb (ORCPT + 99 others); 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: linux-kernel@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