Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4700160pxv; Tue, 20 Jul 2021 09:36:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhw/Wy+TWQlv/EdxdSwu3HfDgWMWoafhLKcmofAcdwwPhUPVbKAadAkBWfy5DMAFcoGy5+ X-Received: by 2002:a05:6638:1915:: with SMTP id p21mr26886488jal.104.1626799012934; Tue, 20 Jul 2021 09:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626799012; cv=none; d=google.com; s=arc-20160816; b=joVF9lVUr2iWRv8bpbnlpJElDJnI3DZ7FVBsllUTi0JbY0t8wXIxAJRnmWfjYYB1kT vu9qT+Cedp0EzsTCxSF+0/BuxWOPdeoYi/dq0G20B7VQWzud7mfGRkh26SWvYSV+ro4N uCxT6UJNn1urndJgsj7nkB1raXneZPZWduySamIcZeIrg0wr5ofy0dgLYk1h2S+F00BV EgrtG0hR3s37dWx2Fe02Av1tGGbGeoq30uBHwqcw/I2WxDyHJ0XNMez4KPhBzg/fCATm y9AA2uPMGC1U47JpXhoJ7NEbxBl8P4e+0Dlmo5fbVXvVgS+SFApDl4jddtdqVLKVTiN5 hY/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WuSxKbZv1270tdEdT+79zSasF7N89mdYN3IHwx2ceu4=; b=YQDUO7BiUrJFvU/dZ59rDZ6CPbflWYBtt6Lo2pMNQOWArTZs8qwXZVy4wNtjsqxDde L7gbYp45GAYyyNr3fKYrOdw1gOx6D1/7D1RFzh9MZv1m3fbaw2xvci7qbW4XfS2s3GPB KpN+/JBGQWKyG/ejzMQiNrU6M3hAnQy5KN+tFaep2I0+lB5BaBBJU2qzXMQVpCLN/9NX J1bqCPqShvrE5oY1vjrgiy4VTBf9wcNehxMbtgttqhKSa3Ps51PFugyN2+YwUJQRRtoS LcjjSAOe2dFLCXBRfPt2nhxHiylB1zxV8n7V9gNDq2xx9Me/e6LU+NEZdIyeN+kvWDf7 PLUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si25905572ill.26.2021.07.20.09.36.38; Tue, 20 Jul 2021 09:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232100AbhGTPxH (ORCPT + 99 others); Tue, 20 Jul 2021 11:53:07 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:39649 "EHLO mail-wr1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234387AbhGTPst (ORCPT ); Tue, 20 Jul 2021 11:48:49 -0400 Received: by mail-wr1-f41.google.com with SMTP id f17so26674929wrt.6; Tue, 20 Jul 2021 09:29:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WuSxKbZv1270tdEdT+79zSasF7N89mdYN3IHwx2ceu4=; b=WqruCoV+0yBjaMXk2jEM/j0TWM1h7z3hzoSDFsuB7GRue+Ru8lgZVP9ZrG36nEii15 a1/ESjCtXabmZ+GFJ8gpA5Jz1a9rlVFBSoKCXmlLTasP0CSiAI/6HvS3JO9RUDqRuf4/ c7hEoaiCMGHqubbB2wtE+LjPTrG/eVizrIuI7RdQe0ZJ4BIydnG64HRoJmMLvFKVwyU/ Yx/NxBfrtZeFzcCwMp9+HKypfD0MEGWE5Kj5FWGGnQAcoIdiOprG0QNJ4mAPdK8M3qnX BJEdTHIMNb/9q4vgQcv7Edl5W8Rwd6x5SC+g2M2NeuVJAaefV9MOKKJPQWkyP9P5UfuY XAiA== X-Gm-Message-State: AOAM531Dd30VFRvvP6Jwe+e2jgEFn8RDynT2qKxN8bF6VSvrw6zHBMSw 0E43yQfg/BfMzz2bGOh+41I= X-Received: by 2002:a5d:64c2:: with SMTP id f2mr36898120wri.374.1626798565582; Tue, 20 Jul 2021 09:29:25 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id o7sm16630673wrs.52.2021.07.20.09.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 09:29:25 -0700 (PDT) Date: Tue, 20 Jul 2021 16:29:23 +0000 From: Wei Liu To: Michael Kelley Cc: Wei Liu , Praveen Kumar , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Dexuan Cui , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "x86@kernel.org" , "hpa@zytor.com" , "viremana@linux.microsoft.com" , Sunil Muthuswamy , "nunodasneves@linux.microsoft.com" Subject: Re: [PATCH] hyperv: root partition faults writing to VP ASSIST MSR PAGE Message-ID: <20210720162923.rsbl24v5lujbiddj@liuwe-devbox-debian-v2> References: <20210719185126.3740-1-kumarpraveen@linux.microsoft.com> <20210720112011.7nxhiy6iyz4gz3j5@liuwe-devbox-debian-v2> <20210720133514.lurmus2lgffcldnq@liuwe-devbox-debian-v2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 04:20:44PM +0000, Michael Kelley wrote: > From: Wei Liu Sent: Tuesday, July 20, 2021 6:35 AM > > > > On Tue, Jul 20, 2021 at 06:55:56PM +0530, Praveen Kumar wrote: > > [...] > > > > > > > >> + if (hv_root_partition && > > > >> + ms_hyperv.features & HV_MSR_APIC_ACCESS_AVAILABLE) { > > > > > > > > Is HV_MSR_APIC_ACCESS_AVAILABLE a root only flag? Shouldn't non-root > > > > kernel check this too? > > > > > > Yes, you are right. Will update this in v2. thanks. > > > > Please split adding this check to its own patch. > > > > Ideally one patch only does one thing. > > > > Wei. > > > > I was just looking around in the Hyper-V TLFS, and I didn't see > anywhere that the ability to set up a VP Assist page is dependent > on HV_MSR_APIC_ACCESS_AVAILABLE. Or did I just miss it? The feature bit Praveen used is wrong and should be fixed. Per internal discussion this is gated by the AccessIntrCtrlRegs bit. Wei. > > Maybe the VP Assist page is not useful for the APIC EOI optimization > Purposes if !HV_MSR_APIC_ACCESS_AVAILABLE, but the VP Assist > page has other uses, such as for nested enlightenments. So I > wonder if the VP Assist page setup really should be gated on > HV_MSR_APIC_ACCESS_AVAILABLE. > > Michael