diff mbox series

[v2,2/2] x86/pvshim: use 2M alignment

Message ID 20190319130550.32570-3-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86: more flexible alignment handling for xen image | expand

Commit Message

Wei Liu March 19, 2019, 1:05 p.m. UTC
The pvshim is loaded directly by toolstack. Use 2M alignment for
potentially better performance.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/x86/configs/pvshim_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Beulich March 19, 2019, 1:42 p.m. UTC | #1
>>> On 19.03.19 at 14:05, <wei.liu2@citrix.com> wrote:
> --- a/xen/arch/x86/configs/pvshim_defconfig
> +++ b/xen/arch/x86/configs/pvshim_defconfig
> @@ -5,6 +5,7 @@ CONFIG_PVH_GUEST=y
>  CONFIG_PV_SHIM=y
>  CONFIG_PV_SHIM_EXCLUSIVE=y
>  CONFIG_NR_CPUS=32
> +CONFIG_XEN_ALIGN_2M=y
>  # Disable features not used by the PV shim
>  # CONFIG_SHADOW_PAGING is not set
>  # CONFIG_BIGMEM is not set

Instead of this, why not add

    default XEN_ALIGN_2M if PV_SHIM_EXCLUSIVE

to the config option itself, ahead of the default patch 1 establishes?

Jan
Wei Liu March 19, 2019, 1:50 p.m. UTC | #2
On Tue, Mar 19, 2019 at 07:42:56AM -0600, Jan Beulich wrote:
> >>> On 19.03.19 at 14:05, <wei.liu2@citrix.com> wrote:
> > --- a/xen/arch/x86/configs/pvshim_defconfig
> > +++ b/xen/arch/x86/configs/pvshim_defconfig
> > @@ -5,6 +5,7 @@ CONFIG_PVH_GUEST=y
> >  CONFIG_PV_SHIM=y
> >  CONFIG_PV_SHIM_EXCLUSIVE=y
> >  CONFIG_NR_CPUS=32
> > +CONFIG_XEN_ALIGN_2M=y
> >  # Disable features not used by the PV shim
> >  # CONFIG_SHADOW_PAGING is not set
> >  # CONFIG_BIGMEM is not set
> 
> Instead of this, why not add
> 
>     default XEN_ALIGN_2M if PV_SHIM_EXCLUSIVE
> 
> to the config option itself, ahead of the default patch 1 establishes?

This seems to work -- I didn't know you can have two default's for the
same option.

Wei.

> 
> Jan
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
Jan Beulich March 19, 2019, 1:56 p.m. UTC | #3
>>> On 19.03.19 at 14:50, <wei.liu2@citrix.com> wrote:
> On Tue, Mar 19, 2019 at 07:42:56AM -0600, Jan Beulich wrote:
>> >>> On 19.03.19 at 14:05, <wei.liu2@citrix.com> wrote:
>> > --- a/xen/arch/x86/configs/pvshim_defconfig
>> > +++ b/xen/arch/x86/configs/pvshim_defconfig
>> > @@ -5,6 +5,7 @@ CONFIG_PVH_GUEST=y
>> >  CONFIG_PV_SHIM=y
>> >  CONFIG_PV_SHIM_EXCLUSIVE=y
>> >  CONFIG_NR_CPUS=32
>> > +CONFIG_XEN_ALIGN_2M=y
>> >  # Disable features not used by the PV shim
>> >  # CONFIG_SHADOW_PAGING is not set
>> >  # CONFIG_BIGMEM is not set
>> 
>> Instead of this, why not add
>> 
>>     default XEN_ALIGN_2M if PV_SHIM_EXCLUSIVE
>> 
>> to the config option itself, ahead of the default patch 1 establishes?
> 
> This seems to work -- I didn't know you can have two default's for the
> same option.

The order is important, but beyond that you can have any number
of them. The first one the "if" of which matches gets used.

Jan
diff mbox series

Patch

diff --git a/xen/arch/x86/configs/pvshim_defconfig b/xen/arch/x86/configs/pvshim_defconfig
index a12e3d0465..8e50b60cda 100644
--- a/xen/arch/x86/configs/pvshim_defconfig
+++ b/xen/arch/x86/configs/pvshim_defconfig
@@ -5,6 +5,7 @@  CONFIG_PVH_GUEST=y
 CONFIG_PV_SHIM=y
 CONFIG_PV_SHIM_EXCLUSIVE=y
 CONFIG_NR_CPUS=32
+CONFIG_XEN_ALIGN_2M=y
 # Disable features not used by the PV shim
 # CONFIG_SHADOW_PAGING is not set
 # CONFIG_BIGMEM is not set