From patchwork Mon Oct 26 17:17:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Singh X-Patchwork-Id: 11857875 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57CE31130 for ; Mon, 26 Oct 2020 17:19:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3657D20882 for ; Mon, 26 Oct 2020 17:19:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3657D20882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.12480.32522 (Exim 4.92) (envelope-from ) id 1kX68v-0003Gz-Ms; Mon, 26 Oct 2020 17:18:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 12480.32522; Mon, 26 Oct 2020 17:18:49 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kX68v-0003Gr-JE; Mon, 26 Oct 2020 17:18:49 +0000 Received: by outflank-mailman (input) for mailman id 12480; Mon, 26 Oct 2020 17:18:48 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kX68u-00032c-MT for xen-devel@lists.xenproject.org; Mon, 26 Oct 2020 17:18:48 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id bc3f38fb-0759-475f-96b7-c29d22c77b32; Mon, 26 Oct 2020 17:18:40 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0CA6213A1; Mon, 26 Oct 2020 10:18:40 -0700 (PDT) Received: from scm-wfh-server-rahsin01.stack04.eu02.mi.arm.com (unknown [10.58.246.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D0DA3F719; Mon, 26 Oct 2020 10:18:39 -0700 (PDT) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kX68u-00032c-MT for xen-devel@lists.xenproject.org; Mon, 26 Oct 2020 17:18:48 +0000 X-Inumbo-ID: bc3f38fb-0759-475f-96b7-c29d22c77b32 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id bc3f38fb-0759-475f-96b7-c29d22c77b32; Mon, 26 Oct 2020 17:18:40 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0CA6213A1; Mon, 26 Oct 2020 10:18:40 -0700 (PDT) Received: from scm-wfh-server-rahsin01.stack04.eu02.mi.arm.com (unknown [10.58.246.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D0DA3F719; Mon, 26 Oct 2020 10:18:39 -0700 (PDT) From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, Jan Beulich , Paul Durrant Subject: [PATCH v1 4/4] xen/pci: solve compilation error when memory paging is not enabled. Date: Mon, 26 Oct 2020 17:17:54 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: d->vm_event_paging struct is defined under CONFIG_HAS_MEM_PAGING in sched.h but referenced in passthrough/pci.c directly. If CONFIG_HAS_MEM_PAGING is not enabled for architecture, compiler will throws an error. No functional change. Signed-off-by: Rahul Singh --- xen/drivers/passthrough/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index c6fbb7172c..3125c23e87 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -1419,13 +1419,15 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn, u32 flag) if ( !is_iommu_enabled(d) ) return 0; - /* Prevent device assign if mem paging or mem sharing have been +#if defined(CONFIG_HAS_MEM_PAGING) || defined(CONFIG_MEM_SHARING) + /* Prevent device assign if mem paging or mem sharing have been * enabled for this domain */ if ( d != dom_io && unlikely(mem_sharing_enabled(d) || vm_event_check_ring(d->vm_event_paging) || p2m_get_hostp2m(d)->global_logdirty) ) return -EXDEV; +#endif /* device_assigned() should already have cleared the device for assignment */ ASSERT(pcidevs_locked());