From nobody Sun Feb 8 05:37:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586376635; cv=none; d=zohomail.com; s=zohoarc; b=A6ZxqnCiMHIxAAORhxH7Fb8XF7it6CG+gIQkRqs/aKTyKdAAioWcGfjPM7OtrxF8IMdAUV1ikVpjHE1U0PvmK0IvPRgxt2CXn8eckN/2a1GcyfsUs8vvIV8Y2RT2VARvpNVaPhtGFQ1RxrL6nOHz4wOVDBx03wGBpkIFoiZp2kA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586376635; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nZDUuB5Mc+lobKoanndjR+S0JwP0mbXzb27sALryQB0=; b=UO1qlI8L6yJGGkaNaVMg2rPOj2WztzELBNY8FewBJngQ/p46/xFNKN1k6272Kpl/8n8ibVSau8xgbEWCls1oOjeTZosWoyJBe6s48rYoZJEFDVk53U+Ih1Ao8WfOUNWn/0vNZ5MlONyAmtAhKriERQRai72Cjuy2pGiqEnmtrcE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1586376635561391.44714089565605; Wed, 8 Apr 2020 13:10:35 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-xb1SLfPIO3GmPXss6zT94w-1; Wed, 08 Apr 2020 16:10:29 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76E0185EE6A; Wed, 8 Apr 2020 20:10:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A368919925; Wed, 8 Apr 2020 20:10:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6AB781809565; Wed, 8 Apr 2020 20:10:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 038KAIKE001916 for ; Wed, 8 Apr 2020 16:10:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 121381054F8A; Wed, 8 Apr 2020 20:10:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D5E81054F87 for ; Wed, 8 Apr 2020 20:10:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C550E101A55A for ; Wed, 8 Apr 2020 20:10:15 +0000 (UTC) Received: from m9a0014g.houston.softwaregrp.com (m9a0014g.houston.softwaregrp.com [15.124.64.90]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-8AwqwpcSPfCGoq0_IqbMaA-1; Wed, 08 Apr 2020 16:10:13 -0400 Received: FROM m9a0014g.houston.softwaregrp.com (15.121.0.191) BY m9a0014g.houston.softwaregrp.com WITH ESMTP FOR libvir-list@redhat.com; Wed, 8 Apr 2020 20:08:34 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M9W0068.microfocus.com (2002:f79:bf::f79:bf) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 8 Apr 2020 20:09:23 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.124.8.13) by M4W0334.microfocus.com (15.120.17.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Wed, 8 Apr 2020 20:09:23 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) by BY5PR18MB3121.namprd18.prod.outlook.com (2603:10b6:a03:1a5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Wed, 8 Apr 2020 20:09:20 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::6157:7c41:b13d:23f5]) by BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::6157:7c41:b13d:23f5%3]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 20:09:20 +0000 Received: from linux-tbji.provo.novell.com (75.169.23.17) by DM3PR12CA0095.namprd12.prod.outlook.com (2603:10b6:0:55::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 20:09:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586376634; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nZDUuB5Mc+lobKoanndjR+S0JwP0mbXzb27sALryQB0=; b=bY60t5WA7kFDp0mxmSCmpbkIRf/EwaodlkTkvQ+W1SbX0SwQcO4GGK/kKbesvb3ombV46p eRNL4h05Dc63yxu/BfR7/XgtvWAwDaswvU83TSQqKPxhUxfgS5HOVqtAqQp90QyLfXX1HF dro8gnMrGkQQTt19+riwohv1TxfEkvw= X-MC-Unique: xb1SLfPIO3GmPXss6zT94w-1 X-MC-Unique: 8AwqwpcSPfCGoq0_IqbMaA-1 From: Jim Fehlig To: Subject: [PATCH 1/3] conf: Add a new xenbus controller option for event channels Date: Wed, 8 Apr 2020 14:08:53 -0600 Message-ID: <20200408200855.19806-2-jfehlig@suse.com> In-Reply-To: <20200408200855.19806-1-jfehlig@suse.com> References: <20200408200855.19806-1-jfehlig@suse.com> X-ClientProxiedBy: DM3PR12CA0095.namprd12.prod.outlook.com (2603:10b6:0:55::15) To BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [75.169.23.17] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ee73bf2c-6a41-49bd-d815-08d7dbf8b911 X-MS-TrafficTypeDiagnostic: BY5PR18MB3121: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR18MB3315.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(4636009)(396003)(366004)(136003)(39850400004)(346002)(376002)(6666004)(5660300002)(8936002)(26005)(2906002)(186003)(6506007)(2616005)(16526019)(956004)(1076003)(6916009)(107886003)(66476007)(86362001)(66556008)(36756003)(66946007)(6512007)(81166007)(316002)(6486002)(81156014)(52116002)(4326008)(478600001)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +PhNPY6ohgZieEVXF74ARiASgw9RK8dtwWjEuZ8lefP//324AITfJ3DbINYcwmSSIQU22xGZHVMEVoZ/ng/3O21n240WYCWhJ7OAatzwO1S3lbSdHYdWgsKgFCSC/St3ISY0ZTbWVZzu7ZylE16OU7kf+CeztrJkKxAVzqyt3T75u56e/QsSw09VEP16TzBwzSRm3i72NJCLLjUGoDwbcT5NpxyTHzS+B7WkOlEOs7QCBwi1zqoPeynfg73NJIDagHCMqCGKRVrrL269Qdc+1C2MmByjMYY40JgzGq9OEMt7mJ6YrOgM0FW2LFzISxfYi61jbAdef2DKQ3blCvfEYZ+XTBxp4dfMuxoGtrc7SpRoyoDlAPk742YTwucDEmoTI0na6zlG39R/f17fRHl/PTwAwngOApXBhFUWpRL5Nbn/4/NQaGtHiZykaJ6QsMlQ X-MS-Exchange-AntiSpam-MessageData: qgGbBpDEl7klOcm8ViayLeABuBXv7drMlCVsfUDKxbXEQPa1N0PexSNrUtxKvBQMQN1XD40+U2/OHENJS93ETk4oWZb1brI6QfD+f3jlpHXIhiZv0L5dCZN+VGS2ATFt2jGxe+usVhPJIcokTdoSsg== X-MS-Exchange-CrossTenant-Network-Message-Id: ee73bf2c-6a41-49bd-d815-08d7dbf8b911 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 20:09:20.2379 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /JZcqROvbLicDRMochX4m3Jp+7LhTcZw1Rye53UhuZRZzQ8ZEfsiwnEh9dpeWwHCEgI/9tOYUpN0yaboQu9Eyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3121 X-OriginatorOrg: suse.com X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 038KAIKE001916 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Event channels are like PV interrupts and in conjuction with grant frames form a data transfer mechanism for PV drivers. They are also used for inter-processor interrupts. Guests with a large number of vcpus and/or many PV devices many need to increase the maximum default value of 1023. For this reason the native Xen config format supports the 'max_event_channels' setting. See xl.cfg(5) man page for more details. Similar to the existing maxGrantFrames option, add a new xenbus controller option 'maxEventChannels', allowing to adjust the maximum value via libvirt. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/formatdomain.html.in | 8 ++++++-- docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 15 +++++++++++++++ src/conf/domain_conf.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index d56600dc18..eabb7b6ece 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4454,7 +4454,7 @@ <driver iothread=3D'4'/> <address type=3D'pci' domain=3D'0x0000' bus=3D'0x00' slot=3D'0x0b' = function=3D'0x0'/> </controller> - <controller type=3D'xenbus' maxGrantFrames=3D'64'/> + <controller type=3D'xenbus' maxGrantFrames=3D'64' maxEventChannels=3D= '2047'/> ... </devices> ... @@ -4514,7 +4514,11 @@
Since 5.2.0, the xenbus controller has an optional attribute maxGrantFrames, which specifies the maximum number of grant frames the controller - makes available for connected devices.
+ makes available for connected devices. + Since 6.3.0, the xenbus controller + supports the optional maxEventChannels attribute, + which specifies maximum number of event channels (PV interrupts) + that can be used by the guest. =20

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index dcf2e09db8..d0dcab9059 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2548,6 +2548,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6ad7552bde..0a2aa53264 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2252,6 +2252,7 @@ virDomainControllerDefNew(virDomainControllerType typ= e) break; case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS: def->opts.xenbusopts.maxGrantFrames =3D -1; + def->opts.xenbusopts.maxEventChannels =3D -1; break; case VIR_DOMAIN_CONTROLLER_TYPE_IDE: case VIR_DOMAIN_CONTROLLER_TYPE_FDC: @@ -11344,6 +11345,7 @@ virDomainControllerDefParseXML(virDomainXMLOptionPt= r xmlopt, break; case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS: { g_autofree char *gntframes =3D virXMLPropString(node, "maxGrantFra= mes"); + g_autofree char *eventchannels =3D virXMLPropString(node, "maxEven= tChannels"); =20 if (gntframes) { int r =3D virStrToLong_i(gntframes, NULL, 10, @@ -11354,6 +11356,15 @@ virDomainControllerDefParseXML(virDomainXMLOptionP= tr xmlopt, goto error; } } + if (eventchannels) { + int r =3D virStrToLong_i(eventchannels, NULL, 10, + &def->opts.xenbusopts.maxEventChannels); + if (r !=3D 0 || def->opts.xenbusopts.maxEventChannels < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Invalid maxEventChannels: %s"), eventcha= nnels); + goto error; + } + } break; } =20 @@ -25286,6 +25297,10 @@ virDomainControllerDefFormat(virBufferPtr buf, virBufferAsprintf(&attrBuf, " maxGrantFrames=3D'%d'", def->opts.xenbusopts.maxGrantFrames); } + if (def->opts.xenbusopts.maxEventChannels !=3D -1) { + virBufferAsprintf(&attrBuf, " maxEventChannels=3D'%d'", + def->opts.xenbusopts.maxEventChannels); + } break; =20 default: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 024f692053..089d600061 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -730,6 +730,7 @@ struct _virDomainUSBControllerOpts { =20 struct _virDomainXenbusControllerOpts { int maxGrantFrames; /* -1 =3D=3D undef */ + int maxEventChannels; /* -1 =3D=3D undef */ }; =20 /* Stores the virtual disk controller configuration */ --=20 2.26.0 From nobody Sun Feb 8 05:37:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586376859; cv=none; d=zohomail.com; s=zohoarc; b=i2oieF3AYrsyrqhRf4csVOd7k1AGB8ijYslFT45j4eY8kqbv1U2pVDY2r9iHnVdCUR/FaZDm0LLXZzyx0/+ynJwF4SkIiB2osjPY1WroLfHpMaz0C+7YgS+gLggD52kWpMyjnrXuU9r+M4Y+7NkZBGRPPfTAD1Q/qH0ihlBUc2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586376859; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=meAO4ouljaVAesMmyySKkmNJRUU+A5v26iKFCB+m/D4=; b=kddjmEQkgCVpBdjFHcLYyNCA7w2Zqwe7RMm1E3nNe4TE1BR3I/RptZ3SczZDfPXAEOtSP2rhmLWi7qbmnjZuPGgTn0UBHCMi4yGf1DI8WsyLcBRekeuTJ01SxiDSyc5VwZvV2yO+rx1wbLhAxxQVMpE6a5+O/Dzox4fKh9pm8sE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1586376859186562.5136511985082; Wed, 8 Apr 2020 13:14:19 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-301-XSKbYWC9OmW-bYigFxvlwA-1; Wed, 08 Apr 2020 16:14:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EB9713FE; Wed, 8 Apr 2020 20:14:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FCE29B905; Wed, 8 Apr 2020 20:14:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CD98893060; Wed, 8 Apr 2020 20:14:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 038KDwT9002101 for ; Wed, 8 Apr 2020 16:13:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8658F2026D66; Wed, 8 Apr 2020 20:13:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 820892028DCB for ; Wed, 8 Apr 2020 20:13:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3885C8F7A15 for ; Wed, 8 Apr 2020 20:13:56 +0000 (UTC) Received: from m4a0073g.houston.softwaregrp.com (m4a0073g.houston.softwaregrp.com [15.124.2.131]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-CCCCjvqNO_OQ1z21DfVITw-1; Wed, 08 Apr 2020 16:13:52 -0400 Received: FROM m4a0073g.houston.softwaregrp.com (15.120.17.147) BY m4a0073g.houston.softwaregrp.com WITH ESMTP FOR libvir-list@redhat.com; Wed, 8 Apr 2020 20:11:42 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 8 Apr 2020 20:09:23 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.124.8.10) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Wed, 8 Apr 2020 20:09:23 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) by BY5PR18MB3121.namprd18.prod.outlook.com (2603:10b6:a03:1a5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Wed, 8 Apr 2020 20:09:22 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::6157:7c41:b13d:23f5]) by BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::6157:7c41:b13d:23f5%3]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 20:09:22 +0000 Received: from linux-tbji.provo.novell.com (75.169.23.17) by DM3PR12CA0095.namprd12.prod.outlook.com (2603:10b6:0:55::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 20:09:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586376857; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=meAO4ouljaVAesMmyySKkmNJRUU+A5v26iKFCB+m/D4=; b=fbEt3I7qVm0lPEvxBkMbJcAcGoQR+MafIPybQF8OX9cX/8iQOa621lMyXSOb1a0tUt21q6 7Hb34meMjepgwNo9VZYfD7w4derSijRUei/SsZU6mICOh2azxtZepVxJmjv+B0nQ9BWtSg I3vMTJI6wItvq0lrOw2rSNV+06GaloU= X-MC-Unique: XSKbYWC9OmW-bYigFxvlwA-1 X-MC-Unique: CCCCjvqNO_OQ1z21DfVITw-1 From: Jim Fehlig To: Subject: [PATCH 2/3] libxl: Add support for max_event_channels Date: Wed, 8 Apr 2020 14:08:54 -0600 Message-ID: <20200408200855.19806-3-jfehlig@suse.com> In-Reply-To: <20200408200855.19806-1-jfehlig@suse.com> References: <20200408200855.19806-1-jfehlig@suse.com> X-ClientProxiedBy: DM3PR12CA0095.namprd12.prod.outlook.com (2603:10b6:0:55::15) To BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [75.169.23.17] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9afb87c1-0c74-40b8-c068-08d7dbf8b9a7 X-MS-TrafficTypeDiagnostic: BY5PR18MB3121: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR18MB3315.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(4636009)(396003)(366004)(136003)(39850400004)(346002)(376002)(6666004)(5660300002)(8936002)(26005)(2906002)(186003)(6506007)(2616005)(16526019)(956004)(1076003)(6916009)(107886003)(66476007)(86362001)(66556008)(36756003)(66946007)(6512007)(81166007)(316002)(6486002)(81156014)(52116002)(4326008)(478600001)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XL8RFcRqJJ5BjWL2aFGj8GBE9uA4P92Vmqs3fTrVTEfaWNifGsyqvUFZH0ie/rmkmSVO5KcyjgAohGkiY+wCwms4klNxV1keN4edChCngiqCwbR/ENcxXvFhh3uY7lc6jvEUwGzjYKPWUp1E9hXESHyUJxA99S8SgQQjwu5ms8CCbOCs9ZQ9PlKyK/JYDDxm9bBuqsiNzqPt0WOOsdCmfDb2Fl6gC4t8HB86mYmWac1DEnl1TBjHVVslXjifqoFVnZ7FqoPfU3Siy67U9+YkPVB/awK0HzQZiTt66CYiWy4eoaiPVp4pdoAqkI4I92KRRGETj5DH6GUFHCn+aPrLMX9RlzSX1u3MHui2dsQry1L4a1PWDp2VxHnUbSmcVK08bsCU0D8GGJ9FZd5kh0pggDM6gvh6mxIKVXmBDxjWdp/mH3rhqNpbDk0s0KaWeRR6 X-MS-Exchange-AntiSpam-MessageData: B/I0rkudpCCCKZPFFKzNRuWaMFlohX3qCBYQIzRi1p0CuyyqMELT35Y3q+WY/rkVowVuuYvAnWPKF3kj1A5w9zvddSSQAZmk1dFwGK3yBLFSlGuRIaNEvmQGuHxp3mvg8+YYy2IWeAdA3m4epHuMKw== X-MS-Exchange-CrossTenant-Network-Message-Id: 9afb87c1-0c74-40b8-c068-08d7dbf8b9a7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 20:09:21.2663 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NVlZYB1L/wM4383R/3HRQQBhRZs3vXCGwvLD8PkF+iVl3yJUqzhXIwzqV3NozSvb3sNiPWrqUjUBPojKX2ID6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3121 X-OriginatorOrg: suse.com X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 038KDwT9002101 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add support for setting event_channels in libxl domain config object and include a test to check that it is properly converted from XML to libxl domain config. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- src/libxl/libxl_conf.c | 14 +-- .../max-eventchannels-hvm.json | 90 +++++++++++++++++++ .../max-eventchannels-hvm.xml | 37 ++++++++ tests/libxlxml2domconfigtest.c | 2 + 4 files changed, 138 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index be5fc505fe..b3f67f817a 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -380,13 +380,17 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, b_info->max_memkb =3D virDomainDefGetMemoryInitial(def); b_info->target_memkb =3D def->mem.cur_balloon; =20 -#ifdef LIBXL_HAVE_BUILDINFO_GRANT_LIMITS for (i =3D 0; i < def->ncontrollers; i++) { - if (def->controllers[i]->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_XE= NBUS && - def->controllers[i]->opts.xenbusopts.maxGrantFrames > 0) - b_info->max_grant_frames =3D def->controllers[i]->opts.xenbuso= pts.maxGrantFrames; - } + if (def->controllers[i]->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_XE= NBUS) { + if (def->controllers[i]->opts.xenbusopts.maxEventChannels > 0) + b_info->event_channels =3D def->controllers[i]->opts.xenbu= sopts.maxEventChannels; + +#ifdef LIBXL_HAVE_BUILDINFO_GRANT_LIMITS + if (def->controllers[i]->opts.xenbusopts.maxGrantFrames > 0) + b_info->max_grant_frames =3D def->controllers[i]->opts.xen= busopts.maxGrantFrames; #endif + } + } =20 if (hvm || pvh) { if (caps && diff --git a/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json b/test= s/libxlxml2domconfigdata/max-eventchannels-hvm.json new file mode 100644 index 0000000000..d5b351beb5 --- /dev/null +++ b/tests/libxlxml2domconfigdata/max-eventchannels-hvm.json @@ -0,0 +1,90 @@ +{ + "c_info": { + "type": "hvm", + "name": "test-hvm", + "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b" + }, + "b_info": { + "max_vcpus": 4, + "avail_vcpus": [ + 0, + 1, + 2, + 3 + ], + "max_memkb": 1048576, + "target_memkb": 1048576, + "video_memkb": 8192, + "shadow_memkb": 12288, + "event_channels": 2047, + "device_model_version": "qemu_xen", + "device_model": "/bin/true", + "sched_params": { + + }, + "type.hvm": { + "pae": "True", + "apic": "True", + "acpi": "True", + "vga": { + "kind": "cirrus" + }, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + }, + "spice": { + + }, + "boot": "c", + "rdm": { + + } + }, + "arch_arm": { + + } + }, + "disks": [ + { + "pdev_path": "/var/lib/xen/images/test-hvm.img", + "vdev": "hda", + "backend": "qdisk", + "format": "raw", + "removable": 1, + "readwrite": 1 + } + ], + "nics": [ + { + "devid": 0, + "mac": "00:16:3e:66:12:b4", + "bridge": "br0", + "script": "/etc/xen/scripts/vif-bridge", + "nictype": "vif_ioemu" + } + ], + "vfbs": [ + { + "devid": -1, + "vnc": { + "enable": "True", + "listen": "0.0.0.0", + "findunused": "False" + }, + "sdl": { + "enable": "False" + } + } + ], + "vkbs": [ + { + "devid": -1 + } + ], + "on_reboot": "restart" +} diff --git a/tests/libxlxml2domconfigdata/max-eventchannels-hvm.xml b/tests= /libxlxml2domconfigdata/max-eventchannels-hvm.xml new file mode 100644 index 0000000000..97b1440a5e --- /dev/null +++ b/tests/libxlxml2domconfigdata/max-eventchannels-hvm.xml @@ -0,0 +1,37 @@ + + test-hvm + None + 2147d599-9cc6-c0dc-92ab-4064b5446e9b + 1048576 + 1048576 + 4 + destroy + restart + destroy + + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + /bin/true + + + + + + + + + +