RE: [PATCH 0/5] Add new headers for Hyper-V Dom0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nuno Das Neves <nunodasneves@xxxxxxxxxxxxxxxxxxx> Sent: Tuesday, October 22, 2024 5:51 PM
> 
> On 10/10/2024 11:21 AM, Michael Kelley wrote:
> >

[snip]

> > 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.

You are right.  My mistake. User space code based on uio_hv_generic.c
maps the VMBus ring buffers into user space, and I thought that code
was pulling "struct hv_ring_buffer" from include/linux/hyperv.h file. But
DPDK and the tools/hv code each have their own completely separate
header file with the equivalent of "struct hv_ring_buffer". Duplicating
the ring buffer structure in multiple places probably isn't ideal, but the
decoupling helps in this case. ;-)

> 
> > 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.
> 

Fair enough. I don't know enough about vDSO user space to add anything
helpful.

Michael





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux