From nobody Fri Mar 17 10:29:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PdL375GHCz3yBbw; Fri, 17 Mar 2023 10:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PdL374c5Pz3GWR; Fri, 17 Mar 2023 10:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679048963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOJ7WScVgUG2QAJD1alrINhIfi2kiCwQi6pejjHLt7o=; b=JORgCCNLoFw+bS8m3x4OLGsL8ySUsgWNxlk6mPcTEQyhamZXwqkP4ZSdSnvUhnpQ7y0EbH WU7Ub/QxUe1ngdDYHe460BT5Yq3YUipRpRPY2NCbRDCVeTmir/K1/c5q4wySHt7hJ1q7wN kwVMSMentteabPL66sNvf8Jllt6lHcyHslQPdOkZZkdcdo8sRyk1/uUCPdR+3uF7p0j14k qWrFJgCSXefakQaJUANa+JPT/Enrotme6xQ+OMqdoqYmnOpgPHSWDeS3xMJgWJx+hvLlb1 EolRJj/PutISC4j3Yd5cM8qStqPQ7wE7oWBKELeYE2whyrcoUkUYwkaqwIHkkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679048963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOJ7WScVgUG2QAJD1alrINhIfi2kiCwQi6pejjHLt7o=; b=A0VCXhYgHqhFQXb0avCSIMGVsyEKGmWAuyS1cixMsQaFA14JW8UpQyKrteWapgZ5jjGVJj X2Wau8c0BJftxpPeeGmX9vF4BufZoUPpNjkCHWEzhlMCCvc4HLoLJftklF8pjp2QIdsYg+ wk+PoqrYKQpJw2UZTo5UNB4Mw23EMAuLZWRcu4wvar0m9Z0YLdUTrlHbP83p+eptdmRUZQ vBtX5egEwq0+pAo86NRbIQOr+K9GfWh2Rux3k1sfoIzcGRIxs4BO8rDQQfDdrbe2FHMqE2 yEipbHgBpn+WQ2xCX3P4+2uAQFt6cBM/a9RUo4NU8ACuVQcRzOfgchvol5NAWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679048963; a=rsa-sha256; cv=none; b=WyHmuQk0ouDFjklo26yoQ8bKDE2dHJ8uA3waRO5c5Pw0TyZtlBO04U2bnrKYDxqa7rsm61 VfYChlL5HwUFpGpkavl4g5aryJqjs7SxD3PBJx+5ii1KaIDQfb34O3XmHJEwe0NYauH9Lk vugaIAzSZe9pdyGZfX8m7M4poa4zdy7eArxtY0lhGha02/aC3xjYdECuUHiMBJ4BhwTxol EBK35sLinv/MYJl7NFzGZFAH92ZuU+nRUr/Wn1dQaFv2YkqntMGOvjzVVrikCYM0L8T2s9 NKC90nKoRQ/Gs5l+KPAcO41isZ6weBi6V3/aMEGAARrXXbbpX6rcF9bi4IHDNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PdL373bnBzMjw; Fri, 17 Mar 2023 10:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32HATNT3067308; Fri, 17 Mar 2023 10:29:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32HATNEQ067307; Fri, 17 Mar 2023 10:29:23 GMT (envelope-from git) Date: Fri, 17 Mar 2023 10:29:23 GMT Message-Id: <202303171029.32HATNEQ067307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: fb18fc6b050e - stable/13 - vmm: fix restore of TSC offset List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb18fc6b050e540a694271af7ac1c293e0f4a5b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=fb18fc6b050e540a694271af7ac1c293e0f4a5b3 commit fb18fc6b050e540a694271af7ac1c293e0f4a5b3 Author: Vitaliy Gusev AuthorDate: 2023-02-28 11:16:35 +0000 Commit: Corvin Köhne CommitDate: 2023-03-17 10:26:33 +0000 vmm: fix restore of TSC offset After suspend/resume Ubuntu 20.04 and 22.04 installer can hang if tsc-early clocksource has a big skew. Reviewed by: corvink, jhb Fixes: a7db532e3a6f83067b342f569b56076d011f8a1e ("vmm: Simplify saving of absolute TSC values in snapshots.") MFC after: 2 weeks Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D38474 (cherry picked from commit 281b496f22d1d666b2ef1e54985432627ec434a4) --- sys/amd64/vmm/vmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 692b8c991310..8cdf57608055 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -2859,6 +2859,8 @@ vm_snapshot_vcpus(struct vm *vm, struct vm_snapshot_meta *meta) */ tsc = now + vcpu->tsc_offset; SNAPSHOT_VAR_OR_LEAVE(tsc, meta, ret, done); + if (meta->op == VM_SNAPSHOT_RESTORE) + vcpu->tsc_offset = tsc; } done: