From nobody Sat May 4 02:29:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639500839; cv=none; d=zohomail.com; s=zohoarc; b=j7QDtwjB7s++e9afM1G8lUH66YdYdpQMR7PIP+jQpAZYMpzLKgDuwRf61GUa3sfdGp4aiPzimD+e6CbybVafxWB8YLvIT5087jIHSuLYVqT6ZjX68H9Axu2MRN2VfU+6Ofaf75zYv6b6Ck3odRKrukiaIeBcinrga6WZVfGGptc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639500839; h=Content-Type:Content-Transfer-Encoding:Cc: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=QtNv/7h+fciRTz7jjI8Peww8Cq4yeg48ZoFD9a2qxew=; b=ZV6Akf9d6VVXyX/z/fLgtzy5rnYXtV06k36yQtu6FW81bTcEWuoLonJV9BOGLmT2newHakjT8a9mLQdeDfAyFHuDYlsQnIimYjrBu5FXMP6Y0Rb6z3vb9QXH/zMRdinc7WwPiCKcP5Y/jkrXsskVO+XT4oAGHlmoVwzsCYABlys= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639500839906201.3156405687355; Tue, 14 Dec 2021 08:53:59 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-470-ud9fYWjMOMK-dcTE7FUafA-1; Tue, 14 Dec 2021 11:53:57 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A3D13100D080; Tue, 14 Dec 2021 16:53:52 +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 E50C878A12; Tue, 14 Dec 2021 16:53:51 +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 721531809CB8; Tue, 14 Dec 2021 16:53:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BEGrnFB021081 for ; Tue, 14 Dec 2021 11:53:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 82DDF798A5; Tue, 14 Dec 2021 16:53:49 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBFC378A8F; Tue, 14 Dec 2021 16:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639500838; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=QtNv/7h+fciRTz7jjI8Peww8Cq4yeg48ZoFD9a2qxew=; b=O1WAbcU/er4Cz8Me5F+K2XGRxjIBCw9QQeEuc597eQv9zUkuRLdu6ZxF7kXKcVS74E2tiH nsty3JeeBPTkCuaUX3vMZuyDCq5siCL4CBm0NoHiqGFnoJADDwR6MQwVsaRBl+2sulwhDs tsBA0rzNHG/6jgWVRHEZyyBp7fnqKMM= X-MC-Unique: ud9fYWjMOMK-dcTE7FUafA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] docs: domain: Clarify on the dangers of migrating with hyperv-passthrough enabled Date: Tue, 14 Dec 2021 17:53:42 +0100 Message-Id: <20211214165343.57954-2-twiederh@redhat.com> In-Reply-To: <20211214165343.57954-1-twiederh@redhat.com> References: <20211214165343.57954-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639500840488100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- docs/formatdomain.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 0c5e33c78f..2e9c450606 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1929,7 +1929,14 @@ are: Set exactly the specified features. =20 ``passthrough`` - Enable all features currently supported by the hypervisor. + Enable all features currently supported by the hypervisor, even thos= e that + libvirt does not understand. Migration of a guest using passthrough = is + dangerous if the source and destination hosts are not identical in b= oth + hardware, QEMU version, microcode version and configuration. If such= a + migration is attempted then the guest may hang or crash upon resuming + execution on the destination host. Depending on hypervisor version t= he + virtual CPU may or may not contain features which may block migration + even to an identical host. =20 The ``mode`` attribute can be omitted and will default to ``custom``. =20 --=20 2.31.1 From nobody Sat May 4 02:29:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639500849; cv=none; d=zohomail.com; s=zohoarc; b=nxk2PWkSCi9tLIlGn2iYoKZikdPKEdWTYBcQar571gz+zPIvGr20zovjuR+9KFQa8opzxboLM4kGrKf+hWCheBJKww9Lsxusc/cMikwCGIVy9nS265THiRxNdwcitF93Il9+yi0arDeTLmEDHWYoT1fySs/0oS3HCjVvOgkNG8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639500849; h=Content-Type:Content-Transfer-Encoding:Cc: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=axDCrWvVG4VCi17SNyR//uHaNZodXQAlSvjetKL0PW8=; b=a9l8z66713Y1VqjIvD/Gtw1pjGM2Am8LZ+IZqxcFfz+bREFiomQtgyFkIM3LsI6+Dtir2Hdr9VckYpfsAbimb81xNU6HVZJ1Z5oSQuychzg7KbbWc/pEKpKS295t+09xy0KPr+XMqWT1t7jYoY6+F5LeYl1yeyhlGGqF83okUyQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639500849168140.58947769648864; Tue, 14 Dec 2021 08:54:09 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-1ZxI0QB0Nj6CDBV-FbWIQQ-1; Tue, 14 Dec 2021 11:54:07 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C758760C7; Tue, 14 Dec 2021 16:54:01 +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 EA20577467; Tue, 14 Dec 2021 16:54:00 +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 BAAFE4A7C9; Tue, 14 Dec 2021 16:54:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BEGrxuZ021115 for ; Tue, 14 Dec 2021 11:53:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4000178AAD; Tue, 14 Dec 2021 16:53:59 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88171798AF; Tue, 14 Dec 2021 16:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639500848; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=axDCrWvVG4VCi17SNyR//uHaNZodXQAlSvjetKL0PW8=; b=EqGSRB2so1Zwmn2v+TuGKDkCIo+AWExcTwyBxXuYdhC7jN6XDB0i12vOU/2xlSe4rbjpBf Y/1Sk6LwFfqHqf6eEqcTX3ipd8Gw39GLIn6bAqSIeMAJ803JdYB/rdVLfiXfh04bJNcMBC Klxq4iX8BYfrqahzUex3Ub8Ean9XnQE= X-MC-Unique: 1ZxI0QB0Nj6CDBV-FbWIQQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] virDomainFeaturesHyperVDefParse: Compare hyperv mode Date: Tue, 14 Dec 2021 17:53:43 +0100 Message-Id: <20211214165343.57954-3-twiederh@redhat.com> In-Reply-To: <20211214165343.57954-1-twiederh@redhat.com> References: <20211214165343.57954-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639500850778100001 Content-Type: text/plain; charset="utf-8" Previous patch neglected the possibility of different modes for hyperv (e.g. "custom" and "passthrough"). Fixes: 6e83fafe331dd0b4fb19aa384c3dd36b3af62933 Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9a21ac10ce..2d8851fa11 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21734,6 +21734,15 @@ virDomainDefFeaturesCheckABIStability(virDomainDef= *src, } =20 /* hyperv */ + if (src->features[VIR_DOMAIN_FEATURE_HYPERV] !=3D dst->features[VIR_DO= MAIN_FEATURE_HYPERV]) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("State of HyperV enlightenment mode differs: " + "source: '%s', destination: '%s'"), + virDomainHyperVModeTypeToString(src->features[VIR_D= OMAIN_FEATURE_HYPERV]), + virDomainHyperVModeTypeToString(dst->features[VIR_D= OMAIN_FEATURE_HYPERV])); + return false; + } + if (src->features[VIR_DOMAIN_FEATURE_HYPERV] !=3D VIR_DOMAIN_HYPERV_MO= DE_NONE) { for (i =3D 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { switch ((virDomainHyperv) i) { --=20 2.31.1