Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp578414ybe; Fri, 6 Sep 2019 04:11:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFWZorCvTbSj54EcLHdxwj5x3bepyDbuCrmVzODb63MjXrOd/5nCc6g9O7bxtGeFk0TFS8 X-Received: by 2002:aa7:83c7:: with SMTP id j7mr9939386pfn.167.1567768259950; Fri, 06 Sep 2019 04:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567768259; cv=none; d=google.com; s=arc-20160816; b=RhgGCms9yq+/F7m6QP7dyIW/hdhu/vGQGSFeJ1bKMPeMu7R1yFBHxXVVf7rhTI7k4u syXhW1GYjM7lyHjlTlr/FkmjAUSGusEM8B/XvCGLqVa2eCecSV9I88pWeAiD9ViO1SeK LYO/3paP19aTeD8VZMqchOG4o96hFn1JSizcBvHt94HshHuQueyfv0QvVliDeoVdUCIR T8xpM6scIDVH9BiPLdg4IUYbw7kjndNcJNLdA224qULKL/3dK2VUpTokRVkCiF4nWywp mHuDsiJ4M5WkIw8hfO2EXOqtc+zrjZPX8bCIJEA/2TY1qEVUzUKqkhmsgdJVjx+R9JXz l9Gg== 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; bh=/H7yKZeoFyROFiMjImUHf/qfjFjBzVvRxDQIGygaDDI=; b=GgYdQtR7nnGG+njMmIO5jHMp7JuDSzqy/UJY3c8A4wmq8RHozmSpMthw8utfFWR27r XWFvspUysYWiZuQB73hnKhjisSCtX+hSvsNOFKPcZdiWCJpnA1ZA5ZsIneB7jbv+uYj8 fAcBydIZcBtcviT7CjLsbzda+Pfz0LoJh8iqF68QZL+IM0EyMmhIzYJLgKyn1a+mwdKV BuloidaTbfbe8OB1YW0w8yVJfISyBscJM8qZ8EmJY44JRGokz4bmwEhvUvq+jvqUFmrd djemvE5QEf4GINR0z5KiKrdwo/ch275cFJZ9Bra2Gxj9InBhQGvZoBSy78Xuf3imWIHR 1szA== 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 f23si4116237pga.449.2019.09.06.04.10.44; Fri, 06 Sep 2019 04:10:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389364AbfIFIhT (ORCPT + 99 others); Fri, 6 Sep 2019 04:37:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:57822 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731558AbfIFIhS (ORCPT ); Fri, 6 Sep 2019 04:37:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0DC41AB87; Fri, 6 Sep 2019 08:37:17 +0000 (UTC) Date: Fri, 6 Sep 2019 10:37:15 +0200 From: Joerg Roedel To: Stuart Hayes Cc: Linux Kernel Mailing List , iommu@lists.linux-foundation.org Subject: Re: [PATCH] amd/iommu: flush old domains in kdump kernel Message-ID: <20190906083715.GD5457@suse.de> References: <9d271f88-949a-7356-c516-be95b1566c94@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d271f88-949a-7356-c516-be95b1566c94@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 05, 2019 at 12:09:48PM -0500, Stuart Hayes wrote: > When devices are attached to the amd_iommu in a kdump kernel, the old device > table entries (DTEs), which were copied from the crashed kernel, will be > overwritten with a new domain number. When the new DTE is written, the IOMMU > is told to flush the DTE from its internal cache--but it is not told to flush > the translation cache entries for the old domain number. > > Without this patch, AMD systems using the tg3 network driver fail when kdump > tries to save the vmcore to a network system, showing network timeouts and > (sometimes) IOMMU errors in the kernel log. > > This patch will flush IOMMU translation cache entries for the old domain when > a DTE gets overwritten with a new domain number. Hmm, this seems to point to an interesting implementation detail of the AMD IOMMUs. In theory, when the DTE is flushed, there shouldn't be any device transactions looked up with the old domain id anymore, and thus no faults should happen. Anyway, applied the patch, thanks. Regards, Joerg