[PATCH v2] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
t;tpm: Remove useless priv field in struct tpm_vendor_specific") Cc: <sta...@vger.kernel.org> Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_ibmvtpm.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/ch

[PATCH v2] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
t;tpm: Remove useless priv field in struct tpm_vendor_specific") Cc: Signed-off-by: Hon Ching(Vicky) Lo --- drivers/char/tpm/tpm_ibmvtpm.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c ind

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 13:52 -0700, Jason Gunthorpe wrote: > On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > >

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 13:52 -0700, Jason Gunthorpe wrote: > On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > >

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > Also, how does locking work here? Does the vio core prevent > > &g

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > Also, how does locking work here? Does the vio core prevent > > &g

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-07 Thread Hon Ching(Vicky) Lo
On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > > The current code passes the address of tpm_chip as the argument to > > dev_get_drvdata() without prior NULL check in > > tpm_ibmvtpm_get_desire

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-07 Thread Hon Ching(Vicky) Lo
On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > > The current code passes the address of tpm_chip as the argument to > > dev_get_drvdata() without prior NULL check in > > tpm_ibmvtpm_get_desire

[PATCH] vTPM: Fix missing NULL check

2017-03-06 Thread Hon Ching(Vicky) Lo
t;tpm: Remove useless priv field in struct tpm_vendor_specific") Cc: <sta...@vger.kernel.org> Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_ibmvtpm.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/ch

[PATCH] vTPM: Fix missing NULL check

2017-03-06 Thread Hon Ching(Vicky) Lo
t;tpm: Remove useless priv field in struct tpm_vendor_specific") Cc: Signed-off-by: Hon Ching(Vicky) Lo --- drivers/char/tpm/tpm_ibmvtpm.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c index 1b9d61

[PATCH v3] vTPM: fix missing error handling for suspend operation

2016-04-04 Thread Hon Ching(Vicky) Lo
H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_ibmvtpm.c | 43 --- drivers/char/tpm/tpm_ibmvtpm.h |7 ++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvt

[PATCH v3] vTPM: fix missing error handling for suspend operation

2016-04-04 Thread Hon Ching(Vicky) Lo
H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo --- drivers/char/tpm/tpm_ibmvtpm.c | 43 --- drivers/char/tpm/tpm_ibmvtpm.h |7 ++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c

[PATCH v2] vTPM: fix missing error handling for suspend operation

2016-03-31 Thread Hon Ching(Vicky) Lo
ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more granular level than what the existing code does. This patch adds the missing CRQ transport event code checks to ensure appropriate action taken, in the case that ibmvtpm_send_crq returns H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo

[PATCH v2] vTPM: fix missing error handling for suspend operation

2016-03-31 Thread Hon Ching(Vicky) Lo
ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more granular level than what the existing code does. This patch adds the missing CRQ transport event code checks to ensure appropriate action taken, in the case that ibmvtpm_send_crq returns H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo

Re: [PATCH] vTPM: fix missing error handling for suspend operation

2016-03-08 Thread Hon Ching(Vicky) Lo
> > > + } else if (crq.msg == (u8) PARTNER_PARTITION_FAILED) { > > > + dev_err(ibmvtpm->dev, > > > + "vtpm has terminated fatally; reboot to > > > reinstate a trusted state.\n"); > > > + } else if (crq.msg == (u8)

Re: [PATCH] vTPM: fix missing error handling for suspend operation

2016-03-08 Thread Hon Ching(Vicky) Lo
> > > + } else if (crq.msg == (u8) PARTNER_PARTITION_FAILED) { > > > + dev_err(ibmvtpm->dev, > > > + "vtpm has terminated fatally; reboot to > > > reinstate a trusted state.\n"); > > > + } else if (crq.msg == (u8)

Re: [PATCH] vTPM: fix missing error handling for suspend operation

2016-03-08 Thread Hon Ching(Vicky) Lo
On Fri, 2016-03-04 at 18:55 +0200, Jarkko Sakkinen wrote: > On Wed, Mar 02, 2016 at 01:23:47AM -0500, Hon Ching(Vicky) Lo wrote: > > ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more > > granular level than what the existing code does. This patch adds > > the

Re: [PATCH] vTPM: fix missing error handling for suspend operation

2016-03-08 Thread Hon Ching(Vicky) Lo
On Fri, 2016-03-04 at 18:55 +0200, Jarkko Sakkinen wrote: > On Wed, Mar 02, 2016 at 01:23:47AM -0500, Hon Ching(Vicky) Lo wrote: > > ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more > > granular level than what the existing code does. This patch adds > > the

[PATCH] vTPM: fix missing error handling for suspend operation

2016-03-01 Thread Hon Ching(Vicky) Lo
ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more granular level than what the existing code does. This patch adds the missing CRQ transport event code checks to ensure appropriate action taken, in the case that ibmvtpm_send_crq returns H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo

[PATCH] vTPM: fix missing error handling for suspend operation

2016-03-01 Thread Hon Ching(Vicky) Lo
ibmvtpm_send_crq in tpm_ibmvtpm_suspend returns errors in a more granular level than what the existing code does. This patch adds the missing CRQ transport event code checks to ensure appropriate action taken, in the case that ibmvtpm_send_crq returns H_CLOSED. Signed-off-by: Hon Ching(Vicky) Lo

Re: [PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-13 Thread Hon Ching(Vicky) Lo
On Tue, 2015-10-13 at 13:43 -0500, Ashley Lai wrote: > > On 10/07/2015 07:11 PM, Hon Ching(Vicky) Lo wrote: > > The event log generated by OpenFirmware in PowerPC is 4-byte aligned. > > This patch reformats the log to be byte-aligned for the Linux client. > > > >

Re: [PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-13 Thread Hon Ching(Vicky) Lo
On Tue, 2015-10-13 at 13:43 -0500, Ashley Lai wrote: > > On 10/07/2015 07:11 PM, Hon Ching(Vicky) Lo wrote: > > The event log generated by OpenFirmware in PowerPC is 4-byte aligned. > > This patch reformats the log to be byte-aligned for the Linux client. > > > >

[PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-07 Thread Hon Ching(Vicky) Lo
The event log generated by OpenFirmware in PowerPC is 4-byte aligned. This patch reformats the log to be byte-aligned for the Linux client. Signed-off-by: Hon Ching(Vicky) Lo --- arch/powerpc/kernel/prom_init.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git

[PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree

2015-10-07 Thread Hon Ching(Vicky) Lo
Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm', as only the latter is ganranteed to be available for the client OS. The '/ibm,vtpm' node should only be used by Open Firmware, which is susceptible to changes. Signed-off-by: Hon Ching(Vicky) Lo --- arch/powerpc/kernel/prom_init.c

[PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log

2015-10-07 Thread Hon Ching(Vicky) Lo
The OS should ask Power Firmware (PFW) for the size of the buffer allocated for the event log, instead of the size of the actual event log. It then passes the buffer adddress and size to PFW in the handover process, into which PFW copies the log. Signed-off-by: Hon Ching(Vicky) Lo --- arch

[PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot

2015-10-07 Thread Hon Ching(Vicky) Lo
. This patch uses 'GFP_ATOMIC' instead so that the allocation is high-priority and does not sleep. Signed-off-by: Hon Ching(Vicky) Lo --- drivers/char/tpm/tpm_ibmvtpm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c

[PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree

2015-10-07 Thread Hon Ching(Vicky) Lo
Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm', as only the latter is ganranteed to be available for the client OS. The '/ibm,vtpm' node should only be used by Open Firmware, which is susceptible to changes. Signed-off-by: Hon Ching(Vicky) Lo --- arch/powerpc/kernel/prom_init.c

[PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log

2015-10-07 Thread Hon Ching(Vicky) Lo
The OS should ask Power Firmware (PFW) for the size of the buffer allocated for the event log, instead of the size of the actual event log. It then passes the buffer adddress and size to PFW in the handover process, into which PFW copies the log. Signed-off-by: Hon Ching(Vicky) Lo --- arch

[PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot

2015-10-07 Thread Hon Ching(Vicky) Lo
. This patch uses 'GFP_ATOMIC' instead so that the allocation is high-priority and does not sleep. Signed-off-by: Hon Ching(Vicky) Lo --- drivers/char/tpm/tpm_ibmvtpm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c

[PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-07 Thread Hon Ching(Vicky) Lo
The event log generated by OpenFirmware in PowerPC is 4-byte aligned. This patch reformats the log to be byte-aligned for the Linux client. Signed-off-by: Hon Ching(Vicky) Lo --- arch/powerpc/kernel/prom_init.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git

[PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log

2015-10-07 Thread Hon Ching(Vicky) Lo
The OS should ask Power Firmware (PFW) for the size of the buffer allocated for the event log, instead of the size of the actual event log. It then passes the buffer adddress and size to PFW in the handover process, into which PFW copies the log. Signed-off-by: Hon Ching(Vicky) Lo <

[PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree

2015-10-07 Thread Hon Ching(Vicky) Lo
Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm', as only the latter is ganranteed to be available for the client OS. The '/ibm,vtpm' node should only be used by Open Firmware, which is susceptible to changes. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> ---

[PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot

2015-10-07 Thread Hon Ching(Vicky) Lo
. This patch uses 'GFP_ATOMIC' instead so that the allocation is high-priority and does not sleep. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_ibmvtpm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvt

[PATCH v2 3/3] vTPM: get the buffer allocated for event log instead of the actual log

2015-10-07 Thread Hon Ching(Vicky) Lo
The OS should ask Power Firmware (PFW) for the size of the buffer allocated for the event log, instead of the size of the actual event log. It then passes the buffer adddress and size to PFW in the handover process, into which PFW copies the log. Signed-off-by: Hon Ching(Vicky) Lo <

[PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-07 Thread Hon Ching(Vicky) Lo
The event log generated by OpenFirmware in PowerPC is 4-byte aligned. This patch reformats the log to be byte-aligned for the Linux client. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- arch/powerpc/kernel/prom_init.c | 13 - 1 files changed, 12 inse

[PATCH v2 1/3] vTPM: fix searching for the right vTPM node in device tree

2015-10-07 Thread Hon Ching(Vicky) Lo
Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm', as only the latter is ganranteed to be available for the client OS. The '/ibm,vtpm' node should only be used by Open Firmware, which is susceptible to changes. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> ---

[PATCH] vTPM: fix memory allocation flag for rtce buffer at kernel boot

2015-10-07 Thread Hon Ching(Vicky) Lo
. This patch uses 'GFP_ATOMIC' instead so that the allocation is high-priority and does not sleep. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_ibmvtpm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/tpm/tpm_ibmvt

[PATCH v2 2/3] vTPM: reformat event log to be byte-aligned

2015-10-07 Thread Hon Ching(Vicky) Lo
The event log generated by OpenFirmware in PowerPC is 4-byte aligned. This patch reformats the log to be byte-aligned for the Linux client. Signed-off-by: Hon Ching(Vicky) Lo <hon...@linux.vnet.ibm.com> --- arch/powerpc/kernel/prom_init.c | 13 - 1 files changed, 12 inse

[Fwd: Re: [PATCH v4 1/2] vTPM: support little endian guests]

2015-08-24 Thread Hon Ching(Vicky) Lo
Hi Peter, Did you the explanations in the following reply make sense to you? If you needed more clarifications, please advice. Thanks! Forwarded Message From: Hon Ching(Vicky) Lo To: Peter Hüwe Cc: tpmdd-de...@lists.sourceforge.net, Ashley Lai , Vicky Lo , linux-kernel

[Fwd: Re: [PATCH v4 1/2] vTPM: support little endian guests]

2015-08-24 Thread Hon Ching(Vicky) Lo
Hi Peter, Did you the explanations in the following reply make sense to you? If you needed more clarifications, please advice. Thanks! Forwarded Message From: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com To: Peter Hüwe peterhu...@gmx.de Cc: tpmdd-de

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-07-17 Thread Hon Ching(Vicky) Lo
On Thu, 2015-07-16 at 20:43 +0200, Peter Hüwe wrote: > Hi Vicky, > Am Donnerstag, 16. Juli 2015, 19:54:15 schrieb Hon Ching(Vicky) Lo: > > Hi Peter, > > > > On Mon, 2015-07-13 at 23:08 +0200, Peter Hüwe wrote: > > > Hi Vicky, > > > > > > sorry

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-07-17 Thread Hon Ching(Vicky) Lo
On Thu, 2015-07-16 at 20:43 +0200, Peter Hüwe wrote: Hi Vicky, Am Donnerstag, 16. Juli 2015, 19:54:15 schrieb Hon Ching(Vicky) Lo: Hi Peter, On Mon, 2015-07-13 at 23:08 +0200, Peter Hüwe wrote: Hi Vicky, sorry for the late reply This patch makes the code endianness

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-07-16 Thread Hon Ching(Vicky) Lo
> > in the event entries so that they will be displayed properly. > > tpm_binary_bios_measurements_show() is modified for the display. > > > > Signed-off-by: Hon Ching(Vicky) Lo > > Signed-off-by: Joy Latten > > > b/drivers/char/tpm/tpm_eventlog.h index e7da086..267bfbd 100644 &g

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-07-16 Thread Hon Ching(Vicky) Lo
properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com b/drivers/char/tpm/tpm_eventlog.h index e7da086..267bfbd 100644 --- a/drivers/char/tpm/tpm_eventlog.h

Re: [PATCH v4 2/2] TPM: remove unnecessary little endian conversion

2015-06-29 Thread Hon Ching(Vicky) Lo
Hi Peter, Please also commit this patch, if you accept it as well. Thanks, Vicky Forwarded Message From: Ashley Lai To: Hon Ching(Vicky) Lo Cc: tpmdd-de...@lists.sourceforge.net, Peter Huewe , Ashley Lai , Vicky Lo , linux-kernel@vger.kernel.org, Joy Latten >Subject:

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-06-29 Thread Hon Ching(Vicky) Lo
Hi Peter, Can you please commit the patch in the next open window, if you accept it as well? Thanks! Regards, Vicky Forwarded Message From: Ashley Lai To: Hon Ching(Vicky) Lo Cc: tpmdd-de...@lists.sourceforge.net, Peter Huewe , Ashley Lai , Vicky Lo , linux-kernel

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-06-29 Thread Hon Ching(Vicky) Lo
8:17 -0400, Hon Ching(Vicky) Lo wrote: > This patch makes the code endianness independent. We defined a > macro do_endian_conversion to apply endianness to raw integers > in the event entries so that they will be displayed properly. > tpm_binary_bios_measurements_show() is modified for the

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-06-29 Thread Hon Ching(Vicky) Lo
, Hon Ching(Vicky) Lo wrote: This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off

Re: [PATCH v4 1/2] vTPM: support little endian guests

2015-06-29 Thread Hon Ching(Vicky) Lo
Hi Peter, Can you please commit the patch in the next open window, if you accept it as well? Thanks! Regards, Vicky Forwarded Message From: Ashley Lai ash...@ashleylai.com To: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Cc: tpmdd-de...@lists.sourceforge.net, Peter Huewe

Re: [PATCH v4 2/2] TPM: remove unnecessary little endian conversion

2015-06-29 Thread Hon Ching(Vicky) Lo
Hi Peter, Please also commit this patch, if you accept it as well. Thanks, Vicky Forwarded Message From: Ashley Lai ash...@ashleylai.com To: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Cc: tpmdd-de...@lists.sourceforge.net, Peter Huewe peterhu...@gmx.de, Ashley Lai ash

[PATCH v4 1/2] vTPM: support little endian guests

2015-06-17 Thread Hon Ching(Vicky) Lo
This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo Signed

[PATCH v4 2/2] TPM: remove unnecessary little endian conversion

2015-06-17 Thread Hon Ching(Vicky) Lo
that it is correctly implemented. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- drivers/char/tpm/tpm_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c index c002d1b..62a22ce 100644 --- a/drivers/char/tpm

Re: [PATCH v2 1/2] vTPM: support little endian guests

2015-06-17 Thread Hon Ching (Vicky) Lo
ise it looks good. > > On Tue, 9 Jun 2015, Hon Ching(Vicky) Lo wrote: > > case NONHOST_INFO: > > - name = tcpa_event_type_strings[event->event_type]; > > + name = > > + tcpa_event_type_strings[do_endian_conversion > > +

[PATCH v4 2/2] TPM: remove unnecessary little endian conversion

2015-06-17 Thread Hon Ching(Vicky) Lo
that it is correctly implemented. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com --- drivers/char/tpm/tpm_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c

[PATCH v4 1/2] vTPM: support little endian guests

2015-06-17 Thread Hon Ching(Vicky) Lo
This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo hon

Re: [PATCH v2 1/2] vTPM: support little endian guests

2015-06-17 Thread Hon Ching (Vicky) Lo
it looks good. On Tue, 9 Jun 2015, Hon Ching(Vicky) Lo wrote: case NONHOST_INFO: - name = tcpa_event_type_strings[event-event_type]; + name = + tcpa_event_type_strings[do_endian_conversion + (event-event_type

Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq

2015-06-16 Thread Hon Ching (Vicky) Lo
Hi Peter, Yes, it's a fix to a kernel dump caused by enabling both vtpm and kdump. On Tue, 2015-06-16 at 22:37 +0200, Peter Hüwe wrote: > Hey, > > Am Freitag, 22. Mai 2015, 19:23:02 schrieb Hon Ching(Vicky) Lo: > > tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without hav

Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq

2015-06-16 Thread Hon Ching (Vicky) Lo
Hi Peter, Yes, it's a fix to a kernel dump caused by enabling both vtpm and kdump. On Tue, 2015-06-16 at 22:37 +0200, Peter Hüwe wrote: Hey, Am Freitag, 22. Mai 2015, 19:23:02 schrieb Hon Ching(Vicky) Lo: tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet set

[PATCH v2 2/2] TPM: remove unnecessary little endian conversion

2015-06-09 Thread Hon Ching(Vicky) Lo
that it is correctly implemented. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- drivers/char/tpm/tpm_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c index c002d1b..62a22ce 100644 --- a/drivers/char/tpm

[PATCH v2 1/2] vTPM: support little endian guests

2015-06-09 Thread Hon Ching(Vicky) Lo
This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo Signed

[PATCH v2 1/2] vTPM: support little endian guests

2015-06-09 Thread Hon Ching(Vicky) Lo
This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo hon

[PATCH v2 2/2] TPM: remove unnecessary little endian conversion

2015-06-09 Thread Hon Ching(Vicky) Lo
that it is correctly implemented. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com --- drivers/char/tpm/tpm_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c

[Fwd: Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq]

2015-06-04 Thread Hon Ching (Vicky) Lo
Hi Peter, Would it be possible for you to review and commit the following patch at your earliest convenience? Thanks in advance! Forwarded Message From: Ashley Lai To: Hon Ching(Vicky) Lo Cc: tpmdd-de...@lists.sourceforge.net, Peter Huewe , Ashley Lai , Vicky Lo , linux

[Fwd: Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq]

2015-06-04 Thread Hon Ching (Vicky) Lo
Hi Peter, Would it be possible for you to review and commit the following patch at your earliest convenience? Thanks in advance! Forwarded Message From: Ashley Lai ash...@ashleylai.com To: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Cc: tpmdd-de...@lists.sourceforge.net

[PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq

2015-05-22 Thread Hon Ching(Vicky) Lo
tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet set the virtual device in the ibmvtpm structure. So in ibmvtpm_reset_crq, the phype call contains empty unit addresses, ibmvtpm->vdev->unit_address. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- d

[PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq

2015-05-22 Thread Hon Ching(Vicky) Lo
tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet set the virtual device in the ibmvtpm structure. So in ibmvtpm_reset_crq, the phype call contains empty unit addresses, ibmvtpm-vdev-unit_address. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off

Re: [PATCH 3/3] vTPM: support little endian guests

2015-05-20 Thread Hon Ching (Vicky) Lo
On Tue, 2015-05-19 at 16:08 -0500, Ashley Lai wrote: > Thank you Vicky and Joy for the clarification. This patch mainly > converts the fields in the tcpa_event structure. I see the code converts > everytime it accesses the event fields. Would it be more efficient if you > do the conversion

Re: [PATCH 3/3] vTPM: support little endian guests

2015-05-20 Thread Hon Ching (Vicky) Lo
On Tue, 2015-05-19 at 16:08 -0500, Ashley Lai wrote: Thank you Vicky and Joy for the clarification. This patch mainly converts the fields in the tcpa_event structure. I see the code converts everytime it accesses the event fields. Would it be more efficient if you do the conversion once

Re: [PATCH 3/3] vTPM: support little endian guests

2015-05-08 Thread Hon Ching (Vicky) Lo
Thanks Ashley! > > The event log in ppc64 arch is always in big endian format. PowerPC > > supports both little endian and big endian guests. This patch converts > > the event log entries to guest format. > > I'm a little confused here. If this patch is to convert the event log > entries why

Re: [PATCH 3/3] vTPM: support little endian guests

2015-05-08 Thread Hon Ching (Vicky) Lo
Thanks Ashley! The event log in ppc64 arch is always in big endian format. PowerPC supports both little endian and big endian guests. This patch converts the event log entries to guest format. I'm a little confused here. If this patch is to convert the event log entries why are we

[PATCH 2/3] TPM: remove unnecessary little endian conversion

2015-05-05 Thread Hon Ching(Vicky) Lo
prom_instantiate_sml() already converted the base pointer to little endian. This patch removes this unnecessary additional conversion. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- drivers/char/tpm/tpm_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 1/3] vTPM: fixed the limit checking

2015-05-05 Thread Hon Ching(Vicky) Lo
Do not skip the last entry of the event log. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten Changelog: - remove redundant code --- drivers/char/tpm/tpm_eventlog.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm_eventlog.c b

[PATCH 0/3] additional little endian support

2015-05-05 Thread Hon Ching(Vicky) Lo
Hi, The patch set converts big endian event log entries to guest format in PowerPC, which supports both little endian and big endian guests. It also contains a fix to make sure the last event entry wasn't skipped. Hon Ching(Vicky) Lo (3): vTPM: fixed the limit checking TPM: remove

[PATCH 3/3] vTPM: support little endian guests

2015-05-05 Thread Hon Ching(Vicky) Lo
the event and print each field individually. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- drivers/char/tpm/tpm_eventlog.c | 92 +++ 1 files changed, 73 insertions(+), 19 deletions(-) diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers

[PATCH 1/3] vTPM: fixed the limit checking

2015-05-05 Thread Hon Ching(Vicky) Lo
Do not skip the last entry of the event log. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com Changelog: - remove redundant code --- drivers/char/tpm/tpm_eventlog.c |5 + 1 files changed, 1 insertions(+), 4 deletions

[PATCH 0/3] additional little endian support

2015-05-05 Thread Hon Ching(Vicky) Lo
Hi, The patch set converts big endian event log entries to guest format in PowerPC, which supports both little endian and big endian guests. It also contains a fix to make sure the last event entry wasn't skipped. Hon Ching(Vicky) Lo (3): vTPM: fixed the limit checking TPM: remove

[PATCH 2/3] TPM: remove unnecessary little endian conversion

2015-05-05 Thread Hon Ching(Vicky) Lo
prom_instantiate_sml() already converted the base pointer to little endian. This patch removes this unnecessary additional conversion. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com --- drivers/char/tpm/tpm_of.c |4 ++-- 1

[PATCH 3/3] vTPM: support little endian guests

2015-05-05 Thread Hon Ching(Vicky) Lo
the event and print each field individually. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com --- drivers/char/tpm/tpm_eventlog.c | 92 +++ 1 files changed, 73 insertions(+), 19 deletions(-) diff

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-03 Thread Hon Ching (Vicky) Lo
Hi Anton, vio_bus_probe now calls vio_cmo_bus_probe before calling probe. This results in calling get_desired_dma to get rtce buf size before we have called probe which initializes vtpm driver and sets up the tpm data, i.e. rtce buf size. ibmvtpm_get_data returns NULL in get_desired_dma is a

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-03 Thread Hon Ching (Vicky) Lo
Hi Anton, vio_bus_probe now calls vio_cmo_bus_probe before calling probe. This results in calling get_desired_dma to get rtce buf size before we have called probe which initializes vtpm driver and sets up the tpm data, i.e. rtce buf size. ibmvtpm_get_data returns NULL in get_desired_dma is a