From nobody Mon Feb 9 13:57:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1600777768; cv=none; d=zohomail.com; s=zohoarc; b=XzAOLN7dH3468Et2Nr1MF1Cco1EWhwdJ0EolqDuFIbo+29UMylQfXVKp52C9q1NGqks7jUWgt5ZeWeAJpYF0ebdNm7c1Ez8ULM6puXJtf7Vi0rhFeYahgxNInaz+P4H2p38DFl4kC1pdqE8Bh4ekpzDZyv3fDtQeRgkZvDUTkkk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600777768; 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=DwyBQwn8o4+6jUXmKbN+/LFi2xcQyVDJC/IGLVqqMC4=; b=aivJBn8Cc0tH/GqjxoLl2ldLUy+KtDocTlufZ5FPcZ4jeuLgc2jLaL4U8bf337nPUjY4WtM5a1RJp/EyHjtsPI2S61CXTHcKZqKNelGJ9AIXLLkaPLK8i8OhuX7YXcNYu+5vfPevHKOpFxChKC6b+mS2NZ65ewuRdBf19cpF8Hc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1600777768585326.4748668076037; Tue, 22 Sep 2020 05:29:28 -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-565-oyG0YLtYPaKDMDqtNfpk2A-1; Tue, 22 Sep 2020 08:29:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0A348018A4; Tue, 22 Sep 2020 12:29:17 +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 C99FD73695; Tue, 22 Sep 2020 12:29:17 +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 8CB76922EA; Tue, 22 Sep 2020 12:29:17 +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 08MCTDK6017287 for ; Tue, 22 Sep 2020 08:29:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id D7B5B201C0DC; Tue, 22 Sep 2020 12:29:13 +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 D2125201EB53 for ; Tue, 22 Sep 2020 12:29:10 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 EFB7C858286 for ; Tue, 22 Sep 2020 12:29:09 +0000 (UTC) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-461-13jrl0gPO3CfZb7ddYrifw-1; Tue, 22 Sep 2020 08:29:07 -0400 Received: by mail-lj1-f193.google.com with SMTP id y4so13958135ljk.8 for ; Tue, 22 Sep 2020 05:29:06 -0700 (PDT) Received: from kloomba.my.domain ([5.227.242.255]) by smtp.gmail.com with ESMTPSA id y26sm3715539ljy.88.2020.09.22.05.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 05:29:04 -0700 (PDT) X-MC-Unique: oyG0YLtYPaKDMDqtNfpk2A-1 X-MC-Unique: 13jrl0gPO3CfZb7ddYrifw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DwyBQwn8o4+6jUXmKbN+/LFi2xcQyVDJC/IGLVqqMC4=; b=BkNk/uhBAEr1vIJZznTOU//APCZOZTfRxbJ7+v9OWRy4GGC0QFR2FOCh+t/IJAS7R6 AtCF4+FT0Ff5EEHrXtwVTwjgG8vtVwkBNtbDQuhEISlOHPbJb1VqV3vVzWjC8/kJ06Um 2iat0dSyyGmFAxIyEB343K9tSoMCC9m90jA3g9IKzNhkL/wotNY+PFNohvGe8AISyrZW 740JFvuPG5wxVfui7YXnW2aIou908gRIUZw9Fn/gzZTsjyHxVKcG0gTVvp9Gim6o5VFS lfrmBNako1qXqPYzVq3h9FrhO5xL/HORtsQtaCS/2K0AMI7uDnhuQ81leI2rRCKTGOZa PHLA== X-Gm-Message-State: AOAM533LXrYkR186Ew1ronSMOOd0XS3cxEGVCkCcSy8cX3vAIpSW3m9l QG7LuRHzfch85bo5gDTKtZKhW0EgJxFHmvIz X-Google-Smtp-Source: ABdhPJwb7RPw6hJcPQh3uxAwsz2P/j0zNKM+rlMXmzVyvERPELtM2gMQ1YKlbgBZ08Is/H7pjoe0lw== X-Received: by 2002:a2e:86c7:: with SMTP id n7mr1514601ljj.229.1600777745359; Tue, 22 Sep 2020 05:29:05 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Subject: [PATCH v2 3/4] bhyve: probe for VNC password capability Date: Tue, 22 Sep 2020 16:28:50 +0400 Message-Id: <20200922122851.70947-4-bogorodskiy@gmail.com> In-Reply-To: <20200922122851.70947-1-bogorodskiy@gmail.com> References: <20200922122851.70947-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Fabian Freyer , Roman Bogorodskiy 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.13 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 Content-Type: text/plain; charset="utf-8" From: Fabian Freyer Introduces the BHYVE_CAP_VNC_PASSWORD capability, which is probed by parsing the error message from the bhyve command. When it is not supported, bhyve -s 0,fbuf,password=3D will return an error message. Signed-off-by: Fabian Freyer Signed-off-by: Roman Bogorodskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- src/bhyve/bhyve_capabilities.c | 16 +++++++++++++++- src/bhyve/bhyve_capabilities.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 36f3985335..523a31e287 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -3,7 +3,7 @@ * * Copyright (C) 2014 Roman Bogorodskiy * Copyright (C) 2014 Semihalf - * Copyright (C) 2016 Fabian Freyer + * Copyright (C) 2020 Fabian Freyer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -334,6 +334,17 @@ bhyveProbeCapsSoundHda(unsigned int *caps, char *binar= y) } =20 =20 +static int +bhyveProbeCapsVNCPassword(unsigned int *caps, char *binary) +{ + return bhyveProbeCapsDeviceHelper(caps, binary, + "-s", + "0,fbuf,password=3D", + "Invalid fbuf emulation \"password\"= ", + BHYVE_CAP_VNC_PASSWORD); +} + + int virBhyveProbeCaps(unsigned int *caps) { @@ -365,6 +376,9 @@ virBhyveProbeCaps(unsigned int *caps) if ((ret =3D bhyveProbeCapsSoundHda(caps, binary))) goto out; =20 + if ((ret =3D bhyveProbeCapsVNCPassword(caps, binary))) + goto out; + out: VIR_FREE(binary); return ret; diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h index 1ac9ff4283..b2a16b0189 100644 --- a/src/bhyve/bhyve_capabilities.h +++ b/src/bhyve/bhyve_capabilities.h @@ -50,6 +50,7 @@ typedef enum { BHYVE_CAP_XHCI =3D 1 << 5, BHYVE_CAP_CPUTOPOLOGY =3D 1 << 6, BHYVE_CAP_SOUND_HDA =3D 1 << 7, + BHYVE_CAP_VNC_PASSWORD =3D 1 << 8, } virBhyveCapsFlags; =20 int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps); --=20 2.27.0