From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B4912A1B8 for ; Fri, 26 Jul 2024 05:09:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721970569; cv=none; b=f75wE50dZZjY+0TGOzESkcH2l552b5gc7IWit8RV1nn2w/hUZCyotslvxWj45O+JksbVKUN8KANfgqGjzRklrAcq39YRp+YOzt0L3fZY0JaA2CZPqJmWsEMSExek2WqUuendzqjeXEAc4PY6QeiLNshPjF0YQvj1vfbeRcuhqyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721970569; c=relaxed/simple; bh=mwBiyQNVoMNybA5O6D7Gx2PdVoETiCkHnYn15H6Goyk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=XtBRyKHtGCV10dzC12fnMjqI1lY0Hl6EFlqZMUzMWdo0tCdAJMD9z2MqEGxa9cmA9qAqN+Ghdyyb6HBgBGvb4QprmiCqKTBAGgkTJMeKqQYzeE22NKf3EIGS1c9BemcAE3o7mkIzTiYT+w2Jivu8Xl2cAa3TRMjiFWhm0fuMdQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SKEukUIv; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SKEukUIv" 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-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-jINHvXHFNQa5k7YTRLJmJA-1; Fri, 26 Jul 2024 01:09:25 -0400 X-MC-Unique: jINHvXHFNQa5k7YTRLJmJA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4280cf2be19so1884675e9.3 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=iolpfdlyxEaEqqJjrwcfpAwInJjV64IQuos9+iuIG3rw8lM4caY/a/HZ5tRW3LDTKx hDyeWr+Nb8kY2RtGKrDrZw7cQkGLDUZIOelDX6UesyfXzFMdjvtCtdZAwg1N3rBaeb0l EQxouaOhZGd5WFPMUu9VMzGOseDdJxKqC/2SyoVwmuzbq+JJPHOyaTR1Ruter+4uRDXY 17oJlzy0hHkih2gguT+tiud4RGZH7jfIawCYdmJ5QImHxMoEA03vd2DW2F5gWV94IPLc wDAqXcUvGYim/oW0XRSwLYRWwbOUB0CzfCj5vV/XOirvLfhJfKvPMsfnbPDSif300xnm YOhw== X-Forwarded-Encrypted: i=1; AJvYcCXxC1NE+uCG+gb+YJ3Q/iQot50AaIqlkfCOK23cRWk9j9H9TDpLfKjuTYew72eiCDUeTWzoqO3kVyhJkVp4naYtzV3hRHxMJdvev/awCcQ= X-Gm-Message-State: AOJu0YxLA4ZwGEQBlxNA8DSGJ5K4xifpnDX3QvHDIzcC0yRTYS3yxhwa Adfua3kplWV9dU24amucCgoda0ZN0Z0m+KjcExz1etQSe8T18FRldNb9nGttEIuq29K6a+rY50D tDb4NoT43Q3+LPpZWrqPyPJnj06j/p++jhqZqWJW/DZbv7bQTgjiRVjs7xuvQ0SmG X-Received: by 2002:a05:600c:1c1f:b0:426:6153:5318 with SMTP id 5b1f17b1804b1-4280570fe50mr29400695e9.19.1721970564587; 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> Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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