linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: Olaf Hering <olaf@aepfle.de>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v1] hyperv: reduce size of ms_hyperv_info
Date: Fri, 22 Sep 2023 18:44:25 +0000	[thread overview]
Message-ID: <ZQ3giXQbmloCSil8@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <SA1PR21MB133593AABC414CB427B84FABBFFAA@SA1PR21MB1335.namprd21.prod.outlook.com>

On Tue, Sep 19, 2023 at 06:18:53AM +0000, Dexuan Cui wrote:
> > From: Olaf Hering <olaf@aepfle.de>
> > Sent: Monday, September 18, 2023 9:02 AM
> > [...]
> > Use the hole prior shared_gpa_boundary to store the result of get_vtl.
> > This reduces the size by 8 bytes.
> >  [...]
> > --- a/include/asm-generic/mshyperv.h
> > +++ b/include/asm-generic/mshyperv.h
> > @@ -53,8 +53,8 @@ struct ms_hyperv_info {
> >  			u32 reserved_b2 : 20;
> >  		};
> >  	};
> > -	u64 shared_gpa_boundary;
> >  	u8 vtl;
> > +	u64 shared_gpa_boundary;
> >  };
> >  extern struct ms_hyperv_info ms_hyperv;
> >  extern bool hv_nested;
> 
> How about moving the 'vtl' field to an even earlier place:
> 
> --- a/include/asm-generic/mshyperv.h
> +++ b/include/asm-generic/mshyperv.h
> @@ -36,6 +36,9 @@ struct ms_hyperv_info {
>         u32 nested_features;
>         u32 max_vp_index;
>         u32 max_lp_index;
> +
> +       u8 vtl;
> +
>         union {
>                 u32 isolation_config_a;
>                 struct {
> @@ -54,7 +57,6 @@ struct ms_hyperv_info {
>                 };
>         };
>         u64 shared_gpa_boundary;
> -       u8 vtl;
>  };
>  extern struct ms_hyperv_info ms_hyperv;
>  extern bool hv_nested;
> 
> This also reduces the size by 8 bytes, and keeps
> the isolation_config_a/ isolation_config_b/ shared_gpa_boundary
> together, which are related.

Either method works for me.

Will there be a v2 of this patch?

Thanks,
Wei.

      parent reply	other threads:[~2023-09-22 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 16:01 [PATCH v1] hyperv: reduce size of ms_hyperv_info Olaf Hering
2023-09-19  6:18 ` Dexuan Cui
2023-09-19  7:12   ` Olaf Hering
2023-09-22 18:44   ` Wei Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZQ3giXQbmloCSil8@liuwe-devbox-debian-v2 \
    --to=wei.liu@kernel.org \
    --cc=arnd@arndb.de \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).