Re: [Xen-devel] [RFC XEN PATCH v3 08/39] xen/pmem: hide NFIT and deny access to PMEM from Dom0

2017-11-03 Thread Haozhong Zhang
On 11/03/17 14:51 +0800, Chao Peng wrote:
> On Mon, 2017-09-11 at 12:37 +0800, Haozhong Zhang wrote:
> > ... to avoid the inference with the PMEM driver and management
> > utilities in Dom0.
> > 
> > Signed-off-by: Haozhong Zhang 
> > ---
> > Cc: Jan Beulich 
> > Cc: Andrew Cooper 
> > Cc: Gang Wei 
> > Cc: Shane Wang 
> > ---
> >  xen/arch/x86/acpi/power.c |  7 +++
> >  xen/arch/x86/dom0_build.c |  5 +
> >  xen/arch/x86/shutdown.c   |  3 +++
> >  xen/arch/x86/tboot.c  |  4 
> >  xen/common/kexec.c|  3 +++
> >  xen/common/pmem.c | 21 +
> >  xen/drivers/acpi/nfit.c   | 21 +
> >  xen/include/xen/acpi.h|  2 ++
> >  xen/include/xen/pmem.h| 13 +
> >  9 files changed, 79 insertions(+)
> > 
> > diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
> > index 1e4e5680a7..d135715a49 100644
> > --- a/xen/arch/x86/acpi/power.c
> > +++ b/xen/arch/x86/acpi/power.c
> > @@ -178,6 +178,10 @@ static int enter_state(u32 state)
> >  
> >  freeze_domains();
> >  
> > +#ifdef CONFIG_NVDIMM_PMEM
> > +acpi_nfit_reinstate();
> > +#endif
> 
> I don't understand why reinstate is needed for NFIT table? Will it  be
> searched by firmware on shutdown / entering power state?

I added these acpi_nfit_reinstate()'s akin to acpi_dmar_reinstate().
There is not public documents stating NFIT is not rebuilt during power
state changes.

Haozhong

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [RFC XEN PATCH v3 08/39] xen/pmem: hide NFIT and deny access to PMEM from Dom0

2017-11-02 Thread Chao Peng
On Mon, 2017-09-11 at 12:37 +0800, Haozhong Zhang wrote:
> ... to avoid the inference with the PMEM driver and management
> utilities in Dom0.
> 
> Signed-off-by: Haozhong Zhang 
> ---
> Cc: Jan Beulich 
> Cc: Andrew Cooper 
> Cc: Gang Wei 
> Cc: Shane Wang 
> ---
>  xen/arch/x86/acpi/power.c |  7 +++
>  xen/arch/x86/dom0_build.c |  5 +
>  xen/arch/x86/shutdown.c   |  3 +++
>  xen/arch/x86/tboot.c  |  4 
>  xen/common/kexec.c|  3 +++
>  xen/common/pmem.c | 21 +
>  xen/drivers/acpi/nfit.c   | 21 +
>  xen/include/xen/acpi.h|  2 ++
>  xen/include/xen/pmem.h| 13 +
>  9 files changed, 79 insertions(+)
> 
> diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
> index 1e4e5680a7..d135715a49 100644
> --- a/xen/arch/x86/acpi/power.c
> +++ b/xen/arch/x86/acpi/power.c
> @@ -178,6 +178,10 @@ static int enter_state(u32 state)
>  
>  freeze_domains();
>  
> +#ifdef CONFIG_NVDIMM_PMEM
> +acpi_nfit_reinstate();
> +#endif

I don't understand why reinstate is needed for NFIT table? Will it  be
searched by firmware on shutdown / entering power state?

Chao

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel