From patchwork Wed Mar 16 10:46:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8598521 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E0D3C0553 for ; Wed, 16 Mar 2016 11:11:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 718B32022A for ; Wed, 16 Mar 2016 11:11:16 +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 BAB5120218 for ; Wed, 16 Mar 2016 11:11:15 +0000 (UTC) Received: from localhost ([::1]:55149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9MB-0003V8-24 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 07:11:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zT-0003io-3l for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag8zS-0002Iz-6l for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:47 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:37026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zS-0002Io-0K for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:46 -0400 Received: by mail-wm0-x235.google.com with SMTP id p65so66054566wmp.0 for ; Wed, 16 Mar 2016 03:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=pJNQYXlFg1wOUckqfYGsFIHnaYQgifxY8xSGkNZKzwo=; b=VIQ7kBzMHc04K7M0ir3ifVD+WzOiDIz46H8C2WPwt1PelLaNBkZLBgCwx6CbKLzq3a aMcBEmO18o08ybpsFMYXPFqf9lLLi5P1yBXM1VjXVKdm0UQdGEVhPCWtIkQgLvIki/A0 /BRAqPSc93XakdNWeXHQQvNvobrEOYGBtyltAU5xnNzREdzNRdzLwTDMeG4fpt59F2ZE 3YOsM1iLHSy977HWh8HOlymFTdn8RTMMRraMG1G1EBA3m45VTuBO7HrWrSSbQBNcaOUA qoHGOygao5ibWyWRtpWMTvSpDcrhydn0Pmiu7geGRiLiwWaSK+SuZmMk0yXFQqIo+aEu jt0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=pJNQYXlFg1wOUckqfYGsFIHnaYQgifxY8xSGkNZKzwo=; b=hziUpEr+qbnrZ4Z5qssdbJe2AoIOhieip/5HTDYlWBJO86D83MpUMKCA6h6PuuFQDu I5hP6MJmrP+sHUA3KNI/8Ji8T7KZPie0Shl6we5Ib4OMO0CovGchFxYPINOPtFW6Ka+u ETMqLchZqfpJAmt4Zpb1c7s2nOHOQQLKfrJGNX7cV68pDKfdMY0/UA44YFY+ps9VzqKf 3dNg0rgSr4BWzo6Rde0R2SMABq/Wpo/YC0GpppJ8fNP3WHU/77zxr9gMXCXpE+8YG+a/ 6Z8CpDtwNIgg4vp9/YduuUC3VR3eZismfbIZftkSm/aELtBJkfxPRlJtNk6ZMO7XoLsM BCUw== X-Gm-Message-State: AD7BkJJa0qf7YFoR3O89EGhMF7CjYhS351f0HRFrbyXZFNCT1dYQlxM+/sUYNW/CJ5Gh6A== X-Received: by 10.28.174.72 with SMTP id x69mr28579980wme.68.1458125265418; Wed, 16 Mar 2016 03:47:45 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id wr2sm2418094wjc.49.2016.03.16.03.47.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Mar 2016 03:47:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 11:46:50 +0100 Message-Id: <1458125219-131698-41-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> References: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::235 Subject: [Qemu-devel] [PATCH 40/49] dma: do not depend on kvm_enabled() 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Memory barriers are needed also by Xen and, when the ioeventfd bugs are fixed, by TCG as well. sysemu/kvm.h is not anymore needed in sysemu/dma.h, move it to the actual users. Signed-off-by: Paolo Bonzini --- hw/intc/arm_gicv2m.c | 1 + hw/ppc/e500plat.c | 1 + hw/ppc/spapr_hcall.c | 1 + hw/ppc/spapr_rtas.c | 1 + include/sysemu/dma.h | 5 +---- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c index 3e35915..e0003ba 100644 --- a/hw/intc/arm_gicv2m.c +++ b/hw/intc/arm_gicv2m.c @@ -29,6 +29,7 @@ #include "qapi/error.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" +#include "sysemu/kvm.h" #define TYPE_ARM_GICV2M "arm-gicv2m" #define ARM_GICV2M(obj) OBJECT_CHECK(ARMGICv2mState, (obj), TYPE_ARM_GICV2M) diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index b00565c..94b4545 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -14,6 +14,7 @@ #include "e500.h" #include "hw/boards.h" #include "sysemu/device_tree.h" +#include "sysemu/kvm.h" #include "hw/pci/pci.h" #include "hw/ppc/openpic.h" #include "kvm_ppc.h" diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index fb448fb..8dd170f 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -7,6 +7,7 @@ #include "mmu-hash64.h" #include "cpu-models.h" #include "trace.h" +#include "sysemu/kvm.h" #include "kvm_ppc.h" struct SPRSyncState { diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index b7c5ebd..9490751 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -31,6 +31,7 @@ #include "hw/qdev.h" #include "sysemu/device_tree.h" #include "sysemu/cpus.h" +#include "sysemu/kvm.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index b0fbb9b..8a06f7a 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -15,7 +15,6 @@ #include "hw/hw.h" #include "block/block.h" #include "block/accounting.h" -#include "sysemu/kvm.h" typedef struct ScatterGatherEntry ScatterGatherEntry; @@ -67,9 +66,7 @@ static inline void dma_barrier(AddressSpace *as, DMADirection dir) * use lighter barriers based on the direction of the * transfer, the DMA context, etc... */ - if (kvm_enabled()) { - smp_mb(); - } + smp_mb(); } /* Checks that the given range of addresses is valid for DMA. This is