From patchwork Wed Feb 19 09:37:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11390807 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 2432A930 for ; Wed, 19 Feb 2020 09:40:30 +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 00A8D2464E for ; Wed, 19 Feb 2020 09:40:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="Aw3O5EGQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00A8D2464E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4LoL-00084J-69; Wed, 19 Feb 2020 09:38:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4LoJ-00083l-5g for xen-devel@lists.xenproject.org; Wed, 19 Feb 2020 09:38:27 +0000 X-Inumbo-ID: 940da3a8-52fb-11ea-bc8e-bc764e2007e4 Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 940da3a8-52fb-11ea-bc8e-bc764e2007e4; Wed, 19 Feb 2020 09:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582105107; x=1613641107; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m/QxIK1wZXVPJ6XpKFdZd+Y46v6EXH7JHMW87CbQtns=; b=Aw3O5EGQ7hV5Gavi97LFdFzch76/f8YkUUyi3mawLx9/xiClu3iAeXeL 09tLjpZ2Wg+OcVyrrLR04o6cp3RUtsFM9aLRyR2sP/lHxvqU8YTSho/tb fyIzatlLhFWA+tyCUy1PjuBtBvDDnML1uBmv+BlxyQIpcvKqL4D1bRJHf c=; IronPort-SDR: 637HmOrap3EjSW39ms5FRFQZObHX0ObpCFVB/aBH70KLNCtHTcdJ48MJhqC6GopzFLKfEaXnmZ H8uuFUCNrtSQ== X-IronPort-AV: E=Sophos;i="5.70,459,1574121600"; d="scan'208";a="26044079" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 19 Feb 2020 09:38:24 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com (Postfix) with ESMTPS id 00C09A2F6F; Wed, 19 Feb 2020 09:38:20 +0000 (UTC) Received: from EX13D32EUB004.ant.amazon.com (10.43.166.212) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Wed, 19 Feb 2020 09:38:06 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D32EUB004.ant.amazon.com (10.43.166.212) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 19 Feb 2020 09:38:05 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 19 Feb 2020 09:38:03 +0000 From: Paul Durrant To: Date: Wed, 19 Feb 2020 09:37:51 +0000 Message-ID: <20200219093754.2924-4-pdurrant@amazon.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200219093754.2924-1-pdurrant@amazon.com> References: <20200219093754.2924-1-pdurrant@amazon.com> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v6 3/6] public/xen.h: add a definition for a 'valid domid' mask X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Paul Durrant , Ian Jackson , Jan Beulich Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" A subsequent patch will modify libxl to allow selection of a random domid value when creating domains. Valid values are limited to a width of 15 bits, so add an appropriate mask definition to the public header. Signed-off-by: Paul Durrant Reviewed-by: Ian Jackson --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Wei Liu v6: - New in v6 (split out from another patch) --- xen/include/public/xen.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index d2198dffad..75b1619d0d 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -614,6 +614,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t); /* Idle domain. */ #define DOMID_IDLE xen_mk_uint(0x7FFF) +/* Mask for valid domain id values */ +#define DOMID_MASK xen_mk_uint(0x7FFF) + #ifndef __ASSEMBLY__ typedef uint16_t domid_t;