OSDN Git Service

hw/usb: Add U2F key passthru mode
authorCésar Belley <cesar.belley@lse.epita.fr>
Wed, 26 Aug 2020 11:42:02 +0000 (13:42 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 31 Aug 2020 06:10:47 +0000 (08:10 +0200)
commit299976b050bfad5005df81380dfeb2df39bf580c
tree1e740b16af0c47e36845665598b613904cbf4e63
parentbb014a810b565dfe14ad3e85175b9ec299105058
hw/usb: Add U2F key passthru mode

This patch adds the U2F key pass-through mode.

The pass-through mode consists of passing all requests made from the
guest to the physical security key connected to the host machine and
vice versa.

In addition, the dedicated pass-through allows to have a U2F security key
shared on several guests which is not possible with a simple host device
assignment pass-through.

The pass-through mode is associated with a device inheriting from
u2f-key base.

To work, it needs the path to a U2F hidraw, obtained from the Qemu
command line, and passed by the user:

    qemu -usb -device u2f-passthru,hidraw=/dev/hidrawX

Autoscan and U2F compatibility checking features are given at the end
of the patch series.

Signed-off-by: César Belley <cesar.belley@lse.epita.fr>
Message-id: 20200826114209.28821-6-cesar.belley@lse.epita.fr
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/u2f-passthru.c [new file with mode: 0644]