From nobody Sat May 4 14:18:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1601552684; cv=none; d=zohomail.com; s=zohoarc; b=SrjElks+WUZt1Qc4XRN6SbysIMtNEl/itDhzNcNiFz7dzPYfZGHDp+XEACX4PA6jTbItn80rmlE0zwQxJzZLHBh0MxnGoS0Jpm7qAEMaW2yUCwNezt7u/SjllG35Y/ogXURnNCE0FeSQ8DNs0QXmzqX54fDiFYSNoFEa+KGNjFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601552684; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=KDJh2Ny9XBC3kDASxrj8qyhFwbyDGl2EWM/No/oUxNI=; b=FGDsXhD5rirzhLGAcUfj7TELFn0a+56+770C70B4IGx3vJh/ZDkGkl3Z27MS8eLNJ7zY0YrY+AU+nP02g3XOvlCsgu4zSYsouGkCn20aI4igMuTg4inqT37c31e0CtmhyXQR9X8ciUePCn88iMtKlr5TgXbWtZhLdw7OXtGGW0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1601552684970779.3405274308768; Thu, 1 Oct 2020 04:44:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1228.4126 (Exim 4.92) (envelope-from ) id 1kNx0U-0006Sd-62; Thu, 01 Oct 2020 11:44:18 +0000 Received: by outflank-mailman (output) from mailman id 1228.4126; Thu, 01 Oct 2020 11:44:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNx0U-0006SW-34; Thu, 01 Oct 2020 11:44:18 +0000 Received: by outflank-mailman (input) for mailman id 1228; Thu, 01 Oct 2020 11:44:16 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNx0S-0006SR-1I for xen-devel@lists.xenproject.org; Thu, 01 Oct 2020 11:44:16 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d298d769-59a1-48ff-8b23-1550c7644c63; Thu, 01 Oct 2020 11:44:14 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNx0S-0006SR-1I for xen-devel@lists.xenproject.org; Thu, 01 Oct 2020 11:44:16 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d298d769-59a1-48ff-8b23-1550c7644c63; Thu, 01 Oct 2020 11:44:14 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: d298d769-59a1-48ff-8b23-1550c7644c63 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1601552655; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tJRjOyj67coC9I1KBFkaDAyK+2JtNm5ot/Bl9MArNYU=; b=V8YptN4AKjZump4ntlhmSJwuGESSwLmsN4McI+tvPoU4h0ToCs4WjTIy wremLWisit5byV1a6zn4p0b45HtblohcJrN+c8NaY353LAQhRD70hgkWa 3ZwnV8F9hujVkLfNShzTFvzT2IItKYKopKHWat3+fepq8SWl4KGcOC8kc 0=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: /sz+1GR8BlwRGpqm2nq9eXQ6gZrPBqn/w/JdlMRYO0ty1LGTNKNAR1m2MStChVAupFloO6AA60 Yggz88sq8W1yJVPl2r5ZwXjyTLWjfPErlzmTKw2hKfkpRiN75xaK9UBAvOQONLpdgpJSkRWddT BV8TFzp8U7wswV4WEMRfuWIBpdNf1zwOOHvn2psmK+IoiYwCIiVf/03eT6Ss+JL69X1vk6eezh unwtGmr2qBLcs7A0Gb+Y90HUw1VZkxk7dHa5Zoq6XQjdqhNDbm83ji8vZGni4uOcx+xjx27g3V XLk= X-SBRS: None X-MesageID: 28393153 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,323,1596513600"; d="scan'208";a="28393153" From: Roger Pau Monne To: CC: Roger Pau Monne , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH] xen/domain: check IOMMU options doesn't contain unknown bits set Date: Thu, 1 Oct 2020 13:44:07 +0200 Message-ID: <20201001114407.44532-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich --- xen/common/domain.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index 8cfa2e0b6b..c4a480fa14 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -310,6 +310,12 @@ static int sanitise_domain_config(struct xen_domctl_cr= eatedomain *config) return -EINVAL; } =20 + if ( config->iommu_opts & ~XEN_DOMCTL_IOMMU_no_sharept ) + { + dprintk(XENLOG_INFO, "Unknown IOMMU options %#x\n", config->iommu_= opts); + return -EINVAL; + } + if ( !(config->flags & XEN_DOMCTL_CDF_iommu) && config->iommu_opts ) { dprintk(XENLOG_INFO, --=20 2.28.0