Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F2D4C433EF for ; Thu, 18 Nov 2021 18:05:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13D4C6138D for ; Thu, 18 Nov 2021 18:05:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 13D4C6138D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=srcf.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.227548.393572 (Exim 4.92) (envelope-from ) id 1mnlme-0007qZ-Ox; Thu, 18 Nov 2021 18:05:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 227548.393572; Thu, 18 Nov 2021 18:05:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mnlme-0007qS-L8; Thu, 18 Nov 2021 18:05:16 +0000 Received: by outflank-mailman (input) for mailman id 227548; Thu, 18 Nov 2021 18:05:15 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mnlmd-0007qM-7y for xen-devel@lists.xenproject.org; Thu, 18 Nov 2021 18:05:15 +0000 Received: from ppsw-43.csi.cam.ac.uk (ppsw-43.csi.cam.ac.uk [131.111.8.143]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1435481d-489a-11ec-a9d2-d9f7a1cc8784; Thu, 18 Nov 2021 19:05:14 +0100 (CET) Received: from hades.srcf.societies.cam.ac.uk ([131.111.179.67]:37414) by ppsw-43.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mnlmc-000DPz-mb (Exim 4.95) (return-path ); Thu, 18 Nov 2021 18:05:14 +0000 Received: from [192.168.1.10] (host-92-12-61-86.as13285.net [92.12.61.86]) (Authenticated sender: amc96) by hades.srcf.societies.cam.ac.uk (Postfix) with ESMTPSA id D51721FA51; Thu, 18 Nov 2021 18:05:13 +0000 (GMT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1435481d-489a-11ec-a9d2-d9f7a1cc8784 X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: https://help.uis.cam.ac.uk/email-scanner-virus Message-ID: <0352b245-8dee-c960-18e2-ee0ae5846001@srcf.net> Date: Thu, 18 Nov 2021 18:05:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH 0/3] x86/Viridian: ExProcessorMasks handling improvements Content-Language: en-GB To: Jan Beulich , xen-devel@lists.xenproject.org References: <0b8a1864-5ae9-3b19-4d43-893a5777985e@srcf.net> <44ccd257-6c8b-c35c-a0be-1ebdbd6d8ad6@suse.com> Cc: Paul Durrant , Wei Liu From: Andrew Cooper In-Reply-To: <44ccd257-6c8b-c35c-a0be-1ebdbd6d8ad6@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 18/11/2021 13:34, Jan Beulich wrote: > On 18.11.2021 14:20, Andrew Cooper wrote: >> On 18/11/2021 13:12, Jan Beulich wrote: >>> I've noticed the bugs fixed in patch 1 only while doing the other cleanup. >>> >>> 1: fix error code use >>> 2: drop dead variable updates >>> 3: fold duplicate vpset retrieval code >> Oh, nice.  This makes it rather easier to do the flush short-circuit for >> HV_GENERIC_SET_ALL. > To be honest I first thought it might, but now I'm not sure anymore. Just this delta: diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c index 658e68f7f2bb..c8c05bfb04a1 100644 --- a/xen/arch/x86/hvm/viridian/viridian.c +++ b/xen/arch/x86/hvm/viridian/viridian.c @@ -771,7 +771,8 @@ static int hvcall_flush_ex(const union hypercall_input *input,                                    sizeof(input_params)) != HVMTRANS_okay )          return -EINVAL;   -    if ( input_params.flags & HV_FLUSH_ALL_PROCESSORS ) +    if ( input_params.flags & HV_FLUSH_ALL_PROCESSORS || +         input_params.set.format == HV_GENERIC_SET_ALL )          vcpu_bitmap = NULL;      else      { which now I come to think of it independent of your cleanup, and small enough to be folded into my main IPI change. ~Andrew