mbox series

[v3,0/3] PCI: hv: Generify pci-hyperv.c

Message ID 20200210033953.99692-1-boqun.feng@gmail.com
Headers show
Series PCI: hv: Generify pci-hyperv.c | expand

Message

Boqun Feng Feb. 10, 2020, 3:39 a.m. UTC
Hi,

This is the first part for virtual PCI support of Hyper-V guest on
ARM64. The whole patchset doesn't have any functional change, but only
refactors the pci-hyperv.c code to make it more arch-independent.

Previous version:
v1: https://lore.kernel.org/lkml/20200121015713.69691-1-boqun.feng@gmail.com/
v2: https://lore.kernel.org/linux-arm-kernel/20200203050313.69247-1-boqun.feng@gmail.com/

Changes since v2:

*	Rebased on 5.6-rc1

*	Reword commit logs as per Andrew's suggestion.

*	It makes more sense to have a generic interface to set the whole
	msi_entry rather than only the "address" field. So change
	hv_set_msi_address_from_desc() to hv_set_msi_entry_from_desc().
	Additionally, make it an inline function as per the suggestion
	of Andrew and Thomas.

*	Add the missing comment saying the partition_id of
	hv_retarget_device_interrupt must be self.

*	Add the explanation for why "__packed" is needed for TLFS
	structures.

I've done compile and boot test of this patchset, also done some tests
with a pass-through NVMe device.

Suggestions and comments are welcome!

Regards,
Boqun

Boqun Feng (3):
  PCI: hv: Move hypercall related definitions into tlfs header
  PCI: hv: Move retarget related structures into tlfs header
  PCI: hv: Introduce hv_msi_entry

 arch/x86/include/asm/hyperv-tlfs.h  | 41 +++++++++++++++++++++++++++
 arch/x86/include/asm/mshyperv.h     |  8 ++++++
 drivers/pci/controller/pci-hyperv.c | 43 ++---------------------------
 3 files changed, 52 insertions(+), 40 deletions(-)

Comments

Boqun Feng Feb. 21, 2020, 2:33 a.m. UTC | #1
Ping ;-)

Any suggestion or plan on this patchset?

Thanks and Regards,
Boqun

On Mon, Feb 10, 2020 at 11:39:50AM +0800, Boqun Feng wrote:
> Hi,
> 
> This is the first part for virtual PCI support of Hyper-V guest on
> ARM64. The whole patchset doesn't have any functional change, but only
> refactors the pci-hyperv.c code to make it more arch-independent.
> 
> Previous version:
> v1: https://lore.kernel.org/lkml/20200121015713.69691-1-boqun.feng@gmail.com/
> v2: https://lore.kernel.org/linux-arm-kernel/20200203050313.69247-1-boqun.feng@gmail.com/
> 
> Changes since v2:
> 
> *	Rebased on 5.6-rc1
> 
> *	Reword commit logs as per Andrew's suggestion.
> 
> *	It makes more sense to have a generic interface to set the whole
> 	msi_entry rather than only the "address" field. So change
> 	hv_set_msi_address_from_desc() to hv_set_msi_entry_from_desc().
> 	Additionally, make it an inline function as per the suggestion
> 	of Andrew and Thomas.
> 
> *	Add the missing comment saying the partition_id of
> 	hv_retarget_device_interrupt must be self.
> 
> *	Add the explanation for why "__packed" is needed for TLFS
> 	structures.
> 
> I've done compile and boot test of this patchset, also done some tests
> with a pass-through NVMe device.
> 
> Suggestions and comments are welcome!
> 
> Regards,
> Boqun
> 
> Boqun Feng (3):
>   PCI: hv: Move hypercall related definitions into tlfs header
>   PCI: hv: Move retarget related structures into tlfs header
>   PCI: hv: Introduce hv_msi_entry
> 
>  arch/x86/include/asm/hyperv-tlfs.h  | 41 +++++++++++++++++++++++++++
>  arch/x86/include/asm/mshyperv.h     |  8 ++++++
>  drivers/pci/controller/pci-hyperv.c | 43 ++---------------------------
>  3 files changed, 52 insertions(+), 40 deletions(-)
> 
> -- 
> 2.24.1
>
Lorenzo Pieralisi Feb. 21, 2020, 10:44 a.m. UTC | #2
On Fri, Feb 21, 2020 at 10:33:44AM +0800, Boqun Feng wrote:
> Ping ;-)
> 
> Any suggestion or plan on this patchset?

Hi,

I shall have a look shortly, thanks.

Lorenzo

> Thanks and Regards,
> Boqun
> 
> On Mon, Feb 10, 2020 at 11:39:50AM +0800, Boqun Feng wrote:
> > Hi,
> > 
> > This is the first part for virtual PCI support of Hyper-V guest on
> > ARM64. The whole patchset doesn't have any functional change, but only
> > refactors the pci-hyperv.c code to make it more arch-independent.
> > 
> > Previous version:
> > v1: https://lore.kernel.org/lkml/20200121015713.69691-1-boqun.feng@gmail.com/
> > v2: https://lore.kernel.org/linux-arm-kernel/20200203050313.69247-1-boqun.feng@gmail.com/
> > 
> > Changes since v2:
> > 
> > *	Rebased on 5.6-rc1
> > 
> > *	Reword commit logs as per Andrew's suggestion.
> > 
> > *	It makes more sense to have a generic interface to set the whole
> > 	msi_entry rather than only the "address" field. So change
> > 	hv_set_msi_address_from_desc() to hv_set_msi_entry_from_desc().
> > 	Additionally, make it an inline function as per the suggestion
> > 	of Andrew and Thomas.
> > 
> > *	Add the missing comment saying the partition_id of
> > 	hv_retarget_device_interrupt must be self.
> > 
> > *	Add the explanation for why "__packed" is needed for TLFS
> > 	structures.
> > 
> > I've done compile and boot test of this patchset, also done some tests
> > with a pass-through NVMe device.
> > 
> > Suggestions and comments are welcome!
> > 
> > Regards,
> > Boqun
> > 
> > Boqun Feng (3):
> >   PCI: hv: Move hypercall related definitions into tlfs header
> >   PCI: hv: Move retarget related structures into tlfs header
> >   PCI: hv: Introduce hv_msi_entry
> > 
> >  arch/x86/include/asm/hyperv-tlfs.h  | 41 +++++++++++++++++++++++++++
> >  arch/x86/include/asm/mshyperv.h     |  8 ++++++
> >  drivers/pci/controller/pci-hyperv.c | 43 ++---------------------------
> >  3 files changed, 52 insertions(+), 40 deletions(-)
> > 
> > -- 
> > 2.24.1
> >
Boqun Feng March 9, 2020, 2:35 p.m. UTC | #3
Hi Lorenzo,

On Fri, Feb 21, 2020 at 10:44:54AM +0000, Lorenzo Pieralisi wrote:
> On Fri, Feb 21, 2020 at 10:33:44AM +0800, Boqun Feng wrote:
> > Ping ;-)
> > 
> > Any suggestion or plan on this patchset?
> 
> Hi,
> 
> I shall have a look shortly, thanks.
> 

Any chance you got some time to look into this?

Regards,
Boqun

> Lorenzo
> 
> > Thanks and Regards,
> > Boqun
> > 
> > On Mon, Feb 10, 2020 at 11:39:50AM +0800, Boqun Feng wrote:
> > > Hi,
> > > 
> > > This is the first part for virtual PCI support of Hyper-V guest on
> > > ARM64. The whole patchset doesn't have any functional change, but only
> > > refactors the pci-hyperv.c code to make it more arch-independent.
> > > 
> > > Previous version:
> > > v1: https://lore.kernel.org/lkml/20200121015713.69691-1-boqun.feng@gmail.com/
> > > v2: https://lore.kernel.org/linux-arm-kernel/20200203050313.69247-1-boqun.feng@gmail.com/
> > > 
> > > Changes since v2:
> > > 
> > > *	Rebased on 5.6-rc1
> > > 
> > > *	Reword commit logs as per Andrew's suggestion.
> > > 
> > > *	It makes more sense to have a generic interface to set the whole
> > > 	msi_entry rather than only the "address" field. So change
> > > 	hv_set_msi_address_from_desc() to hv_set_msi_entry_from_desc().
> > > 	Additionally, make it an inline function as per the suggestion
> > > 	of Andrew and Thomas.
> > > 
> > > *	Add the missing comment saying the partition_id of
> > > 	hv_retarget_device_interrupt must be self.
> > > 
> > > *	Add the explanation for why "__packed" is needed for TLFS
> > > 	structures.
> > > 
> > > I've done compile and boot test of this patchset, also done some tests
> > > with a pass-through NVMe device.
> > > 
> > > Suggestions and comments are welcome!
> > > 
> > > Regards,
> > > Boqun
> > > 
> > > Boqun Feng (3):
> > >   PCI: hv: Move hypercall related definitions into tlfs header
> > >   PCI: hv: Move retarget related structures into tlfs header
> > >   PCI: hv: Introduce hv_msi_entry
> > > 
> > >  arch/x86/include/asm/hyperv-tlfs.h  | 41 +++++++++++++++++++++++++++
> > >  arch/x86/include/asm/mshyperv.h     |  8 ++++++
> > >  drivers/pci/controller/pci-hyperv.c | 43 ++---------------------------
> > >  3 files changed, 52 insertions(+), 40 deletions(-)
> > > 
> > > -- 
> > > 2.24.1
> > >
Lorenzo Pieralisi March 9, 2020, 3:03 p.m. UTC | #4
On Mon, Mar 09, 2020 at 10:35:48PM +0800, Boqun Feng wrote:
> Hi Lorenzo,
> 
> On Fri, Feb 21, 2020 at 10:44:54AM +0000, Lorenzo Pieralisi wrote:
> > On Fri, Feb 21, 2020 at 10:33:44AM +0800, Boqun Feng wrote:
> > > Ping ;-)
> > > 
> > > Any suggestion or plan on this patchset?
> > 
> > Hi,
> > 
> > I shall have a look shortly, thanks.
> > 
> 
> Any chance you got some time to look into this?

I did last week and I applied it now, pci/hv for v5.7.

Thanks,
Lorenzo

> Regards,
> Boqun
> 
> > Lorenzo
> > 
> > > Thanks and Regards,
> > > Boqun
> > > 
> > > On Mon, Feb 10, 2020 at 11:39:50AM +0800, Boqun Feng wrote:
> > > > Hi,
> > > > 
> > > > This is the first part for virtual PCI support of Hyper-V guest on
> > > > ARM64. The whole patchset doesn't have any functional change, but only
> > > > refactors the pci-hyperv.c code to make it more arch-independent.
> > > > 
> > > > Previous version:
> > > > v1: https://lore.kernel.org/lkml/20200121015713.69691-1-boqun.feng@gmail.com/
> > > > v2: https://lore.kernel.org/linux-arm-kernel/20200203050313.69247-1-boqun.feng@gmail.com/
> > > > 
> > > > Changes since v2:
> > > > 
> > > > *	Rebased on 5.6-rc1
> > > > 
> > > > *	Reword commit logs as per Andrew's suggestion.
> > > > 
> > > > *	It makes more sense to have a generic interface to set the whole
> > > > 	msi_entry rather than only the "address" field. So change
> > > > 	hv_set_msi_address_from_desc() to hv_set_msi_entry_from_desc().
> > > > 	Additionally, make it an inline function as per the suggestion
> > > > 	of Andrew and Thomas.
> > > > 
> > > > *	Add the missing comment saying the partition_id of
> > > > 	hv_retarget_device_interrupt must be self.
> > > > 
> > > > *	Add the explanation for why "__packed" is needed for TLFS
> > > > 	structures.
> > > > 
> > > > I've done compile and boot test of this patchset, also done some tests
> > > > with a pass-through NVMe device.
> > > > 
> > > > Suggestions and comments are welcome!
> > > > 
> > > > Regards,
> > > > Boqun
> > > > 
> > > > Boqun Feng (3):
> > > >   PCI: hv: Move hypercall related definitions into tlfs header
> > > >   PCI: hv: Move retarget related structures into tlfs header
> > > >   PCI: hv: Introduce hv_msi_entry
> > > > 
> > > >  arch/x86/include/asm/hyperv-tlfs.h  | 41 +++++++++++++++++++++++++++
> > > >  arch/x86/include/asm/mshyperv.h     |  8 ++++++
> > > >  drivers/pci/controller/pci-hyperv.c | 43 ++---------------------------
> > > >  3 files changed, 52 insertions(+), 40 deletions(-)
> > > > 
> > > > -- 
> > > > 2.24.1
> > > >