[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/hvm: Remove callback from paging->flush_tlb() hook


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 18 Nov 2021 11:45:26 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OThHxnLMh6a/fp4/DH5Ojoo2i/SoiQIGmuNLzLU7vuE=; b=OtbIWfZmqjlVmbfTB/PiPjenOyNnAjGDJLBvwj5OrlsZfn9jJNspKeiiTKhciOSnIW4wcmwO7GXshQViIlYAazjlJbRQY8js+coSvY0QO03gAEvxJkAfgkd3k0bn/upD5dSF6jXb4iWLfPKTC+qkiMeZiF5KpHITViZa1zNIm2EDfMJCAay4ET/MB8xvuI8zK3MgTfv/D5HoMGJstsHUV0aOOs6THzmBbere4JUgerzWPDxFIVZ7YnG3lGqd8FTZiqs6mzYwp8W3xCcfErklelL/H+PyNolvag/7iA3Kw3gcnNSoZj7o59LVMtdKoVyQ5hly1h/hfzjVKFmMZndLfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwhCfzztOX6co4uzM4PNiL4cxwHW5hCBwGF4b3bSQfaIbafsuRLDVilVbXwgY+smcE4s1geccQ9QAkdfppCm8yYJ1TKgvUBvqfgij12UQUMW2nvgm78eBtVe0HkAt+MZzBna0oQnzJ4jgsbW0j5en+36mBcfdNv4IPwA7GJVkF666DLvA0gG7tfrLnvKhSCbPupKdaeBl5CZd643YmNPWna1WjnVMVqMQL6l7wsE9ILgA7n0/gg3ZrDNRUkqir9GzNjGyeqx0N4M42e2URsvNRqFOIh4FBFk2QnqhNA5hHEpzZCuy5f+TVWeXJb4fvANXRbm+dlzgZfu60wPcu47Eg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 18 Nov 2021 10:45:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.11.2021 19:26, Andrew Cooper wrote:
> TLB flushing is a hotpath, and function pointer calls are
> expensive (especially under repoline) for what amounts to an identity
> transform on the data.  Just pass the vcpu_bitmap bitmap directly.
> 
> As we use NULL for all rather than none, introduce a flush_vcpu() helper to
> avoid the risk of logical errors from opencoding the expression.  This also
> means the viridian callers can avoid writing an all-ones bitmap for the
> flushing logic to consume.

I think you want to clarify that you convert only one of the two ways of
specifying "all". The other (HV_GENERIC_SET_ALL as consumed by
hv_vpset_to_vpmask()) could also be converted, but this would be a bit
more involved. I have no idea which of the two Windows would typically
use, nor why there are two mechanisms in the first place.

> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.