Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-18 Thread Eric Blake
On 01/18/2011 02:14 AM, Alon Levy wrote: >> I think it is pretty easy to add one per new >> backend. The toughest part would be how to query whether a given >> backend is available in a given qemu binary, but if you can please make >> sure that 'qemu -device usb-ccid,?' lists all valid backends f

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-18 Thread Alon Levy
On Mon, Jan 17, 2011 at 01:12:28PM -0700, Eric Blake wrote: > On 01/17/2011 11:42 AM, Alon Levy wrote: > >>> dev: ccid-card-emulated, id "" > >>> dev-prop: backend = "nss-emulated" > >>> dev-prop: cert1 = > >>> dev-prop: cert2 = > >>>

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-18 Thread Alon Levy
On Mon, Jan 17, 2011 at 01:12:28PM -0700, Eric Blake wrote: > On 01/17/2011 11:42 AM, Alon Levy wrote: > >>> dev: ccid-card-emulated, id "" > >>> dev-prop: backend = "nss-emulated" > >>> dev-prop: cert1 = > >>> dev-prop: cert2 = > >>>

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-17 Thread Eric Blake
On 01/17/2011 11:42 AM, Alon Levy wrote: >>> dev: ccid-card-emulated, id "" >>> dev-prop: backend = "nss-emulated" >>> dev-prop: cert1 = >>> dev-prop: cert2 = >>> dev-prop: cert3 = >>> dev-prop: db = >

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-17 Thread Alon Levy
On Mon, Jan 17, 2011 at 11:30:38AM -0700, Eric Blake wrote: > On 01/15/2011 06:30 AM, Alon Levy wrote: > >> In other words a hierarchy > >> > >> USB bus 0 > >>| > >>+- ccid0 > >>| | > >>| +- smartcard0 (ccid slot 0) > >>| +- smartcard1 (ccid slot 3) > >>|

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-17 Thread Eric Blake
On 01/15/2011 06:30 AM, Alon Levy wrote: >> In other words a hierarchy >> >> USB bus 0 >>| >>+- ccid0 >>| | >>| +- smartcard0 (ccid slot 0) >>| +- smartcard1 (ccid slot 3) >>| >>+- ccid1 >> | >> +- smartcard2 (ccid slot 0) I'm oka

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-15 Thread Alon Levy
On Fri, Jan 14, 2011 at 07:23:17PM +, Daniel P. Berrange wrote: > On Fri, Jan 14, 2011 at 11:25:36AM -0700, Eric Blake wrote: > > On 01/14/2011 05:41 AM, Daniel P. Berrange wrote: > > > On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: > > > > > >> +virCommandAddArg(cmd,

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Daniel P. Berrange
On Fri, Jan 14, 2011 at 12:34:21PM -0700, Eric Blake wrote: > On 01/14/2011 12:23 PM, Daniel P. Berrange wrote: > > Alon's docs are showing the simplified syntax suitable for > > end users. This doesn't guarentee a stable guest visible ABI. > > Looking at the code, we need to set the 'slot' paramet

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Eric Blake
On 01/14/2011 12:23 PM, Daniel P. Berrange wrote: > Alon's docs are showing the simplified syntax suitable for > end users. This doesn't guarentee a stable guest visible ABI. > Looking at the code, we need to set the 'slot' parameter on each > ccid device we have. This means we need a new address t

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Daniel P. Berrange
On Fri, Jan 14, 2011 at 11:25:36AM -0700, Eric Blake wrote: > On 01/14/2011 05:41 AM, Daniel P. Berrange wrote: > > On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: > > > >> +virCommandAddArg(cmd, devstr); > >> +VIR_FREE(devstr); > >> + > >> +virComma

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Eric Blake
On 01/14/2011 06:46 AM, Daniel P. Berrange wrote: > On Fri, Jan 14, 2011 at 12:41:13PM +, Daniel P. Berrange wrote: >> On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: >> >>> +virCommandAddArgBuffer(cmd, &smartcard_buf); >>> +break; >>> +case VIR_DOMAI

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Eric Blake
On 01/14/2011 05:41 AM, Daniel P. Berrange wrote: > On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: >> Still to go - add .args files to match .xml files in testsuite >> >> * src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard >> options. >> (qemuAssignDeviceAliases): Assign a

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Daniel P. Berrange
On Fri, Jan 14, 2011 at 12:41:13PM +, Daniel P. Berrange wrote: > On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: > > > +virCommandAddArgBuffer(cmd, &smartcard_buf); > > +break; > > +case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH: > > +virCom

Re: [libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-14 Thread Daniel P. Berrange
On Thu, Jan 13, 2011 at 05:34:37PM -0700, Eric Blake wrote: > Still to go - add .args files to match .xml files in testsuite > > * src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard > options. > (qemuAssignDeviceAliases): Assign an alias for smartcard passthrough. > * tests/qemuxml2arg

[libvirt] [RFC PATCHv2 5/5] WIP: smartcard: turn on qemu support

2011-01-13 Thread Eric Blake
Still to go - add .args files to match .xml files in testsuite * src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard options. (qemuAssignDeviceAliases): Assign an alias for smartcard passthrough. * tests/qemuxml2argvtest.c (mymain): Three new tests. * tests/qemuxml2argvdata/...arg: Thre