From nobody Sun Feb 8 06:49:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586377825; cv=none; d=zohomail.com; s=zohoarc; b=NzoqwA6QpYTDB4CMp6/LZHskk0x1IGCfxcfpIfF5Trk0J3Vb77bTjo5oiCNCvBdwrO3dF6WV9o6XBgaopjnhjpSSPFocAA1c0CnR9XTnKZAEt+rYTMUKvfKPLNv6mWvpE3dG1Kx1Cr5llBSrFdr6SLz+HapMqNs+z7Dje6IUSY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586377825; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=S5UnOpzwHf0zFBjip/wmYqiKQbUo2mFanQgrgHe+emg=; b=fkQKrIZ/0jBQO/cBSmOyfB0z3Aq7BZt3y8t/OeSGevJfolz41LTo83nwDfORYSr7px/68ZnCgy9nba70+1j1FbtoFITQ+396rudvF1xVTIv3utYi328UbX0B/QMNCr2pLu6vs/YKAo2SeopXqitg2q096ikq/GeENlmeVJZ329w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1586377825687223.67918869290577; Wed, 8 Apr 2020 13:30:25 -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-162-IrXMHngLN7Wp91blI1dC3g-1; Wed, 08 Apr 2020 16:30:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61DE28017FB; Wed, 8 Apr 2020 20:30:16 +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 1F84760BFB; Wed, 8 Apr 2020 20:30:16 +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 9C1B1944CD; Wed, 8 Apr 2020 20:30:15 +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 038KUE0I003044 for ; Wed, 8 Apr 2020 16:30:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3AD972026D66; Wed, 8 Apr 2020 20:30:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3651C202A940 for ; Wed, 8 Apr 2020 20:30:12 +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 080888007A4 for ; Wed, 8 Apr 2020 20:30:12 +0000 (UTC) Received: from m4a0072g.houston.softwaregrp.com (m4a0072g.houston.softwaregrp.com [15.124.2.130]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-315-N58Y1DpmPHKOL4Qk6t3GCg-1; Wed, 08 Apr 2020 16:30:09 -0400 Received: FROM m4a0072g.houston.softwaregrp.com (15.120.17.146) BY m4a0072g.houston.softwaregrp.com WITH ESMTP FOR libvir-list@redhat.com; Wed, 8 Apr 2020 20:28:39 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) 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:29:36 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.124.8.10) 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:29:36 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) by BY5PR18MB3345.namprd18.prod.outlook.com (2603:10b6:a03:1ae::30) 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:29:34 +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:29:34 +0000 Received: from linux-tbji.provo.novell.com (75.169.23.17) by DM5PR07CA0040.namprd07.prod.outlook.com (2603:10b6:3:16::26) 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:29:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586377824; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=S5UnOpzwHf0zFBjip/wmYqiKQbUo2mFanQgrgHe+emg=; b=KyGkMSSbdjwW3VQHxh5639eEvrY/8S4VKlYJYa4nMNp3TP2mSprs0S8FDyBrsdFcWGpD+i qteTud55FRpvN3TsgEfhn5ukQfppoHejlCIRGoXDOwHJBh8qKDZdomKj55J+chpgEXVTzR KUDpHsVSgS8UBLcuxxEw5XO5z7PVEpw= X-MC-Unique: IrXMHngLN7Wp91blI1dC3g-1 X-MC-Unique: N58Y1DpmPHKOL4Qk6t3GCg-1 From: Jim Fehlig To: Subject: [PATCH] libxl: enable Xen's e820_host setting Date: Wed, 8 Apr 2020 14:29:16 -0600 Message-ID: <20200408202916.20341-1-jfehlig@suse.com> X-ClientProxiedBy: DM5PR07CA0040.namprd07.prod.outlook.com (2603:10b6:3:16::26) 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: c9ab199f-9e0e-4742-8bfb-08d7dbfb8c5e X-MS-TrafficTypeDiagnostic: BY5PR18MB3345: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; 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)(346002)(136003)(396003)(376002)(366004)(39860400002)(316002)(36756003)(6506007)(107886003)(4326008)(52116002)(86362001)(6486002)(186003)(66556008)(66476007)(16526019)(66946007)(966005)(2616005)(6512007)(26005)(5660300002)(956004)(478600001)(81166007)(6916009)(2906002)(1076003)(6666004)(8676002)(81156014)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SV5L4DIDc2VsB2bSgWflRtClGvNOslIydZgJBvKPAjhlWb4oUepKJDhgYldq5v/b7JeYGtWi+cO9YnKkE5nRLJ7Ekj/KlKjKKrmnPIDbhJFP6cYEVyR75KhEnr4dcBdr+xIrpN10bW1fbjYwya0sIGcWrNHc51QBFLQ08BxSSzUxH68xJxu2ssRfulWRebNAYrz9D6hdLCr/rzZv6mcUzQ8UtQjH4HqmAAz1m61KCae84s2yFgYLpoElIa26Xnl1NEzqqPDCCerKGOdh+8eGGlxWaJaHcU2migOjzv0lw2vP9JVlGjk3T91ZHLh2fDlsVhYTpFAXDmfv6g7k5iVQ3DJ1VytCFq6ZdstZ0cl4S8rB4pMMNuTzppZktCR+kXY5dKKhjF9zVVnSFutWeGCXzYDHgfrSeYGwio4MxlFMl7AUoZN7SldBFcYEgbOMXcuQREr1oTmOFcQR04PNpCH8cvwQNG8cIWEWFV/2lbfZHl6t7H34ZjrwkKDERYgTcA3TikqLWtWVYNd1iO0M+E50yw== X-MS-Exchange-AntiSpam-MessageData: gthqGvpDueYYbe2FmfWNjVZt0H7q3gGXdFWoReliUC/V7mbDTTlVgUckg5u76p/yon02gzkUdxznbHog5NQVX5a+uxCNXlBQXUUCSn4x1YJWzCAHs43LG5tyL9vcZ1LPuDjFJRhVLou7SBnq11FyVQ== X-MS-Exchange-CrossTenant-Network-Message-Id: c9ab199f-9e0e-4742-8bfb-08d7dbfb8c5e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 20:29:33.8013 (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: xFpKeQWBkzoVKLgldXRXEaGA2Ef5rT4KOlhyO52bG3h1mLd4OA4YYrqP7gf24gVTZOp5s9iTIm1CrhX2X8d/Dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3345 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 038KUE0I003044 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.12 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" Hotplugging PCI devices to Xen PV guests is only possible if the libxl_domain_build_info struct has the e820_host field enabled when the guest is created. By default it is disabled but libxl will automatically enable e820_host if the config contains one or more PCI devices, in which case hotplugging additional PCI devices later works. According to xl.cfg(5) man page it is safe to unconditionally enable the PV-only e820_host setting. Furthermore xen.git commits 414979ba85 and f92337d949, which introduce the setting with a default of disabled, claim the setting can be enabled or even removed "once the auto-ballooning of guests with PCI devices works". Those commits are from May 2011 so I think it is safe to say the issues have been resolved in the meantime. Regardless, we should avoid exposing a Xen setting in libvirt that could be removed later. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- See related thread on the ML https://www.redhat.com/archives/libvir-list/2020-April/msg00376.html src/libxl/libxl_conf.c | 5 +++++ tests/libxlxml2domconfigdata/basic-pv.json | 3 ++- tests/libxlxml2domconfigdata/multiple-ip.json | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index be5fc505fe..f6280157fb 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -288,6 +288,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, #endif } else { libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_PV); + /* + * e820_host is a PV-only setting and according to xl.cfg(5) it + * should be safe to unconditionally enable it. + */ + libxl_defbool_set(&b_info->u.pv.e820_host, true); } =20 b_info->max_vcpus =3D virDomainDefGetVcpusMax(def); diff --git a/tests/libxlxml2domconfigdata/basic-pv.json b/tests/libxlxml2do= mconfigdata/basic-pv.json index b71c3b0f49..2cb95feff8 100644 --- a/tests/libxlxml2domconfigdata/basic-pv.json +++ b/tests/libxlxml2domconfigdata/basic-pv.json @@ -19,7 +19,8 @@ =20 }, "type.pv": { - "bootloader": "pygrub" + "bootloader": "pygrub", + "e820_host": "True" }, "arch_arm": { =20 diff --git a/tests/libxlxml2domconfigdata/multiple-ip.json b/tests/libxlxml= 2domconfigdata/multiple-ip.json index 2db98b82f6..01bb169cdc 100644 --- a/tests/libxlxml2domconfigdata/multiple-ip.json +++ b/tests/libxlxml2domconfigdata/multiple-ip.json @@ -19,7 +19,8 @@ =20 }, "type.pv": { - "bootloader": "pygrub" + "bootloader": "pygrub", + "e820_host": "True" }, "arch_arm": { =20 --=20 2.26.0