Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3216928ybe; Sun, 15 Sep 2019 10:06:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrQ4O6pXwaBSQUc1AMXm1y4WTFlnhu72cqIfPybOeC4lCv+zw/mVLPdiCLcjeGONEX0ehk X-Received: by 2002:aa7:d5cb:: with SMTP id d11mr58762016eds.250.1568567169871; Sun, 15 Sep 2019 10:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568567169; cv=none; d=google.com; s=arc-20160816; b=g+I+W/TxVOpIqtymGFM1VQrREa8eibOago8rDEEK9NugodkYHUZrfkZ0Lj1De/LbPo gKwl1Tv/2Af9Jr4luOST9u591FvocC2l3CU/I3Sjb4cSpkVP1ikr5Zf4CR0q/sPknffv 00T5PVsN/WATac7oQ653A2zgGwwFVPxVgjZgrdrCq+rH8/oYTTc9/wgxdbvYOUhsvgEZ N5V2NMpbctizqCSK9IOwq/FeYjeoYf7IchGpkn+7gFgaUHxMQ2b2L0Lr8F40sZTjQP/a xlUB0Ikes/SYDK9+QHMlDyD2loaIhd/jUZzfmrGuc0pUgjBnsl/D4w40ZHAjpF6mmwm2 zGnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OSggQBJ5nKFcizMVUM+lNNQnJOZxlBnYytq/ai6YrZA=; b=ZIjQq3i8zx8WxiguApj08u/LC5mb5+Kqc/DwUGY8JAducNUpnzJauQCi1iOWCT06Y0 EVmYlk6/CoPLUHmVKGS4LetpaEvQaDDD39VCLVZtrznGRaHZO5iYuO0U8yrHV2te2p9/ Id852qB4Va5TlOwFxnAqwEpxH2YbAUUDr6gCCUQZjrgPcWw+dXSlp4YWgk9Gb3Byucuq IzkGAFRHXDVebfFDohRyQrPN5V+EO39s9fHCdkxKOZhdndoaqAfWaIVy6NdCKBhPSGCW tay8az0fLxXPjW9cHGEDOXa4PsvvuAo0rBqxJ1v+PJ2UcOzMucMT6iyUIi54GehYl7yx J35g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si4070308ejr.274.2019.09.15.10.05.46; Sun, 15 Sep 2019 10:06:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727171AbfIOQzZ (ORCPT + 99 others); Sun, 15 Sep 2019 12:55:25 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55405 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfIOQzZ (ORCPT ); Sun, 15 Sep 2019 12:55:25 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 86E1B81325; Sun, 15 Sep 2019 18:55:09 +0200 (CEST) Date: Sun, 15 Sep 2019 18:55:16 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Vitaly Kuznetsov , Roman Kagan , Paolo Bonzini , Sasha Levin Subject: Re: [PATCH 4.19 042/190] KVM: x86: hyperv: keep track of mismatched VP indexes Message-ID: <20190915165516.GA4901@bug> References: <20190913130559.669563815@linuxfoundation.org> <20190913130603.107888371@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190913130603.107888371@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2019-09-13 14:04:57, Greg Kroah-Hartman wrote: > [ Upstream commit 87ee613d076351950b74383215437f841ebbeb75 ] > > In most common cases VP index of a vcpu matches its vcpu index. Userspace is, however, > free to set any mapping it wishes and we need to account for that when we need to find a > vCPU with a particular VP index. To keep search algorithms optimal in both cases > introduce 'num_mismatched_vp_indexes' counter showing how many vCPUs with mismatching VP > index we have. In case the counter is zero we can assume vp_index == vcpu_idx. I don't see why this is stable material. > u64 hv_reenlightenment_control; > u64 hv_tsc_emulation_control; > u64 hv_tsc_emulation_status; > + > + /* How many vCPUs have VP index != vCPU index */ > + atomic_t num_mismatched_vp_indexes; > }; > It adds a write-only variable ... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html