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-19 Thread Ashley Lai
@@ -208,11 +229,43 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) struct tcpa_event *event = v; char *data = v; int i; - - for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) + u32 x; + char tmp[4]; + +

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

2015-05-19 Thread Ashley Lai
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 and reuse them when needed? Could

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

2015-05-19 Thread Ashley Lai
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 and reuse them when needed? Could

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

2015-05-19 Thread Ashley Lai
@@ -208,11 +229,43 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) struct tcpa_event *event = v; char *data = v; int i; - - for (i = 0; i sizeof(struct tcpa_event) + event-event_size; i++) + u32 x; + char tmp[4]; + +

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

2015-05-11 Thread Joy M. Latten
Hi Ashley, On Fri, 2015-05-08 at 17:31 -0500, Ashley Lai wrote: > > 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

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

2015-05-11 Thread Joy M. Latten
Hi Ashley, On Fri, 2015-05-08 at 17:31 -0500, Ashley Lai wrote: 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

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 Ashley Lai
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 convert in the

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

2015-05-08 Thread Ashley Lai
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 convert in the

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 3/3] vTPM: support little endian guests

2015-05-05 Thread Hon Ching(Vicky) Lo
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. We defined a macro to convert to guest format. In addition, tpm_binary_bios_measurements_show() is modified to parse

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

2015-05-05 Thread Hon Ching(Vicky) Lo
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. We defined a macro to convert to guest format. In addition, tpm_binary_bios_measurements_show() is modified to parse