From nobody Tue Feb 10 20:24:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1598442408; cv=none; d=zohomail.com; s=zohoarc; b=KKAq62Xop1VkODpgO4tVcFZ5FJV7QxdxOW+xTAdl8dbJuzW1plLqUDd7TFmBq6pms8Ec49KqlyWQKsau6fBEKsVL60Q6x7kbS45bB7wiSnoT3KzYy6Hhk4/KuCQ3lDRpFjBmaakEJSr037pAN7/ZDpW07Sf0IaE608QSYIRiab0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598442408; 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=qbdeRLh0abIEzpgbV5ZAFNwzreep4flNNTd5BB4yz50=; b=OyIRppOjHX0RWDnEBSCiXF6LGXSv02bFnfkq5SMfCkyveGhRj6iyFlRPiTMtTW9xUEtvvhsENXJ+y6Bbq8Yq5/2hvhNb+LGEnceq0xrBqNVjNRcMBrHw+9KAFjpyotAqOOBdRSAAJhxhuLvPbsqUYT2zOzm0kyCONWyn5+qZCf8= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598442408301813.30218210538; Wed, 26 Aug 2020 04:46:48 -0700 (PDT) Received: from localhost ([::1]:39906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAtt9-0003Ug-0c for importer@patchew.org; Wed, 26 Aug 2020 07:46:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAtpL-0004h8-DK for qemu-devel@nongnu.org; Wed, 26 Aug 2020 07:42:51 -0400 Received: from gate-2.cri.epita.net ([163.5.55.20]:47916 helo=mail-2.srv.cri.epita.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAtpJ-00085n-CX for qemu-devel@nongnu.org; Wed, 26 Aug 2020 07:42:51 -0400 Received: from MattGorko-Laptop.home (lfbn-idf1-1-1395-83.w90-79.abo.wanadoo.fr [90.79.87.83]) (Authenticated sender: cesar.belley) by mail-2.srv.cri.epita.fr (Postfix) with ESMTPSA id 7C56D412DC; Wed, 26 Aug 2020 13:42:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lse.epita.fr; s=cri; t=1598442167; bh=pXjOhnz/ejL0oC4wPTqjtOBcoqXZnfCQ63MGA0Z0KNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O51UEbZAfp2KOm3cEuur0IvJ05gJ8P9QdiwK96P9NM3MMbINLDF6fGXrmD+iDoYtr +XatVnQOOxcISQScBg/3bqnHgSuSXnzm8X/Y7b1rTFJYt5aGYepnlhq2QJ6xPzA5Am vaDx3ML5MQT724wNpZahrwh5sQAaAxKgODCA7zm8= From: =?UTF-8?q?C=C3=A9sar=20Belley?= To: qemu-devel@nongnu.org Subject: [PATCH v3 07/12] meson: Add U2F key to meson Date: Wed, 26 Aug 2020 13:42:04 +0200 Message-Id: <20200826114209.28821-8-cesar.belley@lse.epita.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826114209.28821-1-cesar.belley@lse.epita.fr> References: <20200826114209.28821-1-cesar.belley@lse.epita.fr> MIME-Version: 1.0 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=163.5.55.20; envelope-from=srs0=n7r+=ce=lse.epita.fr=cesar.belley@cri.epita.fr; helo=mail-2.srv.cri.epita.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 07:42:31 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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?C=C3=A9sar=20Belley?= , kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: C=C3=A9sar Belley --- configure | 8 +++++++- hw/usb/Kconfig | 5 +++++ hw/usb/meson.build | 7 +++++++ meson.build | 7 +++++++ meson_options.txt | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b1e11397a8..24137d49d6 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/hw/usb/Kconfig b/hw/usb/Kconfig index 5e63dc75f8..3fc8fbe3c7 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 3c44a1b069..a25109b88c 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 f0fe5f8799..ae90fdbfe3 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= ')} diff --git a/meson_options.txt b/meson_options.txt index c55f9cd94c..aef2de6523 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') --=20 2.28.0