Linux-HyperV Archive mirror
 help / color / mirror / Atom feed
From: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>
Cc: "kys@microsoft.com" <kys@microsoft.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"decui@microsoft.com" <decui@microsoft.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ssengar@microsoft.com" <ssengar@microsoft.com>
Subject: Re: [PATCH] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms
Date: Sun, 14 Jan 2024 01:24:30 -0800	[thread overview]
Message-ID: <20240114092430.GA13684@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <SN6PR02MB415740C3EE66618A37A658EED4692@SN6PR02MB4157.namprd02.prod.outlook.com>

On Wed, Jan 10, 2024 at 05:10:47AM +0000, Michael Kelley wrote:
> From: Saurabh Sengar <ssengar@linux.microsoft.com> Sent: Friday, January 5, 2024 2:29 AM
> > 
> > The current method for signaling the compatibility of a Hyper-V host
> > with MSIs featuring 15-bit APIC IDs relies on a synthetic cpuid leaf.
> > However, for higher VTLs, this leaf is not reported, due to the absence
> > of an IO-APIC.
> > 
> > As an alternative, assume that when running at a high VTL, the host
> > supports 15-bit APIC IDs. This assumption is now deemed safe, as no
> > architectural MSIs are employed at higher VTLs.
> 
> I'm trying to fully understand this last sentence.  It has the words
> "now" and "deemed" as qualifiers.  Can you say anything more about
> why "now" (implying it wasn't safe at some point in the past)?
> And what are the implications of "deemed"?  Or are both just
> wordiness, and it would be just as good to say "This assumption is safe,
> as Hyper-V does not employ any architectural MSIs at higher VTLs." ?
> 
> The code LGTM.

Thank you for your review. Your phrasing appears better to me. I will revise
the commit message as per your suggestions and submit V2.

- Saurabh

> 
> Michael
> 
> > 
> > This unblocks startup of VTL2 environments with more than 256 CPUs.
> > 
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > ---
> >  arch/x86/hyperv/hv_vtl.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/arch/x86/hyperv/hv_vtl.c b/arch/x86/hyperv/hv_vtl.c
> > index 539c7b5cfa2b..1c225362f88e 100644
> > --- a/arch/x86/hyperv/hv_vtl.c
> > +++ b/arch/x86/hyperv/hv_vtl.c
> > @@ -16,6 +16,11 @@
> >  extern struct boot_params boot_params;
> >  static struct real_mode_header hv_vtl_real_mode_header;
> > 
> > +static bool __init hv_vtl_msi_ext_dest_id(void)
> > +{
> > +	return true;
> > +}
> > +
> >  void __init hv_vtl_init_platform(void)
> >  {
> >  	pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
> > @@ -39,6 +44,8 @@ void __init hv_vtl_init_platform(void)
> >  	x86_platform.legacy.warm_reset = 0;
> >  	x86_platform.legacy.reserve_bios_regions = 0;
> >  	x86_platform.legacy.devices.pnpbios = 0;
> > +
> > +	x86_init.hyper.msi_ext_dest_id = hv_vtl_msi_ext_dest_id;
> >  }
> > 
> >  static inline u64 hv_vtl_system_desc_base(struct ldttss_desc *desc)
> > --
> > 2.25.1
> > 
> 

      reply	other threads:[~2024-01-14  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 10:29 [PATCH] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms Saurabh Sengar
2024-01-10  5:10 ` Michael Kelley
2024-01-14  9:24   ` Saurabh Singh Sengar [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=20240114092430.GA13684@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=ssengar@linux.microsoft.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=ssengar@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=wei.liu@kernel.org \
    --cc=x86@kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).