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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=no 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 947CAC07E9B for ; Tue, 6 Jul 2021 15:41:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 718CF6139A for ; Tue, 6 Jul 2021 15:41:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232735AbhGFPnn (ORCPT ); Tue, 6 Jul 2021 11:43:43 -0400 Received: from linux.microsoft.com ([13.77.154.182]:43014 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231689AbhGFPnm (ORCPT ); Tue, 6 Jul 2021 11:43:42 -0400 Received: from [10.0.0.178] (c-67-168-106-253.hsd1.wa.comcast.net [67.168.106.253]) by linux.microsoft.com (Postfix) with ESMTPSA id 8DB0120B7188; Tue, 6 Jul 2021 08:41:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8DB0120B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1625586063; bh=FXa3SB2i+RiGoeKML7scN56hG2dTps93chghEwKXFwI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZT1tH4M9oi2ubnBW4DEEpT8Z1Qsiz2HpOHFXUAasnsqb8a8E4fO6QIAfnGMIXbwuu Me7tmy0hrMR1sOtDy2BHvEi5ilk5QRL1Huv+bVMc/ze3DkbfUSLb563At1Dy+pKHLf 3o7CZfb29iboGM9nvDyllpxt12otjAENKhGrp6x0= Subject: Re: [PATCH 03/19] drivers/hv: minimal mshv module (/dev/mshv/) To: Wei Liu Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mikelley@microsoft.com, viremana@linux.microsoft.com, sunilmut@microsoft.com, vkuznets@redhat.com, ligrassi@microsoft.com, kys@microsoft.com References: <1622241819-21155-1-git-send-email-nunodasneves@linux.microsoft.com> <1622241819-21155-4-git-send-email-nunodasneves@linux.microsoft.com> <20210627120004.u4pn3stgcny2zl4i@liuwe-devbox-debian-v2> From: Nuno Das Neves Message-ID: Date: Tue, 6 Jul 2021 08:41:03 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210627120004.u4pn3stgcny2zl4i@liuwe-devbox-debian-v2> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/27/2021 5:00 AM, Wei Liu wrote: > On Fri, May 28, 2021 at 03:43:23PM -0700, Nuno Das Neves wrote: > [...] >> + >> +static int >> +__init mshv_init(void) >> +{ >> + int ret; > > Please check if Linux is running on Microsoft Hypervisor here. If not, > this module should not be loaded. > > Something like: > > if (!hv_is_hyperv_initialized()) > return -ENODEV; Good point - will do. > > Wei. >