From patchwork Tue Oct 30 11:47:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 195461 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3B25E2C0085 for ; Tue, 30 Oct 2012 22:48:53 +1100 (EST) Received: from localhost ([::1]:59226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAJO-0000Xg-M2 for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 07:48:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAIx-00004w-76 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 07:48:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTAIq-0003xo-MZ for qemu-devel@nongnu.org; Tue, 30 Oct 2012 07:48:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAIq-0003xd-FS for qemu-devel@nongnu.org; Tue, 30 Oct 2012 07:48:16 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9UBmDGC018149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Oct 2012 07:48:13 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9UBlrJK028808; Tue, 30 Oct 2012 07:48:11 -0400 From: Avi Kivity To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2012 13:47:49 +0200 Message-Id: <1351597670-23031-7-git-send-email-avi@redhat.com> In-Reply-To: <1351597670-23031-1-git-send-email-avi@redhat.com> References: <1351597670-23031-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: "Michael S. Tsirkin" , Alexander Graf , Blue Swirl , Alex Williamson , Anthony Liguori Subject: [Qemu-devel] [PATCH v2 6/7] vfio: abort if an emulated iommu is used 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org vfio doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Signed-off-by: Avi Kivity --- hw/vfio_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 0473ae8..bd7a075 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -943,6 +943,8 @@ static void vfio_listener_region_add(MemoryListener *listener, void *vaddr; int ret; + assert(!memory_region_is_iommu(section->mr)); + if (vfio_listener_skipped_section(section)) { DPRINTF("vfio: SKIPPING region_add %"HWADDR_PRIx" - %"PRIx64"\n", section->offset_within_address_space,