From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30E09C4363D for ; Fri, 2 Oct 2020 08:48:19 +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 BB975206DC for ; Fri, 2 Oct 2020 08:48:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="DsT+GE1e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB975206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.1746.5322 (Exim 4.92) (envelope-from ) id 1kOGjX-0001iR-DK; Fri, 02 Oct 2020 08:48:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1746.5322; Fri, 02 Oct 2020 08:48:07 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kOGjX-0001iK-9Q; Fri, 02 Oct 2020 08:48:07 +0000 Received: by outflank-mailman (input) for mailman id 1746; Fri, 02 Oct 2020 08:48:06 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kOGjW-0001iF-TW for xen-devel@lists.xenproject.org; Fri, 02 Oct 2020 08:48:06 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5031ce30-d688-46f1-9c41-1977436e4e50; Fri, 02 Oct 2020 08:48:06 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6B436AC4D; Fri, 2 Oct 2020 08:48:05 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kOGjW-0001iF-TW for xen-devel@lists.xenproject.org; Fri, 02 Oct 2020 08:48:06 +0000 X-Inumbo-ID: 5031ce30-d688-46f1-9c41-1977436e4e50 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5031ce30-d688-46f1-9c41-1977436e4e50; Fri, 02 Oct 2020 08:48:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601628485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CaIWTy0Xra05FhczbcrTApaziPrlp5SYm6vWFV29lVI=; b=DsT+GE1eqthxd1J7NOguwMD2Jah6ZiI+Qt1HgxEDXrLITjB0EixAsj+LNV6a+P126LJ7Ah dLjiAp1wzo7KJX8dtoYmz9X65TKrWaNznZ5x9wsjRW/N6msrJJ7xi51XOg/32D36UFKi3R Lq5GAMMwzGLVdu1I18MUTqqvi83FjGg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6B436AC4D; Fri, 2 Oct 2020 08:48:05 +0000 (UTC) Subject: Re: [PATCH v2 01/11] x86/hvm: drop vcpu parameter from vlapic EOI callbacks To: Roger Pau Monne , Wei Liu , Paul Durrant Cc: xen-devel@lists.xenproject.org, Andrew Cooper , Paul Durrant References: <20200930104108.35969-1-roger.pau@citrix.com> <20200930104108.35969-2-roger.pau@citrix.com> From: Jan Beulich Message-ID: Date: Fri, 2 Oct 2020 10:48:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200930104108.35969-2-roger.pau@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 30.09.2020 12:40, Roger Pau Monne wrote: > --- a/xen/arch/x86/hvm/vlapic.c > +++ b/xen/arch/x86/hvm/vlapic.c > @@ -459,13 +459,10 @@ void vlapic_EOI_set(struct vlapic *vlapic) > > void vlapic_handle_EOI(struct vlapic *vlapic, u8 vector) > { > - struct vcpu *v = vlapic_vcpu(vlapic); > - struct domain *d = v->domain; > - > if ( vlapic_test_vector(vector, &vlapic->regs->data[APIC_TMR]) ) > - vioapic_update_EOI(d, vector); > + vioapic_update_EOI(vector); > > - hvm_dpci_msi_eoi(d, vector); > + hvm_dpci_msi_eoi(vector); > } What about viridian_synic_wrmsr() -> vlapic_EOI_set() -> vlapic_handle_EOI()? You'd probably have noticed this if you had tried to (consistently) drop the respective parameters from the intermediate functions as well. Question of course is in how far viridian_synic_wrmsr() for HV_X64_MSR_EOI makes much sense when v != current. Paul, Wei? A secondary question of course is whether passing around the pointers isn't really cheaper than the obtaining of 'current'. Jan