Re: [PATCH] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-19 Thread Jiandi An
On 12/19/16 12:49, Stefano Stabellini wrote: > On Mon, 19 Dec 2016, Juergen Gross wrote: >> On 19/12/16 03:56, Jiandi An wrote: >>> Ensure all reserved fields of xatp are zero before making hypervisor >>> call to XEN in xen_map_device_mmio(). xenmem_add_to_phy

Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()

2016-12-19 Thread Jiandi An
On 12/19/16 07:56, Jarkko Sakkinen wrote: > On Sun, Dec 18, 2016 at 10:20:53PM -0600, Jiandi An wrote: >> crb_check_resource() in TPM CRB driver calls >> acpi_dev_resource_memory() which only handles 32-bit resources. >> Adding a call to acpi_dev_resource_address_space() in TP

[PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()

2016-12-18 Thread Jiandi An
crb_check_resource() in TPM CRB driver calls acpi_dev_resource_memory() which only handles 32-bit resources. Adding a call to acpi_dev_resource_address_space() in TPM CRB driver which handles 64-bit resources. Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- drivers/char/tpm/tpm_crb

[PATCH] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-18 Thread Jiandi An
Ensure all reserved fields of xatp are zero before making hypervisor call to XEN in xen_map_device_mmio(). xenmem_add_to_physmap_one() in XEN fails the mapping request if extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio request. Signed-off-by: Jiandi An <an

[PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-27 Thread Jiandi An
Ensure all reserved fields of xatp are zero before making hypervisor call to XEN in xen_map_device_mmio(). xenmem_add_to_physmap_one() in XEN fails the mapping request if extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio request. Signed-off-by: Jiandi An <an

Re: [PATCH v2] ACPI : Update platform device numa node based on _PXM method

2017-04-14 Thread Jiandi An
device drivers should be able to use the NUMA aware memory allocation functions kmalloc_node() and alloc_pages_node() to improve the performance. Signed-off-by: Shanker Donthineni <shank...@codeaurora.org> Tested-by: Jiandi An <anjia...@codeaurora.org> --- Changes since v1: Edited

[PATCH v2] tpm/tpm_crb: Access locality for only CRB_START method

2017-08-12 Thread Jiandi An
B_CTRL_REQ. Change the if condition to be only for CRB_FL_CRB_START in crb_go_idle() and crb_cmd_ready(). Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- v2 Changed if condition to CRB_FL_CRB_START for go idle and crb_cmd_ready per maintainer's comment. drivers/char/tp

[PATCH] tpm/tpm_crb: Access locality for only CRB_START method

2017-08-06 Thread Jiandi An
B_CTRL_REQ. Change the if condition to be only for CRB_FL_CRB_START in crb_go_idle() and crb_cmd_ready(). Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- drivers/char/tpm/tpm_crb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/char/tpm/tpm_crb.

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-20 Thread Jiandi An
On 08/19/2017 12:05 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout")

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jiandi An
On 08/22/2017 12:39 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout")

[PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-17 Thread Jiandi An
black list. Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- drivers/char/tpm/tpm_crb.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index 8f0a98d..cbfdbdde 100644 --- a/

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-24 Thread Jiandi An
On 08/24/2017 07:26 AM, Jarkko Sakkinen wrote: On Tue, Aug 22, 2017 at 04:28:54PM -0500, Jiandi An wrote: > > { - if ((priv->flags & CRB_FL_ACPI_START) || - (priv->flags & CRB_FL_CRB_SMC_START)) - return 0; - - iowrite32(CRB_CTRL_

[PATCH] tpm/tpm_crb: Use start method value from ACPI table directly

2017-08-25 Thread Jiandi An
o maintain and undrestand. It is better to make code deal with start method value from ACPI table directly. Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- drivers/char/tpm/tpm_crb.c | 59 +++--- 1 file changed, 29 insertions(+), 30 deletions(-) diff

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jiandi An
is introduced. Yes please Jason Okay, I'll work on moving sm to priv and getting rid of flags from priv. Will submit a new patch with appropriate patch name and not a v2 of this patch since the scope of changes have changed. Thanks for your comments and feedback. -- Jiandi An Qualcomm Datacenter

Re: [PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-07 Thread Jiandi An
, 2018 at 11:26:26PM -0600, Jiandi An wrote: TPM_CRB driver is the TPM support for ARM64.  If it is built as module, TPM chip is registered after IMA init.  tpm_pcr_read() in IMA driver would fail and display the following message even though eventually there is TPM chip on the system: ima: No TPM

Re: [PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-07 Thread Jiandi An
On 03/07/2018 07:34 AM, Corey Minyard wrote: On 03/06/2018 11:49 PM, Jiandi An wrote: IPMI SSIF driver's parameter tryacpi and trydmi both are set to true.  The addition of IPMI DMI driver to create platform device for each IPMI device causes SSIF probe to be done twice on the same SMB I2C

[PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-06 Thread Jiandi An
from SPMI ACPI table and probe successfully. Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- drivers/char/ipmi/ipmi_ssif.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_

[PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-06 Thread Jiandi An
) Fix IMA Kconfig to select TPM_CRB so TPM_CRB driver is built in kernel and initializes before IMA driver. Signed-off-by: Jiandi An <anjia...@codeaurora.org> --- security/integrity/ima/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/security/integrity/ima/Kconfig b/security/int

Re: [PATCH] ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver

2018-03-09 Thread Jiandi An
e some confusion during the probing process. Signed-off-by: Corey Minyard <cminy...@mvista.com> Cc: Jiandi An <anjia...@codeaurora.org> --- Jiandi, this just yanks out the SPMI code. Your platform should have an ACPI control method in it's namespace specifying the IPMI interface. If

Re: [PATCH] ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver

2018-03-11 Thread Jiandi An
On 03/09/2018 08:42 PM, Corey Minyard wrote: On 03/09/2018 04:28 PM, Jiandi An wrote: On 03/08/2018 03:08 PM, miny...@acm.org wrote: From: Corey Minyard <cminy...@mvista.com> The IPMI spec states:    The purpose of the SPMI Table is to provide a mechanism that can    be used by th

Re: [PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-08 Thread Jiandi An
On 03/08/2018 08:10 AM, Corey Minyard wrote: On 03/07/2018 05:59 PM, Jiandi An wrote: On 03/07/2018 07:34 AM, Corey Minyard wrote: On 03/06/2018 11:49 PM, Jiandi An wrote: IPMI SSIF driver's parameter tryacpi and trydmi both are set to true.  The addition of IPMI DMI driver to create

Re: [PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-08 Thread Jiandi An
:51 -0700, Jason Gunthorpe wrote: On Tue, Mar 06, 2018 at 11:26:26PM -0600, Jiandi An wrote: TPM_CRB driver is the TPM support for ARM64.  If it is built as module, TPM chip is registered after IMA init.  tpm_pcr_read() in IMA driver would fail and display the following message even though

Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-09-27 Thread Jiandi An
On 08/24/2018 02:21 AM, Christian König wrote: > Am 24.08.2018 um 01:05 schrieb Jiandi An: >> >> >> On 08/23/2018 01:47 AM, Christian König wrote: >>> Am 22.08.2018 um 22:57 schrieb Jiandi An: >>>> >>>> On 08/22/2018 02:09 PM, Christian Kö

Re: [PATCH] ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver

2018-03-11 Thread Jiandi An
On 03/09/2018 08:42 PM, Corey Minyard wrote: On 03/09/2018 04:28 PM, Jiandi An wrote: On 03/08/2018 03:08 PM, miny...@acm.org wrote: From: Corey Minyard The IPMI spec states:    The purpose of the SPMI Table is to provide a mechanism that can    be used by the OSPM (an ACPI term for “OS

Re: [PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-08 Thread Jiandi An
On 03/08/2018 08:10 AM, Corey Minyard wrote: On 03/07/2018 05:59 PM, Jiandi An wrote: On 03/07/2018 07:34 AM, Corey Minyard wrote: On 03/06/2018 11:49 PM, Jiandi An wrote: IPMI SSIF driver's parameter tryacpi and trydmi both are set to true.  The addition of IPMI DMI driver to create

Re: [PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-08 Thread Jiandi An
:51 -0700, Jason Gunthorpe wrote: On Tue, Mar 06, 2018 at 11:26:26PM -0600, Jiandi An wrote: TPM_CRB driver is the TPM support for ARM64.  If it is built as module, TPM chip is registered after IMA init.  tpm_pcr_read() in IMA driver would fail and display the following message even though

Re: [PATCH] ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver

2018-03-09 Thread Jiandi An
the probing process. Signed-off-by: Corey Minyard Cc: Jiandi An --- Jiandi, this just yanks out the SPMI code. Your platform should have an ACPI control method in it's namespace specifying the IPMI interface. If it doesn't, that's a bug in your platform and really needs to be fixed. Finding IPMI

[PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-17 Thread Jiandi An
black list. Signed-off-by: Jiandi An --- drivers/char/tpm/tpm_crb.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index 8f0a98d..cbfdbdde 100644 --- a/drivers/char/tpm/tpm_crb.c +++

[PATCH v2] tpm/tpm_crb: Access locality for only CRB_START method

2017-08-12 Thread Jiandi An
B_CTRL_REQ. Change the if condition to be only for CRB_FL_CRB_START in crb_go_idle() and crb_cmd_ready(). Signed-off-by: Jiandi An --- v2 Changed if condition to CRB_FL_CRB_START for go idle and crb_cmd_ready per maintainer's comment. drivers/char/tpm/tpm_crb.c | 36 +

[PATCH] tpm/tpm_crb: Access locality for only CRB_START method

2017-08-06 Thread Jiandi An
B_CTRL_REQ. Change the if condition to be only for CRB_FL_CRB_START in crb_go_idle() and crb_cmd_ready(). Signed-off-by: Jiandi An --- drivers/char/tpm/tpm_crb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_c

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-20 Thread Jiandi An
On 08/19/2017 12:05 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout")

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jiandi An
is introduced. Yes please Jason Okay, I'll work on moving sm to priv and getting rid of flags from priv. Will submit a new patch with appropriate patch name and not a v2 of this patch since the scope of changes have changed. Thanks for your comments and feedback. -- Jiandi An Qualcomm Datacenter

[PATCH] tpm/tpm_crb: Use start method value from ACPI table directly

2017-08-25 Thread Jiandi An
o maintain and undrestand. It is better to make code deal with start method value from ACPI table directly. Signed-off-by: Jiandi An --- drivers/char/tpm/tpm_crb.c | 59 +++--- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/char/tpm/t

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jiandi An
On 08/22/2017 12:39 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout")

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-24 Thread Jiandi An
On 08/24/2017 07:26 AM, Jarkko Sakkinen wrote: On Tue, Aug 22, 2017 at 04:28:54PM -0500, Jiandi An wrote: > > { - if ((priv->flags & CRB_FL_ACPI_START) || - (priv->flags & CRB_FL_CRB_SMC_START)) - return 0; - - iowrite32(CRB_CTRL_

[PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-06 Thread Jiandi An
) Fix IMA Kconfig to select TPM_CRB so TPM_CRB driver is built in kernel and initializes before IMA driver. Signed-off-by: Jiandi An --- security/integrity/ima/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig index 35ef693

[PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-06 Thread Jiandi An
from SPMI ACPI table and probe successfully. Signed-off-by: Jiandi An --- drivers/char/ipmi/ipmi_ssif.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 9d3b0fa..5c57363

Re: [PATCH] security: Fix IMA Kconfig for dependencies on ARM64

2018-03-07 Thread Jiandi An
, 2018 at 11:26:26PM -0600, Jiandi An wrote: TPM_CRB driver is the TPM support for ARM64.  If it is built as module, TPM chip is registered after IMA init.  tpm_pcr_read() in IMA driver would fail and display the following message even though eventually there is TPM chip on the system: ima: No TPM

Re: [PATCH] ipmi:ssif: Fix double probe from tryacpi and trydmi

2018-03-07 Thread Jiandi An
On 03/07/2018 07:34 AM, Corey Minyard wrote: On 03/06/2018 11:49 PM, Jiandi An wrote: IPMI SSIF driver's parameter tryacpi and trydmi both are set to true.  The addition of IPMI DMI driver to create platform device for each IPMI device causes SSIF probe to be done twice on the same SMB I2C

Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-09-27 Thread Jiandi An
On 08/24/2018 02:21 AM, Christian König wrote: > Am 24.08.2018 um 01:05 schrieb Jiandi An: >> >> >> On 08/23/2018 01:47 AM, Christian König wrote: >>> Am 22.08.2018 um 22:57 schrieb Jiandi An: >>>> >>>> On 08/22/2018 02:09 PM, Christian Kö

[PATCH] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-18 Thread Jiandi An
Ensure all reserved fields of xatp are zero before making hypervisor call to XEN in xen_map_device_mmio(). xenmem_add_to_physmap_one() in XEN fails the mapping request if extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio request. Signed-off-by: Jiandi An --- drivers/xen/arm

[PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()

2016-12-18 Thread Jiandi An
crb_check_resource() in TPM CRB driver calls acpi_dev_resource_memory() which only handles 32-bit resources. Adding a call to acpi_dev_resource_address_space() in TPM CRB driver which handles 64-bit resources. Signed-off-by: Jiandi An --- drivers/char/tpm/tpm_crb.c | 8 +--- 1 file changed

Re: [PATCH] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-19 Thread Jiandi An
On 12/19/16 12:49, Stefano Stabellini wrote: > On Mon, 19 Dec 2016, Juergen Gross wrote: >> On 19/12/16 03:56, Jiandi An wrote: >>> Ensure all reserved fields of xatp are zero before making hypervisor >>> call to XEN in xen_map_device_mmio(). xenmem_add_to_phy

Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()

2016-12-19 Thread Jiandi An
On 12/19/16 07:56, Jarkko Sakkinen wrote: > On Sun, Dec 18, 2016 at 10:20:53PM -0600, Jiandi An wrote: >> crb_check_resource() in TPM CRB driver calls >> acpi_dev_resource_memory() which only handles 32-bit resources. >> Adding a call to acpi_dev_resource_address_space() in TP

Re: [PATCH v2] ACPI : Update platform device numa node based on _PXM method

2017-04-14 Thread Jiandi An
device drivers should be able to use the NUMA aware memory allocation functions kmalloc_node() and alloc_pages_node() to improve the performance. Signed-off-by: Shanker Donthineni Tested-by: Jiandi An --- Changes since v1: Edited commit text. Not all the platform devices are attached

[PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call

2016-12-27 Thread Jiandi An
Ensure all reserved fields of xatp are zero before making hypervisor call to XEN in xen_map_device_mmio(). xenmem_add_to_physmap_one() in XEN fails the mapping request if extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio request. Signed-off-by: Jiandi An --- Changed zeroing