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 AA2BA374FD for ; Wed, 29 Nov 2023 19:19:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U0GzArZp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B159C433CA; Wed, 29 Nov 2023 19:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701285549; bh=3pW6xnsAUeog7q7Ocl3eZrX2dSAdjHdesiwXTdeS3mk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U0GzArZp8Rf+CuBUmj+By2MGTuVUkY8RTLbOVYHy+AGUJXVluE7T9uXE3Ep5iwTWF FzXw4iQqF32CAuEnP+NEVAbW/7EJeo0r/zRbP55H4+y9gfBqb4HwVjkKWJdhdm1zAH kPexp7o/GRy0wAu/UilidpTzuHtjeTvJ6NWqKSwJms51RMgm2VLdpCsw0AVgyLoeFc WXrouSahovfbi90Wz4DKezr4/a4IGDkfZ+A2RmL4T358YrXTXBR08SBMOIa2aUty09 nOqS5uysbDSY1cFv7dO8Q9SZlkpZrDmTKTJsVyDyuXmM75q+3BIW5IQSOLQLRPW2ey 4M8HnysKdORLA== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r8Q5S-0001gi-Hm; Wed, 29 Nov 2023 19:19:06 +0000 Date: Wed, 29 Nov 2023 19:18:42 +0000 Message-ID: <87il5k8j1p.wl-maz@kernel.org> From: Marc Zyngier To: l00313349 Cc: , , , , , , , , , Subject: Re: [PATCH] KVM: arm64: fix MPIDR to vcpu index cache to support vcpu change at runtime In-Reply-To: <20231128135402.1943-1-liting8@huawei.com> References: <20231128135402.1943-1-liting8@huawei.com> 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/28.2 (x86_64-pc-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.104.136.29 X-SA-Exim-Rcpt-To: liting8@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, zhengchuan@huawei.com, xiexiangyou@huawei.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, 28 Nov 2023 13:54:02 +0000, l00313349 wrote: > > From: Ting Li > > Consider vcpu change at runtime, for example online_vcpus is 8, > but only start 2 vcpu threads, MPIDR to vcpu index 0 may be overwrited > and vm hangs. When start other vcpu threads, cache will be outdated > and always get mismatch. If userspace creates two vcpus with the same vcpu_id, and therefore the same MPIDR value, that's userspace's problem. Don't do that. Why should we do anything else? M. -- Without deviation from the norm, progress is not possible.