Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp668231rwb; Fri, 18 Nov 2022 06:49:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EwaFtlyCLK2drzyqZyxQLN283eKPHKuxDQdoQNWQhTTQvdrad5AqTiSIQPspOIWxNF4lf X-Received: by 2002:a63:4e0f:0:b0:476:91d6:e15e with SMTP id c15-20020a634e0f000000b0047691d6e15emr6994514pgb.455.1668782976525; Fri, 18 Nov 2022 06:49:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668782976; cv=none; d=google.com; s=arc-20160816; b=Khe5O0Hql1XZCJZLt0DsrYFpRb9W1ZK00u0/H/02zQNEuOmGD/eZ5xpctmjYcICMsu J80vk6iZSDi2eWVb+qfDep+oqQd76iBb5rjOCTJfigM/o2+vq2TrMv4Xb2Q4Iv3KBfGm DaZvyPSSiYsWeCZneYDx+hdjirikf7o3+Vl1ln2IamCUf8BDF/xDs8j0EIHUgbyfOZ0m P+9un2+29qXn0OCXdhQc3Fq2gY9KIAZG1W7BidsHrVEU9nElqRAEaIf3S8fpccn45vbs l9eh04zW1x7dJVvDtZriIHZch0IBJbZj94sAqv2xU0K59QVJ3OTo8qqeMaCpbL+j4VM2 +T0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=R4toaSer+DSC9C7UHmt6s1A3ErWAKiU/7f6LW1Uo6bg=; b=hvuccymQshd1Ms3mZNP6IJgmCI9mfzOMpFmUIjtwkAeP/Lmat8jV0Jr2LqHuaUhWKl 73LMNnX7Qy1DhkT5dbgBWPL5d1/Nq+WemYPjWBUzsSyCqAfulfLYf7Qdy2ogy9L4A4mR hnZTIrQnp4ktlzGUTIXAjonuvCyUEVAnZF/KoCiEcJ0jjj/5/Xo5y/gCJqJy6s+5KS5C 9sosXuukgh/EtAIPKHsAbneF1XpBTV1Pgq23kgLwYvEdrDxBUXbnBqB2uuDGCqL90P4m uanxTVkcxVc/vuYIpmghcFCDphMWbfaffN8BPiCWJbdrw6Cz52jfkdd+9H2QLAJRMH9g x+/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a63ea4d000000b00476deba079fsi4062438pgk.507.2022.11.18.06.49.10; Fri, 18 Nov 2022 06:49:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242089AbiKROht (ORCPT + 92 others); Fri, 18 Nov 2022 09:37:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242061AbiKROhe (ORCPT ); Fri, 18 Nov 2022 09:37:34 -0500 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AD5C9AC92; Fri, 18 Nov 2022 06:34:55 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id w14so9534925wru.8; Fri, 18 Nov 2022 06:34:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R4toaSer+DSC9C7UHmt6s1A3ErWAKiU/7f6LW1Uo6bg=; b=1ZAlfAcu4K5CRVXuZQX/I1/URzAIjdGNW+X8Ve0HU5G2NEmNJpvU9pZQBsx5AmSjWr tm5YIeyuH13t2WtCXsLQRO8XYM8+fYR3HmCEYjXgVQiDIlDLo7PqXAZPOt1PW9WD5VJw 4AD/umlvYaZuRZK7YPsv9Yz6peLvoGqMiLQmvTkSNyhJSsHFBtOMRCKeixXA7sfhNibR FIvEe7pxlESZaOxBCP3yk/OTzLJTl8LuQSwBBQxyrTZrtCNRGTQFaoBxFf0BPFpOtJ9M 5cieUubW++T5Wk3GXRCyclsTrq2zXV8wNTr23fM57LwUgwJNd39zaNKQ4897xOjH47R8 fgiw== X-Gm-Message-State: ANoB5pl/5T7sDdcZmNKCuau9+xJaejhqCTlVgAPJ8kbu7inJynONJ/c7 Tfo5H3g8SLmvw0MBkwa9t78= X-Received: by 2002:a5d:56d0:0:b0:236:59ab:cf30 with SMTP id m16-20020a5d56d0000000b0023659abcf30mr4403560wrw.485.1668782089167; Fri, 18 Nov 2022 06:34:49 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id j18-20020a05600c191200b003c83465ccbfsm10372760wmq.35.2022.11.18.06.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 06:34:48 -0800 (PST) Date: Fri, 18 Nov 2022 14:34:40 +0000 From: Wei Liu To: Nuno Das Neves Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, mikelley@microsoft.com, sunilmut@microsoft.com, wei.liu@kernel.org, kys@microsoft.com, Tianyu.Lan@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com, dwmw2@infradead.org, joro@8bytes.org, will@kernel.org Subject: Re: [PATCH v2] iommu/hyper-v: Allow hyperv irq remapping without x2apic Message-ID: References: <1668715899-8971-1-git-send-email-nunodasneves@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1668715899-8971-1-git-send-email-nunodasneves@linux.microsoft.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 17, 2022 at 12:11:39PM -0800, Nuno Das Neves wrote: > If x2apic is not available, hyperv-iommu skips remapping > irqs. This breaks root partition which always needs irqs > remapped. > > Fix this by allowing irq remapping regardless of x2apic, > and change hyperv_enable_irq_remapping() to return > IRQ_REMAP_XAPIC_MODE in case x2apic is missing. > > Tested with root and non-root hyperv partitions. > > Signed-off-by: Nuno Das Neves Applied to hyperv-next. Thanks.