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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 7E70BC44526 for ; Wed, 21 Jan 2026 13:06:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1209719.1521640 (Exim 4.92) (envelope-from ) id 1viXuv-0000d0-GX; Wed, 21 Jan 2026 13:06:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1209719.1521640; Wed, 21 Jan 2026 13:06:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1viXuv-0000ct-Db; Wed, 21 Jan 2026 13:06:37 +0000 Received: by outflank-mailman (input) for mailman id 1209719; Wed, 21 Jan 2026 13:06:36 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1viXuu-0000cn-Kp for xen-devel@lists.xenproject.org; Wed, 21 Jan 2026 13:06:36 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 012f1942-f6ca-11f0-9ccf-f158ae23cfc8; Wed, 21 Jan 2026 14:06:31 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-47edd6111b4so62638845e9.1 for ; Wed, 21 Jan 2026 05:06:31 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801e8caceesm308018595e9.13.2026.01.21.05.06.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jan 2026 05:06:30 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 012f1942-f6ca-11f0-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1769000791; x=1769605591; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=uwKgYVO7Zu6VftyCo1VUWHNj5/MR7CPIRmVZ475YIwY=; b=LlUae3S3PTjBqFM2B6ggVv0FncOwlamWXkIg0sKfBb6OmATLHy6/ruj7dDL+TvZ2R2 DqT5R4bKuCWZ5uWwACFlz6+KLM1Ip23M6KtxrpgGpZVC1WUCJdbaDOEmbEi520xdhfqS J5sECN3HXVu12x/N+gCBmX9msjAnicKVU7rWvoyZhWqO8x6wp730/9CS6ODp4pQ4iSXy fXM2OzKwpfEHd1SSkf+kO9o3jF5AMvVyENHzgLM5o8kOzSvVjklSVBEEm0X/jYlLU/db Slt4SIzGLL5EXzEhBYFguar5m1GpNJ2ou8+wn1v9OfjGv5jG80EbyT1cSFTkTxY6HcBA SILQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769000791; x=1769605591; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uwKgYVO7Zu6VftyCo1VUWHNj5/MR7CPIRmVZ475YIwY=; b=QuRGGrAGsjk3+pF0LKbVG9NY7Q6YkADTV+R30k6V8JArlfZLSUP4UXyYzThzHWQ4Id kQbfAUjgkTF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c:b0:47d:6856:9bd9 with SMTP id 5b1f17b1804b1-4801e3342bamr187365965e9.23.1769000790611; Wed, 21 Jan 2026 05:06:30 -0800 (PST) Message-ID: <169c3509-b2fe-4a5f-8184-0aa9c089ccce@suse.com> Date: Wed, 21 Jan 2026 14:06:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] xen: Expose time_offset in struct arch_shared_info To: Tu Dinh Cc: Anthony PERARD , Andrew Cooper , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk , xen-devel@lists.xenproject.org References: <20260120095657.237-1-ngoc-tu.dinh@vates.tech> <3213454a-38cd-4e5d-8a30-853e37f70c18@suse.com> <7a61a16c-93d7-4cc2-bc47-11e236cf83fb@suse.com> <9df8cf47-d3ec-474e-b1c8-7978e55627d6@vates.tech> <637ad4a0-bc8f-4e75-8906-643f28f94a2b@suse.com> <3bde98b0-5563-4e17-bcc5-c622863d3b07@vates.tech> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNL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EeAWPgskBQL In-Reply-To: <3bde98b0-5563-4e17-bcc5-c622863d3b07@vates.tech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21.01.2026 14:02, Tu Dinh wrote: > Hello, > > On 21/01/2026 10:17, Jan Beulich wrote: >> On 20.01.2026 17:06, Tu Dinh wrote: >>> On 20/01/2026 16:39, Jan Beulich wrote: >>>> On 20.01.2026 16:27, Tu Dinh wrote: >>>>> On 20/01/2026 13:42, Jan Beulich wrote: >>>>>> On 20.01.2026 13:12, Tu Dinh wrote: >>>>>>> On 20/01/2026 11:35, Jan Beulich wrote: >>>>>>>> On 20.01.2026 10:57, Tu Dinh wrote: >>>>>>>>> time_offset is currently always added to wc_sec. This means that without >>>>>>>>> the actual value of time_offset, guests have no way of knowing what's >>>>>>>>> the actual host clock. Once the guest clock drifts beyond 1 second, >>>>>>>>> updates to the guest RTC would themselves change time_offset and make it >>>>>>>>> impossible to resync guest time to host time. >>>>>>>> >>>>>>>> Despite my earlier comments this part of the description looks unchanged. >>>>>>>> I still don't see why host time (or in fact about any host property) should >>>>>>>> be exposed to guests. >>>>>>> >>>>>>> I've answered this question in a followup reply from November, which >>>>>>> I'll reproduce here: >>>>>> >>>>>> I did read your reply, yet nothing of it appeared here as additional >>>>>> justification. >>>>> >>>>> Is the new description OK for you? >>>> >>>> Which new description? So far I only saw your responses to my questions, not >>>> an updated patch description. >>>> >>> >>> Maybe my last email wasn't clear, it was in the part marked "Follow up", >>> reproduced below: >>> >>> Xen currently does not expose the host's wall clock time in shared_info. >>> This means while shared_info can be used as an alternative to the >>> emulated RTC, it can't be used to keep the virtual wall clock in sync. >>> Expose the time_offset value in struct shared_info in order to allow >>> guests to synchronize their own wall clock to that of the host. >>> >>> This is needed because on Windows guests, the PV drivers don't control >>> the timing of RTC updates, as this is done by the kernel itself >>> periodically. If the guest's internal clock deviates from the RTC (e.g. >>> after resuming from suspend), a RTC write would cause time_offset to >>> deviate from the supposed value (timezone offset) and thus cause the RTC >>> to become incorrect. >> >> What I still can't extract from this is why Windows running bare-metal is >> fine but Windows running on Xen's vRTC isn't. If there's a problem with >> our vRTC, shouldn't that be addressed there? >> > > In this case, it's not because the vRTC emulation was wrong, but rather > because Windows's internal wallclock is not Xen-aware And it shouldn't need to be. > and needs to be > synchronized after some Xen-specific events. So it's more of an > accommodation for Windows guests. > > Also, Windows timekeeping integrates closely with its internal time > service, which assumes a NTP-like interface (and thus an external time > reference). The current way of time synchronization in the Windows PV > drivers doesn't work well in this model, which is why I'm looking for a > way to get the external time reference from Xen. Are you suggesting then that plain Windows is fine, but Windows with the PV drivers isn't? That would look to be an issue with the PV drivers then, wouldn't it? Jan