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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFCECC3DA63 for ; Fri, 26 Jul 2024 05:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:In-Reply-To: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DbuOgyAkRILEBrf9MJ+4blSFephMiZi+pxSKWGG3nSg=; b=XbXG1F+rjRpoQa3yvm56GQQakP LjHv7ck5/W/TSbRFDCyivjRD9Rx/gEhKeSZXZ747bpkfpMS97OkPHtO4fglPA3lzvHKPjciUGKZC8 NCL8bEd0eG825NyRThJ/+SgpTDpCRiBBmLAiGiDHWRCEG6bg58v8TJpwWgMezkahPk5JiKN4FVE1P gCaxIosS8ql7K8p7gpVw6bw+tvlq8CheX+qc+Us5hvg0LxRLThoyJB6ZaA5U8ir6VD39cLtX7sCz5 eJE0kon3BEPj3ag0qdxBmQ1TqKtNPbulZ93bogvz5mUA2Rb9EdeU1hs2MGMVwpSvkVN2NA8PImNkW ZkdDLPRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXDDF-00000002vNr-3L2G; Fri, 26 Jul 2024 05:09:53 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXDCq-00000002vGp-2imo for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2024 05:09:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721970567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DbuOgyAkRILEBrf9MJ+4blSFephMiZi+pxSKWGG3nSg=; b=SKEukUIvZoZ7MUftFPfDHc4zyve7FilFebcoMyg4Miqpyiq+bBQx2t5GGd73+z/AdkXcPO wdPyCqBQ8vi8/mKPIllf+P4uCKhdHNDvktIeNS0Wwi6YeRify4GfyQjvmyjvCuzReh08Ut 5S+c3Xvdk9LxJj6AjN+w2eltJ8mErlc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-8-HtAoRZogOGyKbVHtNOloow-1; Fri, 26 Jul 2024 01:09:25 -0400 X-MC-Unique: HtAoRZogOGyKbVHtNOloow-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42807a05413so9011125e9.2 for ; Thu, 25 Jul 2024 22:09:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721970564; x=1722575364; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DbuOgyAkRILEBrf9MJ+4blSFephMiZi+pxSKWGG3nSg=; b=i1K4IDp8oCar/W+yifqOmqxlh3r7aACcDvvHMTckxrDfgR8Pa4nlM8/FmtWRyyRUA2 HKQHBueP48eNff8sTJXehj/L2j3OWke5gup0xaCZNgTNYSu49EO/OZXcYX/DCLzmHOWK m/OB2dBh8UPlmjbGjz5Vr+SuQyTwXy9RDFIcjL4T1M3kKH4cXGnluskaOVPJx4Kg2Pjv BCjdAWita8kFxfMcym5GLByVi45EwFCTZBs3Ly9F9JySAsPVgJH893j1s9UZm9DMbyOr 7BclkefPRjAte6FjwIRtfHLCdw9XW8NBCSInNjEODXJ5cX12lrmHecBUT7FO6Y9nOTgr No3Q== X-Forwarded-Encrypted: i=1; AJvYcCVlWtvpy+gYTWcqz2p96eRfsq2Uotsxr/xMVtyn8WlYwpt/OXgaqkBciG9K+lNhayuCXWis7c4OozLXB1kT3N7QO/6ohVcoosnrPeuHgVNV9MDFR8w= X-Gm-Message-State: AOJu0YwOwknpnbys2eF0KGfCVvdAijDAZdHu9mHud+Giqn/4Wz02HPwQ QvnpuXwFNrJRxizTePlYSq5exr2vfQku4wn8n5RvcKbHdBud2aef+u7mjkTY3C3ARSHmZf7wm5b SZz608xE+N0g9ONcBhXSz35Duw2TMcKPSgRfvA2XsRUkFHzP1d/OJgbTnDucBHuWgIwGlH5Lu X-Received: by 2002:a05:600c:1c1f:b0:426:6153:5318 with SMTP id 5b1f17b1804b1-4280570fe50mr29400645e9.19.1721970564586; Thu, 25 Jul 2024 22:09:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLGThAmioKqXVYW1bGCeFOTJCJYjUraPBu1ns0STXkcb4YEMtbOBAAif1jc1w6fYVZOAbSOQ== X-Received: by 2002:a05:600c:1c1f:b0:426:6153:5318 with SMTP id 5b1f17b1804b1-4280570fe50mr29400405e9.19.1721970563829; Thu, 25 Jul 2024 22:09:23 -0700 (PDT) Received: from redhat.com ([2a02:14f:1f7:28ce:f21a:7e1e:6a9:f708]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427f93e6871sm105269105e9.30.2024.07.25.22.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 22:09:23 -0700 (PDT) Date: Fri, 26 Jul 2024 01:09:13 -0400 From: "Michael S. Tsirkin" To: David Woodhouse Cc: Richard Cochran , Peter Hilber , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, "Ridoux, Julien" , virtio-dev@lists.linux.dev, "Luu, Ryan" , "Chashper, David" , "Mohamed Abuelfotoh, Hazem" , "Christopher S . Hall" , Jason Wang , John Stultz , netdev@vger.kernel.org, Stephen Boyd , Thomas Gleixner , Xuan Zhuo , Marc Zyngier , Mark Rutland , Daniel Lezcano , Alessandro Zummo , Alexandre Belloni , qemu-devel , Simon Horman Subject: Re: [PATCH] ptp: Add vDSO-style vmclock support Message-ID: <20240726010511-mutt-send-email-mst@kernel.org> References: <20240725083215-mutt-send-email-mst@kernel.org> <98813a70f6d3377d3a9d502fd175be97334fcc87.camel@infradead.org> <20240725100351-mutt-send-email-mst@kernel.org> <2a27205bfc61e19355d360f428a98e2338ff68c3.camel@infradead.org> <20240725122603-mutt-send-email-mst@kernel.org> <0959390cad71b451dc19e5f9396d3f4fdb8fd46f.camel@infradead.org> <20240725163843-mutt-send-email-mst@kernel.org> <20240725170328-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_220928_789725_E271B793 X-CRM114-Status: GOOD ( 23.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 25, 2024 at 10:29:18PM +0100, David Woodhouse wrote: > > > > Then can't we fix it by interrupting all CPUs right after LM? > > > > > > > > To me that seems like a cleaner approach - we then compartmentalize > > > > the ABI issue - kernel has its own ABI against userspace, > > > > devices have their own ABI against kernel. > > > > It'd mean we need a way to detect that interrupt was sent, > > > > maybe yet another counter inside that structure. > > > > > > > > WDYT? > > > > > > > > By the way the same idea would work for snapshots - > > > > some people wanted to expose that info to userspace, too. > > Those people included me. I wanted to interrupt all the vCPUs, even the > ones which were in userspace at the moment of migration, and have the > kernel deal with passing it on to userspace via a different ABI. > > It ends up being complex and intricate, and requiring a lot of new > kernel and userspace support. I gave up on it in the end for snapshots, > and didn't go there again for this. Maybe become you insist on using ACPI? I see a fairly simple way to do it. For example, with virtio: one vq per CPU, with a single outstanding buffer, callback copies from the buffer into the userspace visible memory. Want me to show you the code? -- MST