[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c426d122-4ba3-4193-80d5-a40d7554d324@linux.microsoft.com>
Date: Tue, 22 Oct 2024 17:04:01 -0700
From: Nuno Das Neves <nunodasneves@...ux.microsoft.com>
To: MUKESH RATHOR <mukeshrathor@...rosoft.com>,
Michael Kelley <mhklinux@...look.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>
Cc: KY Srinivasan <kys@...rosoft.com>, Haiyang Zhang
<haiyangz@...rosoft.com>, "wei.liu@...nel.org" <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"will@...nel.org" <will@...nel.org>, "luto@...nel.org" <luto@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"joro@...tes.org" <joro@...tes.org>,
"robin.murphy@....com" <robin.murphy@....com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com"
<pabeni@...hat.com>, "lpieralisi@...nel.org" <lpieralisi@...nel.org>,
"kw@...ux.com" <kw@...ux.com>, "robh@...nel.org" <robh@...nel.org>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>, "arnd@...db.de"
<arnd@...db.de>, "sgarzare@...hat.com" <sgarzare@...hat.com>,
"jinankjain@...ux.microsoft.com" <jinankjain@...ux.microsoft.com>,
"muminulrussell@...il.com" <muminulrussell@...il.com>,
"skinsburskii@...ux.microsoft.com" <skinsburskii@...ux.microsoft.com>
Subject: Re: [EXTERNAL] RE: [PATCH 0/5] Add new headers for Hyper-V Dom0
Michael - sorry for the delay, I just got back from vacation.
On 10/10/2024 6:34 PM, MUKESH RATHOR wrote:
>
>
> On 10/10/24 11:21, Michael Kelley wrote:
> > From: Nuno Das Neves <nunodasneves@...ux.microsoft.com> Sent:
> Thursday, October 3, 2024 12:51 PM
> >>
> >> To support Hyper-V Dom0 (aka Linux as root partition), many new
> >> definitions are required.
> >>
> >> The plan going forward is to directly import headers from
> >> Hyper-V. This is a more maintainable way to import definitions
> >> rather than via the TLFS doc. This patch series introduces
> >> new headers (hvhdk.h, hvgdk.h, etc, see patch #3) directly
> >> derived from Hyper-V code.
> >>
> >> This patch series replaces hyperv-tlfs.h with hvhdk.h, but only
> >> in Microsoft-maintained Hyper-V code where they are needed. This
> >> leaves the existing hyperv-tlfs.h in use elsewhere - notably for
> >> Hyper-V enlightenments on KVM guests.
> >
> > Could you elaborate on why the bifurcation is necessary? Is it an
> > interim step until the KVM code can use the new scheme as well?
It's not strictly necessary. We chose this approach in order to
minimize any potential impact on KVM and other non-Microsoft-
maintained code that uses hyperv-tlfs.h. As Mukesh mentioned below,
eventually it will be better if everyone uses the new headers.
> > Also, does "Hyper-V enlightenments on KVM guests" refer to
> > nested KVM running at L1 on an L0 Hyper-V, and supporting L2 guests?
> > Or is it the more general KVM support for mimicking Hyper-V for
> > the purposes of running Windows guests? From these patches, it
> > looks like your intention is for all KVM support for Hyper-V
> > functionality to continue to use the existing hyperv-tlfs.h file.
You're correct - "all KVM support for Hyper-V" is really what I meant.
>
> Like it says above, we are creating new dom0 (root/host) support
> that requires many new defs only available to dom0 and not any
> guest. Hypervisor makes them publicly available via hv*dk files.
>
> Ideally, someday everybody will use those, I hope we can move in
> that direction, but I guess one step at a time. For now, KVM can
> continue to use the tlfs file, and if there is no resistance, we
> can move them to hv*dk files also as next step and obsolete the
> single tlfs file.
>
> Since headers are the ultimate source of truth, this will allow
> better maintenance, better debug/support experience, and a more
> stable stack. It also enforces non-leaking of data structs from
> private header files (unfortunately has happened).
>
> Thanks
> -Mukesh
>
Thanks for providing the additional context, Mukesh.
Nuno
Powered by blists - more mailing lists