From: Alon Levy <alevy@redhat.com>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/7] libcacard: initial commit
Date: Tue, 15 Mar 2011 16:09:29 +0200 [thread overview]
Message-ID: <20110315140929.GA10553@playa.tlv.redhat.com> (raw)
In-Reply-To: <4D7F6C34.7030403@redhat.com>
On Tue, Mar 15, 2011 at 02:40:04PM +0100, Jes Sorensen wrote:
> On 03/15/11 14:14, Alon Levy wrote:
> > On Tue, Mar 15, 2011 at 01:42:56PM +0100, Jes Sorensen wrote:
> >> Alternatively the external apps that build against it should be taught
> >> to link with the QEMU version.
> >>
> >
> > That would require me to teach qemu's configure to build libcacard, possibly
> > only libcacard (even though qemu doesn't need a lot of packages by itself,
> > I still wouldn't want apt-get install spice-client to drag in qemu-kvm).
>
> Hi Alon,
>
> I am a little confused as to what the library really does. Is it a
> library to manage iso7816 cards, or is it an emulation library? If it is
emulation library.
> hw emulation the library really should be part of qemu.git, but there is
> nothing that prevents us to expanding the qemu Makefile to build the
> library and then have a separate RPM called qemu-libs or something that
> can be installed without the main qemu RPM being installed.
Yes, that's what I was thinking about. Of course we can do it downstream (in fedora/rhel),
but I'd rather have an upstream make target / configure option == solution..
>
> Can you elaborate a bit on how spice uses libcacard? I can understand it
> relying on a library to access/manage smartcards, but the emulation bit
> puzzles me?
>
If no emulation was required in the middle we would have just done usb
forwarding. The fact is we need the client and the guest to access the
card at the same time, potentially the client and a few guests. Because
there is no locking in the smartcard protocol, no idea of multiple
outstanding requests, this requires giving each guest it's own card state,
that is emulating a card.
libcacard emulates a CAC, that is a Common Access Card. So the second option.
The reader emulation is naturally part of the pc emulation, so qemu is the right
place.
There are two locations to do the card emulation, currently both are implemented:
* in the pc emulator: ccid-card-emualted. This links with the libcacard files (well,
the way we do linking it links with all the world, but it uses that code, those symbols).
* in the client: that's what spice uses. in the vm side we have ccid-card-passthru,
over the wire we get the APDU's (application protocol data unit for the 7186 standard,
which the CAC standard uses), and the card emulation itself is done in the client, via
linking with libcacard (the standalone one).
Obviously it would have been simpler if we decided from the start to do what anthony wanted,
that is to emulate in the host/pc. But we/I didn't, it seemed easier to emulate in the client,
and also I thought more performant. The performance part really depends on which latency
is more important, and no benchmarks have been done.
So right now contents wise (I mean, what's in this patchset) I think we are over the question
of which devices will be accepted in qemu, we are just down to the question of what color the
code should be, and I'll be sending v21 once I fix the review concerns.
> If libcacard does both card management and emulation, my next question
> is whether it wouldn't make more sense to split the two into two
> separate packages?
>
> Cheers,
> Jes
>
next prev parent reply other threads:[~2011-03-15 14:10 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 11:20 [Qemu-devel] [PATCH v20 0/7] usb-ccid Alon Levy
2011-02-23 11:20 ` [Qemu-devel] [PATCH 1/7] usb-ccid: add CCID bus Alon Levy
2011-03-14 13:54 ` Jes Sorensen
2011-03-14 14:07 ` Daniel P. Berrange
2011-03-14 14:12 ` Anthony Liguori
2011-03-16 9:15 ` Alon Levy
2011-03-16 9:26 ` Jes Sorensen
2011-02-23 11:20 ` [Qemu-devel] [PATCH 2/7] introduce libcacard/vscard_common.h Alon Levy
2011-03-14 14:01 ` Jes Sorensen
2011-03-14 14:51 ` Alon Levy
2011-03-14 14:52 ` Alon Levy
2011-03-14 15:50 ` Jes Sorensen
2011-03-14 16:31 ` Alon Levy
2011-02-23 11:20 ` [Qemu-devel] [PATCH 3/7] ccid: add passthru card device Alon Levy
2011-03-14 14:04 ` Jes Sorensen
2011-03-14 14:53 ` Alon Levy
2011-03-14 15:51 ` Jes Sorensen
2011-02-23 11:20 ` [Qemu-devel] [PATCH 4/7] libcacard: initial commit Alon Levy
2011-03-14 15:20 ` Jes Sorensen
2011-03-14 16:40 ` Alon Levy
2011-03-15 12:42 ` Jes Sorensen
2011-03-15 13:14 ` Alon Levy
2011-03-15 13:40 ` Jes Sorensen
2011-03-15 14:09 ` Alon Levy [this message]
2011-03-15 13:45 ` Anthony Liguori
2011-03-15 14:23 ` Alon Levy
2011-03-16 8:23 ` Jes Sorensen
2011-03-16 8:40 ` Alon Levy
2011-03-16 8:42 ` Jes Sorensen
2011-03-15 13:44 ` Anthony Liguori
2011-03-15 14:25 ` Alon Levy
2011-03-15 14:51 ` Jes Sorensen
2011-03-15 14:56 ` Anthony Liguori
2011-03-15 14:59 ` Jes Sorensen
2011-03-15 15:14 ` Alon Levy
2011-03-16 8:26 ` Jes Sorensen
2011-03-15 14:55 ` Anthony Liguori
2011-03-17 13:36 ` Alon Levy
2011-02-23 11:20 ` [Qemu-devel] [PATCH 5/7] ccid: add ccid-card-emulated device Alon Levy
2011-03-14 15:41 ` Jes Sorensen
2011-03-14 16:44 ` Alon Levy
2011-03-14 17:11 ` Jes Sorensen
2011-03-17 10:54 ` Alon Levy
2011-03-17 10:59 ` Alon Levy
2011-03-17 14:25 ` Jes Sorensen
2011-02-23 11:20 ` [Qemu-devel] [PATCH 6/7] ccid: add docs Alon Levy
2011-03-14 15:41 ` Jes Sorensen
2011-02-23 11:20 ` [Qemu-devel] [PATCH 7/7] ccid: configure: improve --enable-smartcard flags Alon Levy
2011-03-14 15:44 ` Jes Sorensen
2011-03-06 10:50 ` [Qemu-devel] [PATCH v20 0/7] usb-ccid Alon Levy
-- strict thread matches above, loose matches on Subject: below --
2011-02-07 16:34 [Qemu-devel] [PATCH 0/7] usb-ccid (v19) Alon Levy
2011-02-07 16:35 ` [Qemu-devel] [PATCH 4/7] libcacard: initial commit Alon Levy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110315140929.GA10553@playa.tlv.redhat.com \
--to=alevy@redhat.com \
--cc=Jes.Sorensen@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).