Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-26 Thread Eric Blake
On 09/26/2017 07:05 AM, Valluri, Amarnath wrote: >>> + >>> +#define DPRINT(fmt, ...) do { \ >>> +if (DEBUG_TPM) { \ >>> +fprintf(stderr, fmt, ## __VA_ARGS__); \ >>> +} \ >>> +} while (0); Do not include the trailing ';' directly in the macro definition. The whole point of wrapping

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-26 Thread Marc-André Lureau
Hi On Tue, Sep 26, 2017 at 3:28 PM, Valluri, Amarnath wrote: > On Tue, 2017-09-26 at 14:24 +0200, Marc-André Lureau wrote: >> > > close fds[1] ? >> > I guess we are not supposed to close the other end of the >> > socketpair/pipe, as it is not forked process. >> You will close this end, not the ot

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-26 Thread Valluri, Amarnath
On Tue, 2017-09-26 at 14:24 +0200, Marc-André Lureau wrote: > Hi > > On Tue, Sep 26, 2017 at 2:05 PM, Valluri, Amarnath > wrote: > > > > Hi Marc, > > > > Thanks for your time reviewing this patchset. Please find my inline > > comments. > > > > On Sun, 2017-09-24 at 20:52 +0200, Marc-André Lure

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-26 Thread Marc-André Lureau
Hi On Tue, Sep 26, 2017 at 2:05 PM, Valluri, Amarnath wrote: > Hi Marc, > > Thanks for your time reviewing this patchset. Please find my inline > comments. > > On Sun, 2017-09-24 at 20:52 +0200, Marc-André Lureau wrote: >> Hi >> >> Thanks for the nice update, removing the exec() code, using chard

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-26 Thread Valluri, Amarnath
Hi Marc, Thanks for your time reviewing this patchset. Please find my inline comments. On Sun, 2017-09-24 at 20:52 +0200, Marc-André Lureau wrote: > Hi > > Thanks for the nice update, removing the exec() code, using chardev > and a private socketpair. Some comments below: > > On Fri, Sep 22, 20

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-24 Thread Stefan Berger
On 09/24/2017 02:52 PM, Marc-André Lureau wrote: Hi Thanks for the nice update, removing the exec() code, using chardev and a private socketpair. Some comments below: On Fri, Sep 22, 2017 at 2:33 PM, Amarnath Valluri wrote: This change introduces a new TPM backend driver that can communicate

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-24 Thread Marc-André Lureau
Hi Thanks for the nice update, removing the exec() code, using chardev and a private socketpair. Some comments below: On Fri, Sep 22, 2017 at 2:33 PM, Amarnath Valluri wrote: > This change introduces a new TPM backend driver that can communicate with > swtpm(software TPM emulator) using unix dom

Re: [Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-22 Thread Stefan Berger
On 09/22/2017 08:33 AM, Amarnath Valluri wrote: This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to TPM emulator using socket based chardev backend device. talks to the TPM emulator using QEMU's

[Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-22 Thread Amarnath Valluri
This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to TPM emulator using socket based chardev backend device. Swtpm uses two Unix sockets for communications, one for plain TPM commands and responses,