Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Jan, > On 21 Apr 2021, at 10:33 am, Jan Beulich wrote: > > On 21.04.2021 11:15, Rahul Singh wrote: >> Hi Roger, >> >>> On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: >>> >>> On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: Hi Jan, > On 20 Apr 2021, at 4:36 pm

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 11:15, Rahul Singh wrote: > Hi Roger, > >> On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: >> >> On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >>> Hi Jan, >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: On 20.04.2021 15:45, Rahul Singh wrote: >>>

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 10:16, Roger Pau Monné wrote: > On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >> Hi Jan, >> >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >>> >>> On 20.04.2021 15:45, Rahul Singh wrote: > On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: > On 19.04.2021 13:5

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Roger, > On 21 Apr 2021, at 9:16 am, Roger Pau Monné wrote: > > On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: >> Hi Jan, >> >>> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >>> >>> On 20.04.2021 15:45, Rahul Singh wrote: > On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Jan Beulich
On 21.04.2021 10:07, Rahul Singh wrote: > Hi Jan, > >> On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: >> >> On 20.04.2021 15:45, Rahul Singh wrote: On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: On 19.04.2021 13:54, Julien Grall wrote: > For the time being, I think move this code i

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Roger Pau Monné
On Wed, Apr 21, 2021 at 08:07:08AM +, Rahul Singh wrote: > Hi Jan, > > > On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: > > > > On 20.04.2021 15:45, Rahul Singh wrote: > >>> On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: > >>> On 19.04.2021 13:54, Julien Grall wrote: > For the time bei

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-21 Thread Rahul Singh
Hi Jan, > On 20 Apr 2021, at 4:36 pm, Jan Beulich wrote: > > On 20.04.2021 15:45, Rahul Singh wrote: >>> On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: >>> On 19.04.2021 13:54, Julien Grall wrote: For the time being, I think move this code in x86 is a lot better than #ifdef or keep t

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-20 Thread Jan Beulich
On 20.04.2021 15:45, Rahul Singh wrote: >> On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: >> On 19.04.2021 13:54, Julien Grall wrote: >>> For the time being, I think move this code in x86 is a lot better than >>> #ifdef or keep the code in common code. >> >> Well, I would perhaps agree if it ende

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-20 Thread Rahul Singh
Hi Jan > On 19 Apr 2021, at 1:33 pm, Jan Beulich wrote: > > On 19.04.2021 13:54, Julien Grall wrote: >> For the time being, I think move this code in x86 is a lot better than >> #ifdef or keep the code in common code. > > Well, I would perhaps agree if it ended up being #ifdef CONFIG_X86. > I

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-19 Thread Jan Beulich
On 19.04.2021 13:54, Julien Grall wrote: > For the time being, I think move this code in x86 is a lot better than > #ifdef or keep the code in common code. Well, I would perhaps agree if it ended up being #ifdef CONFIG_X86. I would perhaps not agree if there was a new CONFIG_* which other (future

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-19 Thread Julien Grall
On 19/04/2021 12:16, Jan Beulich wrote: On 19.04.2021 10:40, Roger Pau Monné wrote: On Mon, Apr 19, 2021 at 07:16:52AM +, Rahul Singh wrote: Thanks you everyone for reviewing the code. I will summarise what I have understood from all the comments and what I will be doing for the next ve

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-19 Thread Jan Beulich
On 19.04.2021 10:40, Roger Pau Monné wrote: > On Mon, Apr 19, 2021 at 07:16:52AM +, Rahul Singh wrote: >> Thanks you everyone for reviewing the code. I will summarise what I have >> understood from all the comments >> and what I will be doing for the next version of the patch. Please let me

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-19 Thread Roger Pau Monné
On Mon, Apr 19, 2021 at 07:16:52AM +, Rahul Singh wrote: > Thanks you everyone for reviewing the code. I will summarise what I have > understood from all the comments > and what I will be doing for the next version of the patch. Please let me > know your view on this. > > 1. Create a separ

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-19 Thread Rahul Singh
Hi All, > On 15 Apr 2021, at 2:31 pm, Julien Grall wrote: > > Hi Roger, > > On 15/04/2021 14:26, Roger Pau Monné wrote: >> On Wed, Apr 14, 2021 at 09:49:37AM +0100, Julien Grall wrote: >>> Hi Roger, >>> >>> On 14/04/2021 09:05, Roger Pau Monné wrote: On Tue, Apr 13, 2021 at 06:12:10PM +01

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-15 Thread Julien Grall
Hi Roger, On 15/04/2021 14:26, Roger Pau Monné wrote: On Wed, Apr 14, 2021 at 09:49:37AM +0100, Julien Grall wrote: Hi Roger, On 14/04/2021 09:05, Roger Pau Monné wrote: On Tue, Apr 13, 2021 at 06:12:10PM +0100, Julien Grall wrote: Hi Roger, On 12/04/2021 11:49, Roger Pau Monné wrote: On F

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-15 Thread Roger Pau Monné
On Wed, Apr 14, 2021 at 09:49:37AM +0100, Julien Grall wrote: > Hi Roger, > > On 14/04/2021 09:05, Roger Pau Monné wrote: > > On Tue, Apr 13, 2021 at 06:12:10PM +0100, Julien Grall wrote: > > > Hi Roger, > > > > > > On 12/04/2021 11:49, Roger Pau Monné wrote: > > > > On Fri, Apr 09, 2021 at 05:00

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Julien Grall
Hi Roger, On 14/04/2021 09:05, Roger Pau Monné wrote: On Tue, Apr 13, 2021 at 06:12:10PM +0100, Julien Grall wrote: Hi Roger, On 12/04/2021 11:49, Roger Pau Monné wrote: On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/pass

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Jan Beulich
On 14.04.2021 10:28, Roger Pau Monné wrote: > On Wed, Apr 14, 2021 at 09:08:53AM +0200, Jan Beulich wrote: >> On 13.04.2021 19:12, Julien Grall wrote: >>> On 12/04/2021 11:49, Roger Pau Monné wrote: On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: > --- a/xen/include/xen/vpci.h

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Julien Grall
Hi Jan, On 14/04/2021 08:08, Jan Beulich wrote: On 13.04.2021 19:12, Julien Grall wrote: On 12/04/2021 11:49, Roger Pau Monné wrote: On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: --- a/xen/include/xen/vpci.h +++ b/xen/include/xen/vpci.h @@ -91,6 +91,7 @@ struct vpci {

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Roger Pau Monné
On Wed, Apr 14, 2021 at 09:08:53AM +0200, Jan Beulich wrote: > On 13.04.2021 19:12, Julien Grall wrote: > > On 12/04/2021 11:49, Roger Pau Monné wrote: > >> On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: > >>> --- a/xen/include/xen/vpci.h > >>> +++ b/xen/include/xen/vpci.h > >>> @@ -9

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Roger Pau Monné
On Tue, Apr 13, 2021 at 06:12:10PM +0100, Julien Grall wrote: > Hi Roger, > > On 12/04/2021 11:49, Roger Pau Monné wrote: > > On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: > > > diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c > > > index 705137f8be..1b4735

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-14 Thread Jan Beulich
On 13.04.2021 19:12, Julien Grall wrote: > On 12/04/2021 11:49, Roger Pau Monné wrote: >> On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: >>> --- a/xen/include/xen/vpci.h >>> +++ b/xen/include/xen/vpci.h >>> @@ -91,6 +91,7 @@ struct vpci { >>> /* FIXME: currently there's no s

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-13 Thread Julien Grall
Hi Roger, On 12/04/2021 11:49, Roger Pau Monné wrote: On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: MSI related code in the "passthrough/pci.c” file is not useful for ARM when MSI interrupts are injected via GICv3 ITS. Therefore introducing the new flag CONFIG_PCI_MSI_INTERCEPT

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-12 Thread Rahul Singh
Hi Jan, > On 12 Apr 2021, at 12:28 pm, Jan Beulich wrote: > > On 12.04.2021 12:49, Roger Pau Monné wrote: >> On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: >>> --- a/xen/arch/x86/msi.c >>> +++ b/xen/arch/x86/msi.c >>> @@ -1411,6 +1411,70 @@ void __init early_msi_init(void) >>>

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-12 Thread Rahul Singh
Hi Roger, > On 12 Apr 2021, at 11:49 am, Roger Pau Monné wrote: > > On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: >> MSI related code in the "passthrough/pci.c” file is not useful for ARM >> when MSI interrupts are injected via GICv3 ITS. >> >> Therefore introducing the new flag

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-12 Thread Jan Beulich
On 12.04.2021 12:49, Roger Pau Monné wrote: > On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: >> --- a/xen/arch/x86/msi.c >> +++ b/xen/arch/x86/msi.c >> @@ -1411,6 +1411,70 @@ void __init early_msi_init(void) >> return; >> } >> >> +int alloc_pci_msi(struct pci_dev *pdev) >

Re: [PATCH v2] xen/pci: Refactor PCI MSI interrupts related code

2021-04-12 Thread Roger Pau Monné
On Fri, Apr 09, 2021 at 05:00:41PM +0100, Rahul Singh wrote: > MSI related code in the "passthrough/pci.c” file is not useful for ARM > when MSI interrupts are injected via GICv3 ITS. > > Therefore introducing the new flag CONFIG_PCI_MSI_INTERCEPT to gate the > MSI code for ARM in common code. Als