From nobody Mon Feb 9 12:23:50 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