From: Nuno Das Neves <nunodasneves@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>
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>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will@kernel.org" <will@kernel.org>,
"luto@kernel.org" <luto@kernel.org>,
"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>,
"seanjc@google.com" <seanjc@google.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"joro@8bytes.org" <joro@8bytes.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"kw@linux.com" <kw@linux.com>,
"robh@kernel.org" <robh@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"sgarzare@redhat.com" <sgarzare@redhat.com>,
"jinankjain@linux.microsoft.com" <jinankjain@linux.microsoft.com>,
"muminulrussell@gmail.com" <muminulrussell@gmail.com>,
"skinsburskii@linux.microsoft.com"
<skinsburskii@linux.microsoft.com>,
"mukeshrathor@microsoft.com" <mukeshrathor@microsoft.com>
Subject: Re: [PATCH 0/5] Add new headers for Hyper-V Dom0
Date: Tue, 22 Oct 2024 17:51:05 -0700 [thread overview]
Message-ID: <725bac7d-5758-44fd-82cc-29fb85d8c53f@linux.microsoft.com> (raw)
In-Reply-To: <SN6PR02MB4157F6EA7B2454D2F6CBF2ECD4782@SN6PR02MB4157.namprd02.prod.outlook.com>
On 10/10/2024 11:21 AM, Michael Kelley wrote:
> From: Nuno Das Neves <nunodasneves@linux.microsoft.com> Sent: Thursday, October 3, 2024 12:51 PM
>>>> An intermediary header "hv_defs.h" is introduced to conditionally
>> include either hyperv-tlfs.h or hvhdk.h. This is required because
>> several headers which today include hyperv-tlfs.h, are shared
>> between Hyper-V and KVM code (e.g. mshyperv.h).
>
> Have you considered user space code that uses
> include/linux/hyperv.h? Which of the two schemes will it use? That code
> needs to compile correctly on x86 and ARM64 after your changes.
> User space code includes the separate DPDK project, and some of the
> tools in the kernel tree under tools/hv. Anything that uses the
> uio_hv_generic.c driver falls into this category.
>
Unless I misunderstand something, the uapi code isn't affected at all
by this patch set. e.g. the code in tools/hv uses include/uapi/linux/hyperv.h,
which doesn't include any other Hyper-V headers.
I'm not aware of how the DPDK project uses the Hyper-V definitions, but if it
is getting headers from uapi it should also be unaffected.
> I think there's also user space code that is built for vDSO that might pull
> in the .h files you are modifying. There are in-progress patches dealing
> with vDSO include files, such as [1]. My general comment on vDSO
> is to be careful in making #include file changes that it uses, but I'm
> not knowledgeable enough on how vDSO is built to give specific
> guidance. :-(
>
Hmm, interesting, looks like it does get used by userspace. The tsc page
is mapped into userspace in vdso.vma.c, and read in vdso/gettimeofday.h.
That is unexpected for me, since these things aren't in uapi. However I don't
anticipate a problem. The definitions used haven't changed, just the headers
they are included from.
Thanks
Nuno
> Michael
>
> [1] https://lore.kernel.org/lkml/20241010135146.181175-1-vincenzo.frascino@arm.com/
>
>>
>> Summary:
>> Patch 1-2: Cleanup patches
>> Patch 3: Add the new headers (hvhdk.h, etc..) in include/hyperv/
>> Patch 4: Add hv_defs.h and use it in mshyperv.h, svm.h,
>> hyperv_timer.h
>> Patch 5: Switch to the new headers, only in Hyper-V code
>>
>> Nuno Das Neves (5):
>> hyperv: Move hv_connection_id to hyperv-tlfs.h
>> hyperv: Remove unnecessary #includes
>> hyperv: Add new Hyper-V headers
>> hyperv: Add hv_defs.h to conditionally include hyperv-tlfs.h or
>> hvhdk.h
>> hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code
>>
>> arch/arm64/hyperv/hv_core.c | 3 +-
>> arch/arm64/hyperv/mshyperv.c | 1 +
>> arch/arm64/include/asm/mshyperv.h | 2 +-
>> arch/x86/entry/vdso/vma.c | 1 +
>> arch/x86/hyperv/hv_apic.c | 2 +-
>> arch/x86/hyperv/hv_init.c | 3 +-
>> arch/x86/hyperv/hv_proc.c | 4 +-
>> arch/x86/hyperv/hv_spinlock.c | 1 +
>> arch/x86/hyperv/hv_vtl.c | 1 +
>> arch/x86/hyperv/irqdomain.c | 1 +
>> arch/x86/hyperv/ivm.c | 2 +-
>> arch/x86/hyperv/mmu.c | 2 +-
>> arch/x86/hyperv/nested.c | 2 +-
>> arch/x86/include/asm/kvm_host.h | 1 -
>> arch/x86/include/asm/mshyperv.h | 3 +-
>> arch/x86/include/asm/svm.h | 2 +-
>> arch/x86/include/asm/vdso/gettimeofday.h | 1 +
>> arch/x86/kernel/cpu/mshyperv.c | 2 +-
>> arch/x86/kernel/cpu/mtrr/generic.c | 1 +
>> arch/x86/kvm/vmx/vmx_onhyperv.h | 1 -
>> arch/x86/mm/pat/set_memory.c | 2 -
>> drivers/clocksource/hyperv_timer.c | 2 +-
>> drivers/hv/channel.c | 1 +
>> drivers/hv/channel_mgmt.c | 1 +
>> drivers/hv/connection.c | 1 +
>> drivers/hv/hv.c | 1 +
>> drivers/hv/hv_balloon.c | 5 +-
>> drivers/hv/hv_common.c | 2 +-
>> drivers/hv/hv_kvp.c | 1 -
>> drivers/hv/hv_snapshot.c | 1 -
>> drivers/hv/hv_util.c | 1 +
>> drivers/hv/hyperv_vmbus.h | 1 -
>> drivers/hv/ring_buffer.c | 1 +
>> drivers/hv/vmbus_drv.c | 1 +
>> drivers/iommu/hyperv-iommu.c | 1 +
>> drivers/net/hyperv/netvsc.c | 1 +
>> drivers/pci/controller/pci-hyperv.c | 1 +
>> include/asm-generic/hyperv-tlfs.h | 9 +
>> include/asm-generic/mshyperv.h | 2 +-
>> include/clocksource/hyperv_timer.h | 2 +-
>> include/hyperv/hv_defs.h | 29 +
>> include/hyperv/hvgdk.h | 66 ++
>> include/hyperv/hvgdk_ext.h | 46 +
>> include/hyperv/hvgdk_mini.h | 1212 ++++++++++++++++++++++
>> include/hyperv/hvhdk.h | 733 +++++++++++++
>> include/hyperv/hvhdk_mini.h | 310 ++++++
>> include/linux/hyperv.h | 12 +-
>> net/vmw_vsock/hyperv_transport.c | 1 -
>> 48 files changed, 2442 insertions(+), 40 deletions(-)
>> create mode 100644 include/hyperv/hv_defs.h
>> create mode 100644 include/hyperv/hvgdk.h
>> create mode 100644 include/hyperv/hvgdk_ext.h
>> create mode 100644 include/hyperv/hvgdk_mini.h
>> create mode 100644 include/hyperv/hvhdk.h
>> create mode 100644 include/hyperv/hvhdk_mini.h
>>
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2024-10-23 0:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 19:50 [PATCH 0/5] Add new headers for Hyper-V Dom0 Nuno Das Neves
2024-10-03 19:51 ` [PATCH 1/5] hyperv: Move hv_connection_id to hyperv-tlfs.h Nuno Das Neves
2024-10-07 16:24 ` Wei Liu
2024-10-03 19:51 ` [PATCH 2/5] hyperv: Remove unnecessary #includes Nuno Das Neves
2024-10-07 16:24 ` Wei Liu
2024-10-10 18:21 ` Michael Kelley
2024-10-31 18:47 ` Nuno Das Neves
2024-10-03 19:51 ` [PATCH 3/5] hyperv: Add new Hyper-V headers Nuno Das Neves
2024-10-10 18:21 ` Michael Kelley
2024-10-11 1:34 ` [EXTERNAL] " MUKESH RATHOR
2024-10-03 19:51 ` [PATCH 4/5] hyperv: Add hv_defs.h to conditionally include hyperv-tlfs.h or hvhdk.h Nuno Das Neves
2024-10-03 19:51 ` [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code Nuno Das Neves
2024-10-04 15:58 ` Stanislav Kinsburskii
2024-10-05 0:07 ` Nuno Das Neves
2024-10-04 19:11 ` Simon Horman
2024-10-04 23:36 ` Nuno Das Neves
2024-10-04 21:55 ` kernel test robot
2024-10-05 1:54 ` kernel test robot
2024-10-07 16:26 ` [PATCH 0/5] Add new headers for Hyper-V Dom0 Wei Liu
2024-10-10 18:21 ` Michael Kelley
2024-10-11 1:34 ` [EXTERNAL] " MUKESH RATHOR
2024-10-23 0:04 ` Nuno Das Neves
2024-10-23 18:39 ` Michael Kelley
2024-10-23 0:51 ` Nuno Das Neves [this message]
2024-10-23 18:32 ` Michael Kelley
2024-10-31 19:05 ` Easwar Hariharan
2024-10-31 22:59 ` Nuno Das Neves
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=725bac7d-5758-44fd-82cc-29fb85d8c53f@linux.microsoft.com \
--to=nunodasneves@linux.microsoft.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux.dev \
--cc=jinankjain@linux.microsoft.com \
--cc=joro@8bytes.org \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kw@linux.com \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=luto@kernel.org \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=mukeshrathor@microsoft.com \
--cc=muminulrussell@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=seanjc@google.com \
--cc=sgarzare@redhat.com \
--cc=skinsburskii@linux.microsoft.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux.dev \
--cc=wei.liu@kernel.org \
--cc=will@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 NNTP newsgroup(s).