From nobody Thu Oct 10 09:11:33 2024 X-Original-To: dev-commits-src-all@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 4XPPBt2xy9z5Yj8l; Thu, 10 Oct 2024 09:11:34 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XPPBs5p33z4mb3; Thu, 10 Oct 2024 09:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728551493; 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=Dwvc6kY2emnv1907Ah5TAE1RuyMeqXYc1KQRtBkG++s=; b=xWIwVfe+bKbGphYQr6uRh5XHqTci8WqlqDN7WjvsakziGaHkA1FLx+DkIXdthiw/nErUm7 CQu5BJhVSfgACQSZV0Ldy1dQGnaRgoVxuqtWAbLPJhugRnFsiPhnzNtAq4kt3BiVaw7Yha t3PkhFFt3gqmU9xy0BaqAgskIH5wV2sDdnBOIBHlmpiMkBGegdBtn5nqZthD/hidnJ2XB4 I2JkRXWeeOtStE1GQbLPRecFCeQyJbEQgb6dYEcMEAfTxSkeZ5lWUBoUHFzyqhO6qYFviB PJjMfw/F/bc7ig45JbsMHK34mvoXkEtLMXKBrsuhz5lQo7STxH1MxQpV2dnawQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728551493; 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=Dwvc6kY2emnv1907Ah5TAE1RuyMeqXYc1KQRtBkG++s=; b=fiPiMuKlLf1pP6jXaqQMwj9AvJI2jVxmShwnUgVrl4dCWaYJ9L6ptsgGFtp63KTeyAxT/0 D8VrxLXzEzFUwSxlrC33EuUxYcaPxLkjUitidjGRIs8kau/xZO1SoT3u1+OCZxWg6GUs/P WWU+KVuhkYhnBkHSeEQ5zTAfAOyRzO5Z9hkFSVB+SgxgFuW8msGDdnG9oeDZbkjC6dVKUM Al95NrBlc4oS84hw/iUb4ms9w2RqWAyQiz6niu6V55DFtPWgKFZ8HMcjvFtXmd+woCOaST jlywAwYuoLkE9qk0ZUrXW2FLvWtJrGSFE+KU94tRba7JyUouDEz0hjTYrIMozw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728551493; a=rsa-sha256; cv=none; b=jk4Z/Dj71wqFTrJR8R9RlUbVRS1m/XBgJe0TGmugAwJ7zkSH2dFRr1WqRbDf9WtQRHkkpx UmTA3yT69Fyq1lfd1M/xGRx2cBfq5uvLOFdQnVxfp12x4N4xWdrYzfufea85CSpVWlRXjM CMSczCwBKuZkgfrvnhxFMyYTo6oZgIHGJUcJSonbA4JKigrX+iRYs7G55eofOsLmuXKhFI 6akBUtQmkZk0YDsWth9LeR13q71qCNLZ/Qu7YB1XCwV316tnRZ5bIksjFB8lqCuPAhid97 m0f0a9+VtvKu/4R6WKsojKV7yml3Mnx3YCE//syUZpDcyiS/gKgqPyg5Knw+Zg== 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 4XPPBs5N8wzrwM; Thu, 10 Oct 2024 09:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49A9BX1R064122; Thu, 10 Oct 2024 09:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49A9BXhJ064119; Thu, 10 Oct 2024 09:11:33 GMT (envelope-from git) Date: Thu, 10 Oct 2024 09:11:33 GMT Message-Id: <202410100911.49A9BXhJ064119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8952296684ab - stable/14 - iommu_qi_seq_processed: use atomic to read hw-written seq number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8952296684ab0b0ec7800338c3dd3f42333547b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8952296684ab0b0ec7800338c3dd3f42333547b2 commit 8952296684ab0b0ec7800338c3dd3f42333547b2 Author: Konstantin Belousov AuthorDate: 2024-10-03 03:51:20 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-10 09:10:33 +0000 iommu_qi_seq_processed: use atomic to read hw-written seq number (cherry picked from commit eb8326421e6b35b0dee1a8db669914a97bce5cdf) --- sys/x86/iommu/iommu_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index 8ff15cc86cb8..db8f94eb584f 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -350,8 +350,8 @@ iommu_qi_seq_processed(struct iommu_unit *unit, x86c = IOMMU2X86C(unit); gen = x86c->inv_waitd_gen; - return (pseq->gen < gen || - (pseq->gen == gen && pseq->seq <= x86c->inv_waitd_seq_hw)); + return (pseq->gen < gen || (pseq->gen == gen && pseq->seq <= + atomic_load_64(&x86c->inv_waitd_seq_hw))); } void