Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2637348rdg; Mon, 16 Oct 2023 10:04:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaM+p9XucAwoxasyz6WdBjwjTXjcjtsZY5XmYJKEn0mU1vFkjy4SuEjttmMwlCJgp6bfNc X-Received: by 2002:a05:6a00:1949:b0:6bd:f224:c791 with SMTP id s9-20020a056a00194900b006bdf224c791mr3464633pfk.29.1697475886389; Mon, 16 Oct 2023 10:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697475886; cv=none; d=google.com; s=arc-20160816; b=df+ET5Jm8FrUJNDQtkd45InerOzh914gFw9iKgyNRiS4gELrdHv2Np9+5ezmH4ohnN epdq8fNVy16mF3cTrk8w6Ha1nDN2+M8XjiQKZ3xh87oOuwaQkg+2zLPnjCSu4p4RuaeI CvRnOi1kLUODZb53LAUp0tFICcDdPkAjSIxcjlS2gQ/L/EmqRrHfnkmHtQtlzrrLJkCA UxjnD0MLQwXmxMbQNcxvs/ovxgr+7AEeuIWeP/U42+aYBgnB5Wdr+pfFKExbvIhiZflJ e+i1CzzSRNL80QcxbH4iGAPwpJ6PUYK7TLo/jIqbheEEJXo143bAUgYVb66Bdal9dUkP GAsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=rhtOnbGRFFBp+H16zPlnIGSaINfrMiTw1jYZM4m9Lsw=; fh=HYu4mYWjZKI6q2rTmUotJBrNsBHOG7qXQmHv63dIwu8=; b=1CK0GPX+bv+1pJTrRfj30NKM32FUO0mz8h7XeOrWEi0tn85nv+HwxFrB6WgYjoTQk7 nEAd3ALZVZuvLEJLlWvDL1uFy0f8JS/+Ix768kXoE/7EG2xqUmfTMGjhk6FQA0bCXTnx 8tGZFk1YpevV/fibEKjQVdi1Rymb4YRpI4sDNb7XzVATxtl0ljitR9FW54c5xNo2K6Aw Kzt4hLY+tvJqmSQ1vXGxRWGpCC1nv/oU+kGKCKMcOtaVzITp1W6ekOvTWnN4oLvO67SU ZpcmxPJRpA2puqaJBUE49RA/QhP1/o8M9pamz5BTXTKzC/aQbW3Ywp9WfD8B+qANqoRP l9QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wQtkoguH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b75-20020a63344e000000b005aa41728293si8262417pga.318.2023.10.16.10.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 10:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wQtkoguH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3A23580A2807; Mon, 16 Oct 2023 10:04:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234016AbjJPRE0 (ORCPT + 99 others); Mon, 16 Oct 2023 13:04:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343584AbjJPREJ (ORCPT ); Mon, 16 Oct 2023 13:04:09 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF5857EDA for ; Mon, 16 Oct 2023 09:45:41 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-5b62a669d61so687982a12.1 for ; Mon, 16 Oct 2023 09:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697474741; x=1698079541; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=rhtOnbGRFFBp+H16zPlnIGSaINfrMiTw1jYZM4m9Lsw=; b=wQtkoguHXxRj6nl9t1QlBh+gV7CRofBq0fFqk2wGQNrDqjh658ulFSxZmY3GOK3ZfI jZhN038kW2ZojP8g98FzfVGf+K5lm6HFX2Hf0lXjfeCpHSNxKCKka8ezu1XW/h29zx3N OtheCUrNWQ8hLiWvvSOKwKUQuk5/UhAuPw4h8SctXzWPGcdUkQ/8j/LRQoHS6LE5fM5A hpQAYrHko1ecIVoTIehKgD6IhGgqRpUaUX332ER2YXlMhUnsVLpwtypFVby5qB1m0Lej 27DJGfeQLiaZsAWRfIGPpMwLKUZqYisoZt5bcqF/F0dtn2UGB1vXvLjcfCzPYcz6zVFA PmCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697474741; x=1698079541; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rhtOnbGRFFBp+H16zPlnIGSaINfrMiTw1jYZM4m9Lsw=; b=q1Xu8x35wQlcAa2uPnMoxIsnRfjgH3wTTKg02oMF0TL+XEactGuGp19ytWw1pAD0vg tgqb/lnluHUKSBop4nJCAbDAaiInrQ73B+kljWZGm09a0n68Odm1CzKBWQziUDmxHBut Fpo/32nx4O2cZe3whtT6dXq62cfnEMr4U/cduCZMLJLggHVBA8NeuguH53C1nusfnmzN Y/Ky1oiLbd1hvJhrneLTfjKDkoSDzw+acAL3frE/h+UdI0opa2wdgyTR2YuQudiihz7x kEtlsoCT6s/ZaRIlFTl6a4m9qy4EjdnkXz+d5ESMU1qVhkpVYq94zWzJXqYxOXIJw4Bc IZPw== X-Gm-Message-State: AOJu0Yx2YyxP2pWVRSJGkWTHzz1sfUDvUdTDSY0BWoLLxsO3SBs/KEjI clU/r9EiRTb7cMdTBWJaWfsctCJjpBI= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:f54d:b0:1c9:b785:bc46 with SMTP id h13-20020a170902f54d00b001c9b785bc46mr387819plf.12.1697474741006; Mon, 16 Oct 2023 09:45:41 -0700 (PDT) Date: Mon, 16 Oct 2023 09:45:39 -0700 In-Reply-To: <877cnm8te9.fsf@redhat.com> Mime-Version: 1.0 References: <20231010160300.1136799-1-vkuznets@redhat.com> <20231010160300.1136799-8-vkuznets@redhat.com> <708a5bb2dfb0cb085bd9215c2e8e4d0b3db69665.camel@redhat.com> <87h6mq91al.fsf@redhat.com> <877cnm8te9.fsf@redhat.com> Message-ID: Subject: Re: [PATCH RFC 07/11] KVM: x86: Make Hyper-V emulation optional From: Sean Christopherson To: Vitaly Kuznetsov Cc: Maxim Levitsky , kvm@vger.kernel.org, Paolo Bonzini , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 16 Oct 2023 10:04:41 -0700 (PDT) On Mon, Oct 16, 2023, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Mon, Oct 16, 2023, Vitaly Kuznetsov wrote: > >> Maxim Levitsky writes: > >> > > ... > > >> > > >> > "Provides KVM support for emulating Microsoft Hypervisor (Hyper-V). > > > > I don't think we should put Hyper-V in parentheses, I haven't seen any documentation > > that calls it "Microsoft Hypervisor", i.e. Hyper-V is the full and > > proper name. > > Ha :-) From > https://lore.kernel.org/linux-hyperv/1696010501-24584-1-git-send-email-nunodasneves@linux.microsoft.com/ > > """ > This series introduces support for creating and running guest machines > while running on the Microsoft Hypervisor. [0] > ... > [0] "Hyper-V" is more well-known, but it really refers to the whole stack > including the hypervisor and other components that run in Windows > kernel and userspace. > """ LOL indeed. :-) > I'm fine with keeping the staus quo though :-) > > > > >> > This makes KVM expose a set of paravirtualized interfaces, > > > > s/makes/allows, since KVM still requires userspace to opt-in to exposing Hyper-V. > > > >> > documented in the HyperV TLFS, > > > > s/TLFS/spec? Readers that aren't already familiar with Hyper-V will have no idea > > what TLFS is until they click the link. > > > >> > https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs, > >> > which consists of a subset of paravirtualized interfaces that HyperV exposes > > > > We can trim this paragraph by stating that KVM only supports a subset of the > > PV interfaces straightaway. > > > >> > to its guests. > > > > E.g. > > > > Provides KVM support for for emulating Microsoft Hyper-V. This allows KVM to > > expose a subset of the paravirtualized interfaces defined in Hyper-V's spec: > > https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs. To fold in the whole "Microsoft Hypervisor" thing, what if we take the verbiage verbatim from the TLFS intro? Provides KVM support for emulating Microsoft Hyper-V. This allows KVM to expose a subset of the paravirtualized interfaces defined in the Hyper-V Hypervisor Top-Level Functional Specification (TLFS): https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs > LGTM, thanks! > > > > >> > > >> > This improves performance of modern Windows guests. > > > > Isn't Hyper-V emulation effectively mandatory these days? IIRC, modern versions > > of Windows will fail to boot if they detect a hypervisor but the core Hyper-V > > interfaces aren't supported. > > > > It's rather a rule of thumb: normally, modern Windows and Hyper-V > versions (Win10/11, WS2019/22) boot and pretend to work but without > Hyper-V enlightenment it's not uncommon to see a blue screen of death > because of a watchdog firing. It's hard to say for sure as things keep > changing under the hood so even different builds can behave differently; > pretending we're a genuine Hyper-V was proven to be the most robust > approach. We should capture something to that effect in the help. I want to avoid bug reports of Windows not working on KVM because someone turned off CONFIG_KVM_HYPERV because the help implies that it _only_ improves performance.