Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp925855ybi; Fri, 21 Jun 2019 10:29:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfVpZiTAyfYscPB/djGCtEKaqDPOw9ehJj36Esjh/4GpbJ/vgYDgQZ37p60P3Wl5wBP/OE X-Received: by 2002:a17:902:29e6:: with SMTP id h93mr125936519plb.297.1561138148695; Fri, 21 Jun 2019 10:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561138148; cv=none; d=google.com; s=arc-20160816; b=A7QnwcQim/UkNdYJ7/SxHu37mbDulfo/YFbwfHFlWGhpwKvJIpkiEln8Xl7S7HOFQo zX55aRAfNqyzfG7zOJLx60Kki3NSd/eySznjFwOnyIfJjxnFOao1ByMXx9gRYhc3Hgby rvaV0D5P0s3mDnGGTzeYCW2F6VdroVabEwR4c0vRXO7rfiVEPmIjnHatdre8mvBk0UTF KXfOwvT0qR5iVLN27dAs6pyGTZTgsnuSI0m1iw4I6MTwuKg8V+r9Zci7ENYK6viyegxK WBLO3lMpPx752NV3c9vBBzG1T+cnNX2bae7uo6w7mUY9tRuf3LPcp2iDlQKsIcn41pAV B6Cw== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=cmXnScAQ3HAmk4hPmct0a+1wX72c48q+WAHCoaoO8mo=; b=gJosvPN/K6BtC/gd+V+gEXhzZmnGzgrIXjjusLgpiwfZidsjKBj2j4Cy5EJV9j7q2C soKyUA54SoYCbEVRyBM1M0BhWi7+CEINy6DKxjloimpYxmEHotS1S8gfuFZ1hnfI6FXU qq+8ZvXCOdnPCK4SKPuLcWkdfs2EgQPN5B6GEMhWS4ubEWwyn1qy/XowvEaG848W37/X S+aG58MHlqeymS0hFdl0KVSAP5o7Hb4zNfoulCrgKDMnRWYS8pzkxQXDyB8OJJiT+GbZ mnCcnvMbwsQYJqfHvv+k+2U1he0UIFGIWo0vU++JV7s5/r8XafqcIqd/Teva57r52gBs VGLA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f72si3406878pfa.67.2019.06.21.10.28.52; Fri, 21 Jun 2019 10:29:08 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbfFUR2O (ORCPT + 99 others); Fri, 21 Jun 2019 13:28:14 -0400 Received: from mga14.intel.com ([192.55.52.115]:40713 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfFUR2O (ORCPT ); Fri, 21 Jun 2019 13:28:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2019 10:28:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,401,1557212400"; d="scan'208";a="171282794" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga002.jf.intel.com with ESMTP; 21 Jun 2019 10:28:13 -0700 Date: Fri, 21 Jun 2019 10:31:26 -0700 From: Jacob Pan To: Thomas Gleixner Cc: Kate Stewart , "Ravi V. Shankar" , Tony Luck , Ashok Raj , Peter Zijlstra , Jan Kiszka , x86 , Ricardo Neri , Stephane Eranian , LKML , Juergen Gross , Bjorn Helgaas , iommu@lists.linux-foundation.org, Philippe Ombredanne , Randy Dunlap , "Eric W. Biederman" , Ricardo Neri , Andi Kleen , Borislav Petkov , Ingo Molnar , Wincy Van , jacob.jun.pan@intel.com Subject: Re: [RFC PATCH v4 20/21] iommu/vt-d: hpet: Reserve an interrupt remampping table entry for watchdog Message-ID: <20190621103126.585ca6d3@jacob-builder> In-Reply-To: References: <1558660583-28561-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1558660583-28561-21-git-send-email-ricardo.neri-calderon@linux.intel.com> <20190619084316.71ce5477@jacob-builder> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jun 2019 17:33:28 +0200 (CEST) Thomas Gleixner wrote: > On Wed, 19 Jun 2019, Jacob Pan wrote: > > On Tue, 18 Jun 2019 01:08:06 +0200 (CEST) > > Thomas Gleixner wrote: > > > > > > Unless this problem is not solved and I doubt it can be solved > > > after talking to IOMMU people and studying manuals, > > > > I agree. modify irte might be done with cmpxchg_double() but the > > queued invalidation interface for IRTE cache flush is shared with > > DMA and requires holding a spinlock for enque descriptors, QI tail > > update etc. > > > > Also, reserving & manipulating IRTE slot for hpet via backdoor > > might not be needed if the HPET PCI BDF (found in ACPI) can be > > utilized. But it might need more work to add a fake PCI device for > > HPET. > > What would PCI/BDF solve? I was thinking if HPET is a PCI device then it can naturally gain slots in IOMMU remapping table IRTEs via PCI MSI code. Then perhaps it can use the IRQ subsystem to set affinity etc. w/o directly adding additional helper functions in IRQ remapping code. I have not followed all the discussions, just a thought.