From nobody Mon Feb 9 11:30:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598454075; cv=none; d=zohomail.com; s=zohoarc; b=fwNonRXaoogFZmcES1RJQ60kfissPvxQZ0rbKuECLzUekaLMcIXNlZVksiBi4GnaNBEXSoeiIl80tvxb8Umn2Q/KROMP/slG4hNgNeRvg7SX7sqqkSGLLhuA8RT9FeFgtfPVKI5rQ/J5kl/nPIWhsheOU8CNK7FrSz10qU3Iqrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598454075; 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=9roSgM66IiBIQZjYMh8WgmO1UZqEEROPpB96xe/qOl0=; b=BUObv9iRh4gFcm2Om9TrB8x2Q0OBXh1SXC2nTC2Itple6GJ+s4MgQocTgLfJkNgzGUSZBuM90DtTxE6x3nVNWThOrsIzTLxoH7h3SPEYBqYxVi5tDjq9hdUAuawvUQAn06Mvdn9kHCZkc1QXdCOVi4xH4JBvz9xp1U2qZpqr28c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598454075391299.9395544472277; Wed, 26 Aug 2020 08:01:15 -0700 (PDT) Received: from localhost ([::1]:59312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAwvK-0002Cd-30 for importer@patchew.org; Wed, 26 Aug 2020 11:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAwnJ-0006p1-KC for qemu-devel@nongnu.org; Wed, 26 Aug 2020 10:52:57 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:60891 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kAwnG-0008MN-7b for qemu-devel@nongnu.org; Wed, 26 Aug 2020 10:52:57 -0400 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-534-4rpVTDsSONCdyWEZj2seaw-1; Wed, 26 Aug 2020 10:52:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 57EF310074AF; Wed, 26 Aug 2020 14:52:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-54.ams2.redhat.com [10.36.112.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED1CF5D9E4; Wed, 26 Aug 2020 14:52:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 20A6931F97; Wed, 26 Aug 2020 16:52:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598453573; h=from:from: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; bh=9roSgM66IiBIQZjYMh8WgmO1UZqEEROPpB96xe/qOl0=; b=ieeUuNuLze6h8APAQOlI3vL+EMUIJcKYN38yBZ3fpQO/pwNTorekKrqXtcrYHfi1nLMok6 c+pOt3XGwGNxHy2fKFef0+0w82VsPbXSlD7UJaqIIxSyxafUteibpB3FP9eeTxTNZVMxBp 3+SJ2KTzA8n7azBk/zXPmCQViPRb1Ow= X-MC-Unique: 4rpVTDsSONCdyWEZj2seaw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 11/18] meson: Add U2F key to meson Date: Wed, 26 Aug 2020 16:52:32 +0200 Message-Id: <20200826145239.6077-12-kraxel@redhat.com> In-Reply-To: <20200826145239.6077-1-kraxel@redhat.com> References: <20200826145239.6077-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 06:53:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.959, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?C=C3=A9sar=20Belley?= , Gerd Hoffmann , Cleber Rosa , Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: C=C3=A9sar Belley Signed-off-by: C=C3=A9sar Belley Message-id: 20200826114209.28821-8-cesar.belley@lse.epita.fr Signed-off-by: Gerd Hoffmann --- configure | 8 +++++++- meson_options.txt | 1 + hw/usb/Kconfig | 5 +++++ hw/usb/meson.build | 7 +++++++ meson.build | 7 +++++++ 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b1e11397a827..24137d49d6f4 100755 --- a/configure +++ b/configure @@ -495,6 +495,7 @@ trace_file=3D"trace" spice=3D"" rbd=3D"" smartcard=3D"" +u2f=3D"auto" libusb=3D"" usb_redir=3D"" opengl=3D"" @@ -1411,6 +1412,10 @@ for opt do ;; --enable-smartcard) smartcard=3D"yes" ;; + --disable-u2f) u2f=3D"disabled" + ;; + --enable-u2f) u2f=3D"enabled" + ;; --disable-libusb) libusb=3D"no" ;; --enable-libusb) libusb=3D"yes" @@ -1940,6 +1945,7 @@ disabled with --disable-FEATURE, default is enabled i= f available: libiscsi iscsi support libnfs nfs support smartcard smartcard support (libcacard) + u2f U2F support (u2f-emu) libusb libusb (for usb passthrough) live-block-migration Block migration in the main migration stream usb-redir usb network redirection support @@ -8230,7 +8236,7 @@ NINJA=3D$PWD/ninjatool $meson setup \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ -Dsdl=3D$sdl -Dsdl_image=3D$sdl_image \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_png=3D$v= nc_png \ - -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon \ + -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f\ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson_options.txt b/meson_options.txt index c55f9cd94cb2..aef2de652332 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,7 @@ option('gettext', type : 'boolean', value : true) option('sdl', type : 'feature', value : 'auto') option('sdl_image', type : 'feature', value : 'auto') +option('u2f', type : 'feature', value : 'auto') option('vnc', type : 'feature', value : 'enabled') option('vnc_jpeg', type : 'feature', value : 'auto') option('vnc_png', type : 'feature', value : 'auto') diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index 5e63dc75f815..3fc8fbe3c74c 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -96,6 +96,11 @@ config USB_STORAGE_MTP default y depends on USB =20 +config USB_U2F + bool + default y + depends on USB + config IMX_USBPHY bool default y diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 3c44a1b06954..a25109b88c91 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -50,6 +50,13 @@ if config_host.has_key('CONFIG_SMARTCARD') hw_usb_modules +=3D {'smartcard': usbsmartcard_ss} endif =20 +# U2F +softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c')) +softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: files('u= 2f-passthru.c')) +if u2f.found() + softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulate= d.c')]) +endif + # usb redirect if config_host.has_key('CONFIG_USB_REDIR') usbredir_ss =3D ss.source_set() diff --git a/meson.build b/meson.build index f0fe5f8799e0..ae90fdbfe306 100644 --- a/meson.build +++ b/meson.build @@ -360,6 +360,11 @@ if 'CONFIG_SMARTCARD' in config_host cacard =3D declare_dependency(compile_args: config_host['SMARTCARD_CFLAG= S'].split(), link_args: config_host['SMARTCARD_LIBS'].spl= it()) endif +u2f =3D dependency('u2f-emu', required: get_option('u2f'), static: enable_= static, + include_type: 'system') +if u2f.found() + u2f =3D declare_dependency(dependencies: u2f) +endif usbredir =3D not_found if 'CONFIG_USB_REDIR' in config_host usbredir =3D declare_dependency(compile_args: config_host['USB_REDIR_CFL= AGS'].split(), @@ -385,6 +390,7 @@ endif =20 config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_U2F', u2f.found()) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_PNG', png.found()) @@ -1365,6 +1371,7 @@ summary_info +=3D {'spice support': config_host.h= as_key('CONFIG_SPICE')} summary_info +=3D {'rbd support': config_host.has_key('CONFIG_RBD')} summary_info +=3D {'xfsctl support': config_host.has_key('CONFIG_XFS')} summary_info +=3D {'smartcard support': config_host.has_key('CONFIG_SMARTC= ARD')} +summary_info +=3D {'U2F support': u2f.found()} summary_info +=3D {'libusb': config_host.has_key('CONFIG_USB_LI= BUSB')} summary_info +=3D {'usb net redir': config_host.has_key('CONFIG_USB_RE= DIR')} summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} --=20 2.27.0