From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 062FB303A3B for ; Tue, 10 Feb 2026 19:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770753280; cv=none; b=Len7P41YP0qL6s64PbrrNNF/Iwu0Ev5vUqJiX8pOyIjkLE+pCzWV1atdeBt2cFWvgw8mohNynG2NdBRPxiKU1RK/1bAdiW+jGmd/etQ6IHu3F7Yy9V55UyKm9WdAi0+aaxoNU6FQKphKCw6OKM2x08m5CtMjiTk89kWh0wdPjvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770753280; c=relaxed/simple; bh=437xC22g9+tV/N6yAI/dqEQIyz9ybAdJ91qweCnuORU=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=VXdb6vuiKB7t7hsIWxUmoc1YhRyW2AaJ/OZVY46l0NdweqSdlnA4wKh6w7bMGmvFTNrbsPa1WvFcIM2qcWfLbmkJAkDPfYi26SWi1Is5rf1CF17OiEcNaIU1s2iuJUxW9e/db0ccp/jGgZvqjvBrmrhOHahm1YUGNJCCoQ1ZDqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pvUZ6kuG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pvUZ6kuG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78327C116C6; Tue, 10 Feb 2026 19:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770753279; bh=437xC22g9+tV/N6yAI/dqEQIyz9ybAdJ91qweCnuORU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pvUZ6kuGGvA74InQaSUxdpYpm5t6ywry73qZbeVLBBbePA4SDwQ3RbOkelzBJVL3b Gfge5ZzcckvCN70T6h2FPe6VtmumLRjr48PZ1Bf8xIWnldxPOW3pi3fMpQARyOFmyu iA8itPNhduWlIhXpIRlvoU5fs+kGjqALOidczW8B6QiRW6VOXkZfBOdcnTHsItnQ14 bUSOMMKlFF7FK4CEAcuQSBSQ4XO11TI9Umc/QPrmozLFtuKt7/2Pnx8dcnEAuW7Vcv NQmNVVbu/cxHNPgZfZ/gncuTnb1ulhFqIjr/lsVJ16V1sNcbfOpm9zhuTqy1zmyP99 acT/G7+9WNNAw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vptoj-0000000A9vi-0eFx; Tue, 10 Feb 2026 19:54:37 +0000 Date: Tue, 10 Feb 2026 19:54:36 +0000 Message-ID: <86o6lwbchv.wl-maz@kernel.org> From: Marc Zyngier To: Quentin Perret Cc: Will Deacon , kvmarm@lists.linux.dev, oupton@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com Subject: Re: Broken udelay() on KVM host with a vcpu loaded In-Reply-To: References: <86qzqsbw1m.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: qperret@google.com, will@kernel.org, kvmarm@lists.linux.dev, oupton@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 10 Feb 2026 15:58:14 +0000, Quentin Perret wrote: > > Ouch, it does seem that the SET_ONE_REG stuff allows to mess with that > value _out of vcpu context_, so yeah userspace could change the value > while a vcpu thread is preempted in the middle of a udelay loop ... I don't think so. You can only do that on the vcpu fd, and if the vcpu is loaded, it means that you are already holding the vcpu mutex. And if you do that from the vcpu thread, then you already have done a vcpu_put(). M. -- Without deviation from the norm, progress is not possible.