mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Michael Kelley <mhklinux@outlook.com>
Cc: Roman Kisel <romank@linux.microsoft.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"decui@microsoft.com" <decui@microsoft.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"kys@microsoft.com" <kys@microsoft.com>,
	"mikelley@microsoft.com" <mikelley@microsoft.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"tiala@microsoft.com" <tiala@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"apais@microsoft.com" <apais@microsoft.com>,
	"benhill@microsoft.com" <benhill@microsoft.com>,
	"bperkins@microsoft.com" <bperkins@microsoft.com>,
	"sunilmut@microsoft.com" <sunilmut@microsoft.com>
Subject: Re: [PATCH hyperv-next] x86/hyperv: Fix APIC ID and VP ID confusion in hv_snp_boot_ap()
Date: Mon, 28 Apr 2025 00:48:36 +0000	[thread overview]
Message-ID: <aA7QZPFS7WWOsahp@liuwe-devbox-ubuntu-v2.tail21d00.ts.net> (raw)
In-Reply-To: <SN6PR02MB41577E8A06C9F8BA66A8D68AD4842@SN6PR02MB4157.namprd02.prod.outlook.com>

On Fri, Apr 25, 2025 at 04:55:42PM +0000, Michael Kelley wrote:
> From: Roman Kisel <romank@linux.microsoft.com> Sent: Friday, April 25, 2025 9:36 AM
> > 
> > On 4/25/2025 8:12 AM, Michael Kelley wrote:
> > > From: Roman Kisel <romank@linux.microsoft.com> Sent: Thursday, April 24, 2025 2:58 PM
> > >>
> > >> To start an application processor in SNP-isolated guest, a hypercall
> > >> is used that takes a virtual processor index. The hv_snp_boot_ap()
> > >> function uses that START_VP hypercall but passes as VP ID to it what
> > >> it receives as a wakeup_secondary_cpu_64 callback: the APIC ID.
> > >>
> > >> As those two aren't generally interchangeable, that may lead to hung
> > >> APs if VP IDs and APIC IDs don't match, e.g. APIC IDs might be sparse
> > >> whereas VP IDs never are.
> > >
> > > I agree that VP IDs (a.k.a. VP indexes) and APIC IDs don't necessary match,
> > > and that APIC IDs might be sparse. But I'm not aware of any statement
> > > in the TLFS about the nature of VP indexes, except that
> > >
> > >     "A virtual processor index must be less than the maximum number of
> > >     virtual processors per partition."
> > >
> > > But that maximum is the Hyper-V implementation maximum, not the
> > > maximum for a particular VM. So the statement does not imply
> > > denseness unless the number of CPUs in the VM is equal to the
> > > Hyper-V implementation max. In other parts of Linux kernel code,
> > > we assume that VP indexes might be sparse as well.
> > >
> > > All that said, this is just a comment about the precise accuracy of
> > > your commit message, and doesn't affect the code.
> > >
> > 
> > I appreciate your help with the precision. I used loose language,
> > agreed, would like to fix that. The patch was applied though but not yet
> > sent to the Linus'es tree as I understand. I'd appreciate guidance on
> > the process! Should I send a v2 nevertheless and explain the situation
> > in the cover letter?
> > 
> > IOW, how do I make this easier for the maintainer(s)?
> 
> Wei Liu should give his preferences. But in the past, I think he has
> just replaced a patch that was updated. If that's the case, you can 
> send a v2 without a lot of additional explanation.
> 

Normally if you need to send a new version because the original
patch is buggy, you can just update your patch.

If only a commit message or comment needs to be updated, I will let the
submitter know either to send a new version or not. Sometimes I will
just make the changes myself to save the submitter some time.

Wei.

  reply	other threads:[~2025-04-28  0:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 21:57 Roman Kisel
2025-04-25  6:15 ` Wei Liu
2025-04-25  9:14   ` [EXTERNAL] " Saurabh Singh Sengar
2025-04-25 16:43     ` Roman Kisel
2025-04-25 17:18       ` Saurabh Singh Sengar
2025-04-25 18:22         ` Roman Kisel
2025-04-25 21:12           ` Wei Liu
2025-04-28 17:26             ` Roman Kisel
2025-04-25 15:12 ` Michael Kelley
2025-04-25 16:35   ` Roman Kisel
2025-04-25 16:55     ` Michael Kelley
2025-04-28  0:48       ` Wei Liu [this message]
2025-04-28 17:29         ` Roman Kisel

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=aA7QZPFS7WWOsahp@liuwe-devbox-ubuntu-v2.tail21d00.ts.net \
    --to=wei.liu@kernel.org \
    --cc=apais@microsoft.com \
    --cc=benhill@microsoft.com \
    --cc=bp@alien8.de \
    --cc=bperkins@microsoft.com \
    --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=mikelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=romank@linux.microsoft.com \
    --cc=sunilmut@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=tiala@microsoft.com \
    --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

all inboxes | Powered by JetHome®