From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 070BD39B962; Wed, 29 Apr 2026 09:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777456653; cv=none; b=St87I+Xu/qamZtHUno9r1yt+Si9pWm66d3n7j6j+kTSg/2x5DuyAbK1oD3GSZCqxGnbSpQGfCWRd1WHt+2g+KhHZxH7rwO6e+Jm9hISMQG+VDNmDcnPMkCX9ZMVY2B0WCXGoqhpB4nR+5gPQczAdJdg5Hxz4zXy7cY9UN8VZpnI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777456653; c=relaxed/simple; bh=DgWvSVm0t3Tm58/J3QHKKBz4VeXvse0bJERoO+L+XOA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QQRBxaQr6phThinVG9gwPqcKm6nxDyQKtp1cBQGc2/Pp7UnNolbfN5bKotadg8/G4+eEL3fR30ewSe3RgI1SO0tD48y1TGCC4fAaTX3Tk99LdHE1aplaeOlm4GJinsF+C1s/yk4PknjO+nYWFT5xmGDuD97O9P3FAe/AKL3glk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=Q31XCORO; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="Q31XCORO" Received: from [10.95.65.160] (unknown [167.220.238.0]) by linux.microsoft.com (Postfix) with ESMTPSA id 5250A20B716C; Wed, 29 Apr 2026 02:57:25 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5250A20B716C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1777456652; bh=Umh2GNLzS0ZLJ1ouGA7sN5L/Audjee+GTfXIQgbar64=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Q31XCOROwAjmtXRERBx2iF+/+sJsH2ybABfnJCzFn77NWB9EVyO4d6UDaaSUN2seb YQ7d0/CyN4ooJv9sS8ZRGDqMJBY896FQHOvEKQgI5tVaj4mJi2D6hDXN+gA0IZ5wgq 80ZbIizjLbl6bTb0czS/dH3jkSHeHVV2s6z/Ha8s= Message-ID: <80efa86b-de96-438c-ac04-fda22c655500@linux.microsoft.com> Date: Wed, 29 Apr 2026 15:27:20 +0530 Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 08/15] Drivers: hv: Move hv_call_(get|set)_vp_registers() declarations To: Michael Kelley , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , "H . Peter Anvin" , Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: Marc Zyngier , Timothy Hayes , Lorenzo Pieralisi , Sascha Bischoff , mrigendrachaubey , "linux-hyperv@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "vdso@mailbox.org" , "ssengar@linux.microsoft.com" References: <20260423124206.2410879-1-namjain@linux.microsoft.com> <20260423124206.2410879-9-namjain@linux.microsoft.com> Content-Language: en-US From: Naman Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/27/2026 11:09 AM, Michael Kelley wrote: > From: Naman Jain Sent: Thursday, April 23, 2026 5:42 AM >> >> Move hv_call_get_vp_registers() and hv_call_set_vp_registers() >> declarations from drivers/hv/mshv.h to include/asm-generic/mshyperv.h. >> >> These functions are defined in mshv_common.c and are going to be called >> from both drivers/hv/ and arch/x86/hyperv/hv_vtl.c. The latter never >> included mshv.h, relying on implicit declaration visibility. Moving the >> declarations to the arch-generic Hyper-V header makes them properly >> visible to all architecture-specific callers. >> >> Provide static inline stubs returning -EOPNOTSUPP when neither >> CONFIG_MSHV_ROOT nor CONFIG_MSHV_VTL is enabled. > > Looking at the drivers/hv/Kconfig, it's possible to build with > CONFIG_HYPERV_VTL_MODE=y, but not CONFIG_MSHV_VTL. In such a > case, mshv_common.o doesn't get built, which is why the stubs are > needed. Is such a configuration desirable for some scenarios? > > I wonder if having CONFIG_HYPERV_VTL_MODE force the building of > mshv_common.o would be a better approach. Then the stubs wouldn't > be needed. The "ifneq" statement in drivers/hv/Makefile could use > CONFIG_HYPERV_VTL_MODE instead of CONFIG_MSHV_VTL, and > everything would be good since CONFIG_MSHV_VTL depends on > CONFIG_HYPERV_VTL_MODE. > This looks good. I'll try this and make the changes. In case there are some challenges with that, I'll revert back. Regards, Naman