[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms bac
From: |
Xu, Quan |
Subject: |
Re: [Qemu-devel] [PATCH v6 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen. |
Date: |
Tue, 5 May 2015 02:34:33 +0000 |
> -----Original Message-----
> From: Stefan Berger [mailto:address@hidden
> Sent: Monday, May 04, 2015 11:30 PM
> To: Xu, Quan; address@hidden; address@hidden
> Cc: address@hidden; address@hidden; address@hidden;
> address@hidden
> Subject: Re: [PATCH v6 5/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms
> backen.
>
> On 05/04/2015 03:23 AM, Quan Xu wrote:
> > This Patch provides the glue for the TPM_TIS(Qemu frontend) to Xen
> > stubdom vTPM domain that provides the actual TPM functionality. It
> > sends data and TPM commends with xen_vtpm_frontend. It is similar as
> > another two vTPM backens:
> > *vTPM passthrough backen Since QEMU 1.5.
> > *vTPM libtpms-based backen.
> >
> > Some details:
> > This part of the patch provides support for the spawning of a thread
> > that will interact with stubdom vTPM domain by the xen_vtpm_frontend.
> > It expects a signal from the frontend to wake and pick up the TPM
> > command that is supposed to be processed and delivers the response
> > packet using a callback function provided by the frontend.
> >
> > The backend connects itself to the frontend by filling out an
> > interface structure with pointers to the function implementing support
> > for various operations.
> >
> > (QEMU) vTPM XenStubdoms backen is initialized by Qemu command line
> options,
> > "-tpmdev xenstubdoms,id=xenvtpm0 -device
> tpm-tis,tpmdev=xenvtpm0"
> >
> > Signed-off-by: Quan Xu <address@hidden>
>
> Reviewed-by: Stefan Berger <address@hidden>
>
Stefan, thanks again for your help and review. I will add the below code in
next version.
thanks
Quan
> +
> +#ifdef DEBUG_TPM
> +#define DPRINTF(fmt, ...) \
> + do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else
> +#define DPRINTF(fmt, ...) \
> + do { } while (0)
> +#endif
>
>
> In case some other parts needs revision, please use the following instead:
>
> #define DEBUG_TPM 0
>
> #define DPRINTF(fmt, ...) do { \
> if (DEBUG_TPM) { \
> fprintf(stderr, fmt, ## __VA_ARGS__); \
> } \
> } while (0);
>
>
> Stefan