Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp956075imu; Thu, 22 Nov 2018 07:52:06 -0800 (PST) X-Google-Smtp-Source: AJdET5dsTtKusT01ekLCAfkkBOR6/i75J0c8qe97NbhgfUv/V/yzXURNH2Uvu6anEH+IZldlNzWu X-Received: by 2002:aa7:8497:: with SMTP id u23mr11924552pfn.220.1542901926670; Thu, 22 Nov 2018 07:52:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542901926; cv=none; d=google.com; s=arc-20160816; b=myRj1Dn1pLcUlD9pi5h0qBed45qo1+gOjCoYfOunLzxzkpmSmWKFlLzV0Fsbm1F65H 8CqamrYEpzCwJZt0QPjaS/eyziYECKjG1xiC4F44743IH+PJhis3P8Bmh3E7q7sWAsck qwT6Usx1sF/0UVF0WCDvZRxH+/uacr1OmxW4VSrDs4ZvazAmWUtw6t9WfBQ6mkUhYWNH u6Nf51/AXtRf/FvDvrY8QWA4ZrwwYiBgk6qOrthYtOSHzQoZDdA0OMaXA+yz5nzUUnIf FyUqtND7x6qlFel2LoiISeN+V3YEPKb7fdY05JapnH80tj2HLxGFwKdg3IWJslfW9SZ3 9yBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:reply-to :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=O/TEzy5BmJ6nqKWPElbXC0H2n51vnyu556qQF52Vss0=; b=ikO+uSsHucf87LPxviI9xhgmwXcX5p+T65G+s8WpkrzVw6TUpiM+7aw2FTTWQ5sV9Y 6dgss/5O66bxCaiK6iBFpBPFXyc9c6EqzftMBGV9VE6Abc2NIfEkvuPBuUs54QhYHWrF DlVNcAhUFTkf44CtKsIemDvdxIC4k/TadZT15a+Ij1am633vHfL+ckA5ejUh5l2gWFdj iBTGahcCTVFCUago3XYhDnkV6u3ChlI/ODW6YrPI95VWMweBJdi/LkN0XWgxf6VyvtBW jwtzj0AernayqssrSgwDdjjBPCoVDjlpG4VmHpH2zoY2B+b+RWiuWxzFkTQ2PZ1GRvw4 NKWw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si48152672pgl.414.2018.11.22.07.51.52; Thu, 22 Nov 2018 07:52:06 -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; 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 S2388512AbeKVNtX (ORCPT + 99 others); Thu, 22 Nov 2018 08:49:23 -0500 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:34480 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730504AbeKVNtX (ORCPT ); Thu, 22 Nov 2018 08:49:23 -0500 Received: from linuxonhyperv2.linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with ESMTP id PfOQgqzUCse9VPfOQgywCR; Wed, 21 Nov 2018 20:11:02 -0700 x-originating-ip: 107.180.71.197 Received: from kys by linuxonhyperv2.linuxonhyperv.com with local (Exim 4.91) (envelope-from ) id 1gPfOP-0004GQ-SO; Wed, 21 Nov 2018 20:11:01 -0700 From: kys@linuxonhyperv.com To: will.deacon@arm.com, catalin.marinas@armm.com, mark.rutland@arm.com, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, sthemmin@microsoft.com, Michael.H.Kelley@microsoft.com, vkuznets@redhat.com Cc: Michael Kelley , "K . Y . Srinivasan" Subject: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ Date: Thu, 22 Nov 2018 03:10:58 +0000 Message-Id: <20181122031059.16338-3-kys@linuxonhyperv.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122031059.16338-1-kys@linuxonhyperv.com> References: <20181122030914.16274-1-kys@linuxonhyperv.com> <20181122031059.16338-1-kys@linuxonhyperv.com> MIME-Version: 1.0 Reply-To: kys@microsoft.com Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfLJu3a4QI8aw6Tzl5UCoLusefq6FAcOrnyMe75v908rojsSVShaQRGsYFMiKZKRl8gL/JWmm5uwsyooKF0ojAQWKN7ohNJiBM4RfmDR+PtV6BWqEZ5Vf /P+m78RZusUKyRvgZe45CxRqSbeyvy5kI8dPY7XXEtmUhZ7GHfS+2FERB25hDZUBQ3oReb3A5GcncYxu8zOOTDC+AzR4yHw+ZThH42e8fy6p9QUlGbqhqjmT 8xk+R1vqMoNGcF+Kvszp1ZsvpLCrdoSz9XZOo4rC8jritvpeF6unI/Vh4/cGJmjuVln+ZWLGhZ530H1R0/V1bmpppax4cwS9fxuKbVJ3hiPzyeCmVuUB5pvG MpLcWCHMoHt60l0QE5ePs6CDTjZnLrItsPesaWi3UAtm8tcQmwLCKSs0cIbZUVFWMhF59UeYwxRpyWsSqUQzbr+FXY0nuI/xvuv4jTqhHsKz+aYVaPqjshmM vInPi/A2/5d1ZEcm0wEb45O9A6UyrEcm2BX+9B0sbEcN03Jro7aXvBmynLQ8voLqj7Kw20NMS4DZ3cNwlJWr9pkEX/WAl+TZdJ2l4dvdALuwsoY53d7t0hnf 8qNpGs30NN+dpL6hX+e9H/fiScmcEGI/RW/B6GqFVraw+yC0w5tCMdj95rsqOYSLPYTgPM57HlcTMiWhlYkUSZbw5SY4/HB3ghWKVcjTxADsLn3KoKGUlGOV VgZ2I3mpvYXiACmCAziuqz9sOUoS+pca1HXs+rxJ2QLdzapQNjPz/g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Kelley Add hooks to enable/disable a per-CPU IRQ for VMbus. These hooks are in the architecture independent setup and shutdown paths for Hyper-V, and are needed by Linux guests on Hyper-V on ARM64. The x86/x64 implementation is null because VMbus interrupts on x86/x64 don't use an IRQ. Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 4 ++++ drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 0d6271cce198..8d97bd3a13a6 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -109,6 +109,10 @@ void hyperv_vector_handler(struct pt_regs *regs); void hv_setup_vmbus_irq(void (*handler)(void)); void hv_remove_vmbus_irq(void); +/* On x86/x64, there isn't a real IRQ to be enabled/disable */ +static inline void hv_enable_vmbus_irq(void) {} +static inline void hv_disable_vmbus_irq(void) {} + void hv_setup_kexec_handler(void (*handler)(void)); void hv_remove_kexec_handler(void); void hv_setup_crash_handler(void (*handler)(struct pt_regs *regs)); diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 166c2501de17..d0bb09a4bd73 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -307,6 +307,7 @@ int hv_synic_init(unsigned int cpu) hv_set_siefp(siefp.as_uint64); /* Setup the shared SINT. */ + hv_enable_vmbus_irq(); hv_get_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64); shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR; @@ -434,6 +435,7 @@ int hv_synic_cleanup(unsigned int cpu) /* Disable the global synic bit */ sctrl.enable = 0; hv_set_synic_state(sctrl.as_uint64); + hv_disable_vmbus_irq(); return 0; } -- 2.19.1