Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3899197imc; Sun, 24 Feb 2019 16:16:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IaulSG6pOLkDw5jfHKqZTyhup19uWVazsImqsrxAr77q5p2yCHx+k9z+Chs2uBPDsZcOQZE X-Received: by 2002:a65:6489:: with SMTP id e9mr15874993pgv.260.1551053795071; Sun, 24 Feb 2019 16:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551053795; cv=none; d=google.com; s=arc-20160816; b=W5MI5oxr/ZZWbrHbfQnNuZOGzqL/9m89gsyyYrhIscPprRNt9HypE0s/1F53zkpD4r xpgV2z0vG7cbsLjqsVCngMlZbAw9YJ1J2D1CCofIrIOfUhKyJYXNRcKtjdt340SzVhPI cXLSpl8a9K+S3YKC23wWlxENyIc64HaoBhdeC27WN7Vl3XeluMuTKwAZoMhd2jPzJFkz IRuofzpieQaLT62kqef/YbyoZoI+yl7iNf7WmQUk6GEy9IuCvjX0e9+uXw5hXHfNCANg JKqIFsS/6MbiNxGC3LIkApAxhtK2DNhWex0HFpzb2u25FhbHHkAl3n/M2qWNZb9Y7BZc /YHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mRL6UsEO/rvJ55w2sZtRGCTBil9aZeQ8KAlWhXZVy+I=; b=f5M5O/0hmdLeicXyuaOdUM85WGy+nG2wbopnEKjB3AC7a+6zH3Cpw2XPmAXBDL5Ced nLRUC3GJFX5AuvH7MgJ2taNMdwFH3QVrifh6kLcvUlHmwVStUNN4ZwKyRUVKwP5g83d3 mwb7KlghwR8kVbVJ9bPg4aK6PNkqvpDu9isgL/o0OioEO0qFXSFHhEO2NE4sGA4TChIK VgSrNPHb8ikyLrPBmuub94XzalXU4g2IxVWV9EHJpP+cGlGdES2WXP5kmf6ZxK+z9ht1 f+2JEvS+pPd7QqNdgAGniI570USCv/5DgwBuvAbrLO46bDWuIklCwM5LX3zrkacIIS+E Nf3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GuJbCb3e; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si7798044plo.317.2019.02.24.16.15.47; Sun, 24 Feb 2019 16:16:35 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=GuJbCb3e; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726511AbfBYAJi (ORCPT + 99 others); Sun, 24 Feb 2019 19:09:38 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36778 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbfBYAJh (ORCPT ); Sun, 24 Feb 2019 19:09:37 -0500 Received: by mail-pl1-f194.google.com with SMTP id k2so3615045plt.3 for ; Sun, 24 Feb 2019 16:09:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mRL6UsEO/rvJ55w2sZtRGCTBil9aZeQ8KAlWhXZVy+I=; b=GuJbCb3eMvzjkg4qro6YPQvpox8bPAZ7vm1/gcP6GrfdT/+6jcWknXGKqZAUoGiISZ rdhahPnwLLfsbGZJMXtwgphzvo54SmuIzrM6x0O32mfA6g68+bGw6L04fvxeLDkXaV7a xFfi8+zZg4EPuPfI4S8H91mfjyVir1zCf2nnURJUWb43onTN7mDfU4XIPM0tsKG/ZHzL tbAHqVPgFplWf5fh/L/7g4WbXk7oYzokWEi3UN2WkgsXeBlsAzbROAfoqj31hGVSXF2G WtU59aM+CgoIqfY47NocAYFQZKOEK2tLeQdJ5h6NTwReWpnEBdSV8E6/asXaqjS0nu2E IdzA== 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:user-agent; bh=mRL6UsEO/rvJ55w2sZtRGCTBil9aZeQ8KAlWhXZVy+I=; b=oko0mb3s9Mn+sO24KvZkgUY6+bNMJdtZRV1LmQoVa8uPMudLhX4oH5x53f3QSsFJyQ zssiDUo2E+7PRnhLWptQZnaa8bj7yE9t0wdsBJDcn+LheOfD4z2pCIX7usi0+hLacnM7 6FX03meV1c6wwkCaHRl7QTUt33QXIYV86VgT4NbN8rIpkpZh/pnNljZ3nRPOC/DIIlLB hoeqS+QlN52mNQ/1ZThWtWW8jSiY9aqYG65YHbndWt/0pn7mIQ8AvGsQw1HslgiJFRL4 fxNXoEUnXG9p2PRkLOcz99W7uXQKosZmOekibFlQOJmWWEM9P8EMVr7Dbu1rQ0fKlsNu gAkQ== X-Gm-Message-State: AHQUAuYKvUpB3m1ugCCheqx+VNOnPkwsleBeZ33HknZaWCyhP2Xg89Ty LK4QtfAPr4GndD2l1MKePimfUA== X-Received: by 2002:a17:902:145:: with SMTP id 63mr16881078plb.256.1551053376828; Sun, 24 Feb 2019 16:09:36 -0800 (PST) Received: from leoy-ThinkPad-X240s ([240e:e0:f891:19f7:b1b0:fed6:e3b3:4ba1]) by smtp.gmail.com with ESMTPSA id 70sm24500168pfr.43.2019.02.24.16.09.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Feb 2019 16:09:35 -0800 (PST) Date: Mon, 25 Feb 2019 08:09:17 +0800 From: Leo Yan To: Marc Zyngier Cc: Christoffer Dall , Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Andre Przywara , Jun Yao , Paolo Bonzini , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/4] KVM: arm/arm64: vgic: Improve comment on kvm_vgic_inject_irq Message-ID: <20190225000917.GA4001@leoy-ThinkPad-X240s> References: <20190222082327.3312-1-leo.yan@linaro.org> <20190222082327.3312-3-leo.yan@linaro.org> <20190222083756.359523ca@why.wild-wind.fr.eu.org> <20190222085439.GA845@leoy-ThinkPad-X240s> <20190222093923.09e36583@why.wild-wind.fr.eu.org> <20190222124906.GB845@leoy-ThinkPad-X240s> <86r2bzrful.wl-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86r2bzrful.wl-marc.zyngier@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 22, 2019 at 03:40:50PM +0000, Marc Zyngier wrote: [...] > > > The interrupt affinity is either defined by the distributor > > > configuration (SPIs) or the ITS configuration (LPIs). > > > > Given to the up example, I am struggling to understand how you can set > > the interrupt affinity for virtio device. > > > > Do you set the physical interrupt affinity to CPU0/1 in host OS and > > forward it to guest OS? Or set interrupt affinity in guest OS (I > > tried on Juno board to set irq affinity in guest OS from > > '/proc/irq/xxx/smp_affinity' but failed)? Or this is accomplished by > > user space tool (lkvm or qemu)? > > virtio interrupts are purely virtual, and the host plays no part in > their routing (nor does userspace). As for their affinity, that > depends on the virtio driver. Some virtio devices allow their affinity > to be changed, some don't. Here, this is a virtio-net device, which is > perfectly happy to see its queue interrupts moved to a different vcpu. > > I tend to run irqbalance in my guests so that it actually exercises > the affinity setting in the background. > > > Sorry if I am asking a stupid question :) > > It's not stupid. You're simply confusing multiple independent layers. Thanks a lot for explaination, Marc. Thanks, Leo Yan