Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10130185rwd; Wed, 21 Jun 2023 17:10:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5TLf2HzVXs+Hc28FUFV9i1+GrufawtQSw7sDNFllHOOiYBALqIZCUwwgzPX/d/qMoACNqA X-Received: by 2002:a17:902:bf07:b0:1ac:451d:34a with SMTP id bi7-20020a170902bf0700b001ac451d034amr15475630plb.33.1687392626513; Wed, 21 Jun 2023 17:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687392626; cv=none; d=google.com; s=arc-20160816; b=G7BQrOFbAWuo6Wl8nxIAleXWmVN2vqFThQzqCOQ5zjF3Ncbb9DMcwYyAx/eKbKkqZK Bjc08Yc2UnB2ykDF8IQvl+Yx1aoBF9AYxTePBac1gUJYeN4m9hH3O1pQ3Qmi7kUSZJT/ dBdwVDPSNHdc97rrUmkI4r/7i/Ib6J/Rw8th0P1uO4J/nSqhv5yiSTvyqooN66L3/0bn 5PE42RamWSP0V4p3N/8Rff6rL2u2izbjmypamXqAlwYgtUIkvqtht/LifSPiZLTUpvVw iWagFH0/oAxcg39d7EFHKkX266elcr1wlFLqN5p0Og5tvmPNRskFhKxgGyuiR9cITW/p rUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:to:from:date :references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature; bh=zUXiThtm4me0w7nbDX9u7CfXREQ4Sn3ZcpANTPWn7eA=; b=HPm/+PULiSFeVMDZ0UpbynLG2pKuf6trkyzvb9hzZbRbopXpooNZxn1gSM1MdR7Zyg nXomm+dGJSibZgS3/pxSJRPU5dA9vryM7k/2ZErU4iUOhQax0cRxIDCKLWn7VEgxm8xi JilHdWfiGQuyhA3D7K/u4a2JzihyesiBZu26NEjHr/PbzlNIu9I53gQV9zoL8anFEttf dfKEQNNQGniU9D4j/eRrZAeF1CaXxZtOjlrJQY8vemLMTsNAstH1uWzPUkvVRAf7auJt VmzoG6jFI+OtFpF37ytfgVYdKYUkYGkExE5OR+u+ZieO7wntVuI+HHqGFPmYO4SHQDeq 4bfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RKi6Ips4; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a170902e19400b001b20e28f1ccsi4717791pla.653.2023.06.21.17.09.55; Wed, 21 Jun 2023 17:10:26 -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=@kernel.org header.s=k20201202 header.b=RKi6Ips4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjFUXnL (ORCPT + 99 others); Wed, 21 Jun 2023 19:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjFUXnK (ORCPT ); Wed, 21 Jun 2023 19:43:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6571730 for ; Wed, 21 Jun 2023 16:43:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BE83161708 for ; Wed, 21 Jun 2023 23:43:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D870AC433CA; Wed, 21 Jun 2023 23:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687390988; bh=RoMKsAIPNmQwi8XbSHui64FM9FxWSSvleopyh2AgkRM=; h=In-Reply-To:References:Date:From:To:Subject:From; b=RKi6Ips4YOcbYcSL+N6hHAUWYJR6dKGoSb6XrgLAZZHGkQjJfQf1VPwVQfWN2Zg9p sWkKS9KCXft23kpaZG7HVrPM+0h3zRkveO6j1IzFPaKT85rVRTI7pubtWOYDlL5nAA 2m+ylJBz1/dsFJEX3z+ZutLurK9Ai+osB9x1HXGq8RKBoHdIKj7yZJVWA+GxKlwpiB 7GUwY1cdaJHgnP7scmNfiQzG5gAcV0pWiYAISwTH2XUn119UYQyrzIf8iGNskrlDop HojHFlz6lTvhrChkXd974yn9s1DvlZaln/siwyBn0UgeweX/ZoVo7xzIGzTSQy4+GL s1RFJL5M0051A== Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id B90EA27C0054; Wed, 21 Jun 2023 19:43:06 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute3.internal (MEProxy); Wed, 21 Jun 2023 19:43:06 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeegtddgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnhepvdelheejjeevhfdutdeggefftdejtdffgeevteehvdfgjeeiveei ueefveeuvdetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Feedback-ID: ieff94742:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B529031A0063; Wed, 21 Jun 2023 19:43:05 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-499-gf27bbf33e2-fm-20230619.001-gf27bbf33 Mime-Version: 1.0 Message-Id: <0ff85b95-f4c7-445c-b0e0-7368c182ee0b@app.fastmail.com> In-Reply-To: <333138f8-9fbe-be5b-d125-12c9d3ed3eda@citrix.com> References: <20230621151442.2152425-1-per.bilse@citrix.com> <7fbad052-4c4a-4a49-913d-ea836c180dc2@app.fastmail.com> <333138f8-9fbe-be5b-d125-12c9d3ed3eda@citrix.com> Date: Wed, 21 Jun 2023 16:42:44 -0700 From: "Andy Lutomirski" To: "Per Bilse" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , "the arch/x86 maintainers" , "H. Peter Anvin" , "Juergen Gross" , "Stefano Stabellini" , "Oleksandr Tyshchenko" , "Linux Kernel Mailing List" , "moderated list:XEN HYPERVISOR INTERFACE" Subject: Re: [PATCH] Updates to Xen hypercall preemption Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, Jun 21, 2023, at 12:05 PM, Per Bilse wrote: > On 6/21/2023 5:27 PM, Andy Lutomirski wrote: >> This code is a horrible mess, with and without your patches. I think= that, if this were new, there's no way it would make it in to the kerne= l. > > Hi Andy, and many thanks for your frank assessments. Generally, this > is indeed somewhat old code, first introduced in 2015 by way of commit > fdfd811ddde3. There's more information in the notes to that, and it's > maybe worth noting that we're not trying to introduce anything new, > merely fix what various commits since then have broken. > >> I propose one of two rather radical changes: >>=20 >> 1. (preferred) Just delete all of it and make support for dom0 requir= e either full or dynamic preempt, and make a dynamic preempt kernel boot= ing as dom0 run as full preempt. > > Personally I think that's a good idea; a machine so limited in resourc= es > that a fully preemptible dom0 kernel would be a problem wouldn't work = as > a Xen server anyway. Having said that, what to do about this isn't > really in my hands; the issues came to light because the kernel for > Citrix's XenServer product is being upgraded, and it was considered in > everybody's interest to upstream the fixes. I'll see what I can do. This isn=E2=80=99t actually a resource thing. It=E2=80=99s a distro thin= g. Historically, full preempt was a config option only, and distros, for wh= atever reason, often shipped kernels with full preempt disabled. (There= we probably decent reasons. There may still be decent reasons.). And Xe= n needed to work on these kernels. Hence the mess. But Linux recently gained the ability to build a kernel that, by default= , is not full preempt but can be switched *at boot or runtime* to full p= reempt. And distros should ship *that* (or a kernel that does have full = preempt by default). So let=E2=80=99s just make Xen PV dom0 depend on this. It wasn=E2=80=99t= an option a couple years ago. Now it is. > > Best, > > -- Per