From patchwork Fri Mar 25 02:13:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 8667831 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8457D9F326 for ; Fri, 25 Mar 2016 02:14:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70A51203C1 for ; Fri, 25 Mar 2016 02:14:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3A1720383 for ; Fri, 25 Mar 2016 02:14:17 +0000 (UTC) Received: from localhost ([::1]:53709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajHGS-0005ck-M9 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Mar 2016 22:14:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajHG9-0005XV-9I for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajHG5-0008GA-Oe for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:13:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajHG5-0008G6-Jg for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:13:53 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 4D125627C5; Fri, 25 Mar 2016 02:13:53 +0000 (UTC) Received: from jason-ThinkPad-T430s.redhat.com (vpn1-7-152.pek2.redhat.com [10.72.7.152]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2P2DUX6032064; Thu, 24 Mar 2016 22:13:50 -0400 From: Jason Wang To: mst@redhat.com, qemu-devel@nongnu.org Date: Fri, 25 Mar 2016 10:13:28 +0800 Message-Id: <1458872009-13342-8-git-send-email-jasowang@redhat.com> In-Reply-To: <1458872009-13342-1-git-send-email-jasowang@redhat.com> References: <1458872009-13342-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 25 Mar 2016 02:13:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: cornelia.huck@de.ibm.com, pbonzini@redhat.com, Jason Wang , peterx@redhat.com Subject: [Qemu-devel] [RFC PATCH 7/8] memory: handle alias for iommu notifier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: Paolo Bonzini Signed-off-by: Jason Wang --- memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index 95f7209..858b390 100644 --- a/memory.c +++ b/memory.c @@ -1509,6 +1509,9 @@ bool memory_region_is_logging(MemoryRegion *mr, uint8_t client) void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n) { + if (mr->alias) { + memory_region_register_iommu_notifier(mr->alias, n); + } notifier_list_add(&mr->iommu_notify, n); }