Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1658402rwl; Fri, 7 Apr 2023 22:25:02 -0700 (PDT) X-Google-Smtp-Source: AKy350an2WPan0VQz6ckqH9gw8dT7TlxptzbYs6lUFP3dQrtdOguHmF/CfIZ6uIs7mr+oKutgYOW X-Received: by 2002:a05:6a00:26c3:b0:62d:bd08:9569 with SMTP id p3-20020a056a0026c300b0062dbd089569mr3953990pfw.5.1680931502397; Fri, 07 Apr 2023 22:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680931502; cv=none; d=google.com; s=arc-20160816; b=zH7F3FgDxR78iX2edsYIX/RFle64uGvoK5y6GTKByv6YmrNQq0WrO7c1EwQfkNhKqI uZvR8Ezfk35SLrb+w3cZ1t5KLWqT21MWDXf7keRXocn+dYk0r2FUJmy0P16DV1JEFkDN UBjoMxrNEhVaw+brVR1/l1qmiA7swpCwiYtDozbq25fYhTWZXOHiOr3V+JYNyxx03bHw 5NBGCg8bTqlLy5xmfmCV4d29rRPYzCLKgwW+Qoh9LArUQES44vuFZsR/42Yz1lYVbPVH 6Mk8Qra9YXgd7DAGG+0ZF8pPjD4m4jGrv1wToBnq229dGs0fSoH11uFBZMw4PShVkVrr W0Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=p0knpnyI5uRd/YJk3Z59mI/o+WhlUYC2jWfoETa7CTE=; b=bjQmmRAohkiY2NIEgp2PhkJczNUmVXG3KSfpdQPaZ1a7ltYb+yV0JEVJRF8Jhl1VOc Ad9lD4GQmU8l0WgFmKUfcPA2cFPlecTm4PsB6wdnQrKYSW6vRG3cFvSKNOztfaLFnq0b tJa22LQ6C90FpBYcOmYpyr03ofI2QxDIHv+p5t8q68vfWWOuUNqQeQrm9nZ+2XSSS5yY /qK0Yu2jNXvfdjn/m0wUt+O5Rk0vDN8vtChOgtlq/CDYuJkC1lJLb97DZhCl2BkZT6th 5ZZdkgxLce2h6kq0Fuue8g40FzGIkI0xKhePpHhTlRmIgklJKZHt9Hl/+8J1VxHTgVwz 3uYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pDfB6Ykv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020aa79496000000b00625ff8521e7si5147018pfk.242.2023.04.07.22.24.50; Fri, 07 Apr 2023 22:25:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pDfB6Ykv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229957AbjDHFDn (ORCPT + 99 others); Sat, 8 Apr 2023 01:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjDHFDj (ORCPT ); Sat, 8 Apr 2023 01:03:39 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 233D1E046; Fri, 7 Apr 2023 22:03:38 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1127) id 56B34213B640; Fri, 7 Apr 2023 22:03:37 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 56B34213B640 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1680930217; bh=p0knpnyI5uRd/YJk3Z59mI/o+WhlUYC2jWfoETa7CTE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pDfB6YkvjiOHoi3a+IgCCAE7xM1MPb2bnMy2frpsAee/jTtEG2VsBil8pZYG7zbVv sNpr4pUpHYeKBYCOZIELqhsoT3FQbC4ywx1Cp+daf+jXozHN2sAP68GV3ccwJkApKF EpO6Fnf+NnGjdTyJs1u4W1tt30ihEv/4cSSmFKpM= Date: Fri, 7 Apr 2023 22:03:37 -0700 From: Saurabh Singh Sengar To: "Michael Kelley (LINUX)" Cc: Stanislav Kinsburskii , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "arnd@arndb.de" , Tianyu Lan , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-arch@vger.kernel.org" , "jgross@suse.com" , "mat.jonczyk@o2.pl" Subject: Re: [PATCH v4 5/5] x86/hyperv: VTL support for Hyper-V Message-ID: <20230408050337.GA21166@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1680598864-16981-1-git-send-email-ssengar@linux.microsoft.com> <1680598864-16981-6-git-send-email-ssengar@linux.microsoft.com> <20230406140743.GA1443@skinsburskii.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-17.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 07, 2023 at 08:56:29PM +0000, Michael Kelley (LINUX) wrote: > From: Stanislav Kinsburskii Sent: Thursday, April 6, 2023 7:08 AM > > > > On Tue, Apr 04, 2023 at 02:01:04AM -0700, Saurabh Sengar wrote: > > [snip] > > > > --- /dev/null > > > +++ b/arch/x86/hyperv/hv_vtl.c > > > @@ -0,0 +1,227 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +/* > > > + * Copyright (c) 2023, Microsoft Corporation. > > > + * > > > + * Author: > > > + * Saurabh Sengar > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > +extern struct boot_params boot_params; > > > +static struct real_mode_header hv_vtl_real_mode_header; > > > + > > > +void __init hv_vtl_init_platform(void) > > > +{ > > > + pr_info("Linux runs in Hyper-V Virtual Trust Level\n"); > > > + > > > + x86_init.irqs.pre_vector_init = x86_init_noop; > > > + x86_init.timers.timer_init = x86_init_noop; > > > + > > > + x86_platform.get_wallclock = get_rtc_noop; > > > + x86_platform.set_wallclock = set_rtc_noop; > > > > Nit: this code is VTL feature and hypevisor specific. > > Defining vtl_get_rtc_noop instead of exporting get_rtc_noop would allow to make > > this series less intrusive to the rest of x86 generic code. > > > > Reviewed-by: Stanislav Kinsburskii > > > > Saurabh's initial version of the code did define its own version of > get/set_rtc_noop(). I had suggested that he use the existing functions > from x86 generic code, and KY had also commented about re-using > existing code wherever possible. :-) My suggestion was partly because > the VTL code is already re-using x86_init_noop(), and then just to avoid > code duplication. Admittedly, there's not much code being duplicated > in these stub functions. I slightly prefer re-using the existing functions, > but don't feel strongly about it. Thank you, Stanislav and Michael, for your comments. Since the function is not doing anything significant, I think it's best to minimize its effect on x86 generic code in this series. I would like to redefine these functions in VTL code. Unless there are compelling reasons against it, I plan to incorporate this change in the next version. - Saurabh > Michael