Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp274410imm; Mon, 1 Oct 2018 09:42:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62DV5GMdJ/g7QJueEq4QJmlb4awY3/vM7a/9fL5L2lnqyTYBim/lU6Tx4YmR/RSAzwp+4sg X-Received: by 2002:a17:902:3c5:: with SMTP id d63-v6mr12558123pld.145.1538412169791; Mon, 01 Oct 2018 09:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538412169; cv=none; d=google.com; s=arc-20160816; b=FmP17Vt/91ywVekl/ApimAwxHv6SC1gMyAzTqgpC4uJPv6A8EuZwn6guwi5kM60ihO XFpWfeH3iWqTq54NtVM9XXt+y9aBdN80/yfTv6fEGLtTPSSc9j3DO0EA0utsovIMG+lT tZmhdSG5I8DXzOLdztUMERih86HvWX9Jo1LC/tpXz9wKAny6zHLuyfYTkXtVNZkIibec KohTOFGZevBbRMDEUeKyE/mV7OAFMFMT0+7VkDH42PmXxzAob0bQGb8HRMo1Oj/GbuEK mSKCLinRVoQ9ZmF/km71EQhqNddIkFGHv+9X4SnX+nuJWnJyeYY1rJOGX9Z7V5O/iHGZ PnEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=XSRGFQPZebl+1eHE6pERmCgfBDgfLdlQaZPnbZLskXE=; b=CRGXDAubAdDSoZ4yXcfie2ERv/Jc8E+lvH4jzF7CCzebYpabbNFhvuLKmlOU1v6AyE jUqX/tuxykwCE8H8W0YoKNkZrQFk8kfSiLx/rKKarfQAC590UshO63xLfi7+vhperICr rmVfO5xPGq2jS9v0fv20wT1isLTrRo5KUif8Ot21C9IoU0F5rdFP6+E5SA3y6gbunL3y wH2wjCTGddDLaXEyOgcPPOjB2YqzUwMd/tXwmuTl0fapV9158qpxFzNNfC0jz4UulRZE muBQtFHZrHm2Zmqjk2JZ7RVs9lgKqeCtAW2BKMnwCNkWRU0cjCcRmzntdqsbiOl/QuA8 e2OQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16-v6si791868pfb.69.2018.10.01.09.42.11; Mon, 01 Oct 2018 09:42:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726204AbeJAXUn (ORCPT + 99 others); Mon, 1 Oct 2018 19:20:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49714 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbeJAXUn (ORCPT ); Mon, 1 Oct 2018 19:20:43 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5CF730E684D; Mon, 1 Oct 2018 16:42:04 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (ovpn-204-59.brq.redhat.com [10.40.204.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C1A85E549; Mon, 1 Oct 2018 16:42:00 +0000 (UTC) From: Vitaly Kuznetsov To: Paolo Bonzini , Roman Kagan Cc: kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley \(EOSG\)" , Mohammed Gamal , Cathy Avery , Wanpeng Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 7/7] KVM: x86: hyperv: implement PV IPI send hypercalls In-Reply-To: References: <20180926170259.29796-1-vkuznets@redhat.com> <20180926170259.29796-8-vkuznets@redhat.com> <20180927110711.GE4186@rkaganb.sw.ru> <51ff55e0-9d8d-73be-e0e7-f8580bc0206e@redhat.com> <877ej1fxkb.fsf@vitty.brq.redhat.com> Date: Mon, 01 Oct 2018 18:41:58 +0200 Message-ID: <874le5fwkp.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 01 Oct 2018 16:42:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paolo Bonzini writes: > On 01/10/2018 18:20, Vitaly Kuznetsov wrote: >> Paolo Bonzini writes: >> >>> On 27/09/2018 13:07, Roman Kagan wrote: >> ... >>>> >>>> I must say that now it looks even more tempting to follow the same >>>> pattern as your kvm_hv_flush_tlb: define a function that would call >>>> kvm_apic_set_irq() on all vcpus in a mask (optimizing the all-set case >>>> with a NULL mask), and make kvm_hv_send_ipi perform the same hv_vp_set >>>> -> vcpu_mask transformation followed by calling into that function. >>> >>> >>> It would perhaps be cleaner, but really kvm_apic_set_irq is as efficient >>> as it can be, since it takes the destination vcpu directly. >>> >>> The code duplication for walking the sparse set is a bit ugly, perhaps >>> that could be changed to use an iterator macro. >> >> I actually like Roman's suggestion on how to re-write kvm_hv_flush_tlb() >> and I also agree that it would be easier for future readers if we write >> kvm_hv_send_ipi() in a similar way. Actually, I already have v7 in my >> stash, will be sending it out shortly. > > Just send follow ups now, please. I already have enough long queue. :) Oh yea, you should :-) No problem at all, I'll convert v7 into a follow-up series when kvm/queue is pushed. Thanks, -- Vitaly