From patchwork Thu Oct 11 13:27:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 190912 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 931792C0084 for ; Fri, 12 Oct 2012 00:56:07 +1100 (EST) Received: from localhost ([::1]:54573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMIoZ-0001jr-EU for incoming@patchwork.ozlabs.org; Thu, 11 Oct 2012 09:28:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMInf-0007a7-VE for qemu-devel@nongnu.org; Thu, 11 Oct 2012 09:27:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMInV-0008VB-7y for qemu-devel@nongnu.org; Thu, 11 Oct 2012 09:27:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMInV-0008Ug-0Q for qemu-devel@nongnu.org; Thu, 11 Oct 2012 09:27:33 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9BDRURo022387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Oct 2012 09:27:30 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9BDR72s003602; Thu, 11 Oct 2012 09:27:28 -0400 From: Avi Kivity To: qemu-devel@nongnu.org, Blue Swirl , Anthony Liguori , "Michael S. Tsirkin" , Alex Williamson , liu ping fan , Paolo Bonzini Date: Thu, 11 Oct 2012 15:27:03 +0200 Message-Id: <1349962023-560-8-git-send-email-avi@redhat.com> In-Reply-To: <1349962023-560-1-git-send-email-avi@redhat.com> References: <1349962023-560-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v1 7/7] vhost: 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 vhost 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/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vhost.c b/hw/vhost.c index 0b4ac3f..cd5d9f5 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -451,6 +451,8 @@ static void vhost_region_add(MemoryListener *listener, struct vhost_dev *dev = container_of(listener, struct vhost_dev, memory_listener); + assert(!memory_region_is_iommu(section.mr)); + if (!vhost_section(section)) { return; }