Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1E262C54EE9 for ; Wed, 7 Sep 2022 13:01:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.401651.643532 (Exim 4.92) (envelope-from ) id 1oVug5-0001aN-R9; Wed, 07 Sep 2022 13:01:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 401651.643532; Wed, 07 Sep 2022 13:01:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVug5-0001aG-O5; Wed, 07 Sep 2022 13:01:13 +0000 Received: by outflank-mailman (input) for mailman id 401651; Wed, 07 Sep 2022 13:01:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVug5-0001aA-8g for xen-devel@lists.xenproject.org; Wed, 07 Sep 2022 13:01:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVug4-0005tC-VN; Wed, 07 Sep 2022 13:01:12 +0000 Received: from 54-240-197-233.amazon.com ([54.240.197.233] helo=[192.168.17.46]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oVug4-0002M9-NC; Wed, 07 Sep 2022 13:01:12 +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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=tFLOGVsaec1S7Yg1ZuhZf6vw0vm8mmJEGOrYUELJloc=; b=n6lXuU7UKCP3SPkDsrZ+AnI3O3 zWdnb0DdK4kW2Mf+Ac83RizDDx8VdDz/bZ0HnxugvVKQaUKQTWh6Ioz/1zr7omCzCMQovsIoGehfz zr/uA61SI7n70BroxFJOn1E4UYJF5N7QjnrcNEKHZmOT3uevF5XR2kGXRpaJxjQronns=; Message-ID: Date: Wed, 7 Sep 2022 14:01:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v4 3/7] xen/evtchn: restrict the maximum number of evtchn supported for domUs Content-Language: en-US To: Rahul Singh , xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk , Michal Orzel References: From: Julien Grall In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06/09/2022 14:40, Rahul Singh wrote: > Restrict the maximum number of evtchn supported for domUs to avoid > allocating a large amount of memory in Xen. > > Set the default value of max_evtchn_port to 1023. The value of 1023 > should be sufficient for domUs guests because on ARM we don't bind To me, domUs and guests mean the same. So s/guests// > physical interrupts to event channels. The only use of the evtchn port > is inter-domain communications. Another reason why we choose the value > of 1023 to follow the default behavior of libxl. > > Signed-off-by: Rahul Singh > Reviewed-by: Michal Orzel > --- > Changes in v4: > - fix minor comments in commit msg > - Added Michal Reviewed-by > Changes in v3: > - added in commit msg why we set the max_evtchn_port value to 1023. > - added the comment in code also why we set the max_evtchn_port to 1023 > - remove the define and set the value to 1023 in code directly. > Changes in v2: > - new patch in the version > --- > xen/arch/arm/domain_build.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 3fd1186b53..fde133cd94 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -3277,7 +3277,13 @@ void __init create_domUs(void) > struct xen_domctl_createdomain d_cfg = { > .arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE, > .flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, > - .max_evtchn_port = -1, > + /* > + * The default of 1023 should be sufficient for domUs guests To me, domUs and guests mean the same. So s/guests// Same here. With that: Acked-by: Julien Grall Cheers, -- Julien Grall