Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-27 Thread David Gibson
On Mon, Feb 25, 2019 at 05:39:06PM +1100, Alexey Kardashevskiy wrote:
> 
> 
> On 15/02/2019 16:21, David Gibson wrote:
> > On Fri, Feb 15, 2019 at 03:34:52PM +1100, Alexey Kardashevskiy wrote:
> >>
> >>
> >> On 15/02/2019 14:54, David Gibson wrote:
> >>> On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote:
> 
> 
>  On 15/02/2019 14:24, David Gibson wrote:
> > On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
> >>
> >>
> >> On 15/02/2019 10:37, Alex Williamson wrote:
> >>> On Thu, 14 Feb 2019 16:21:40 +1100
> >>> Alexey Kardashevskiy  wrote:
> >>>
>  This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> 
>  This implements a subdriver for NVIDIA V100 GPU with coherent memory 
>  and
>  NPU/ATS support available in the POWER9 CPU.
> 
>  1/4 is a preparation for bigger DMA windows.
>  2/4 is a small cleanup.
> 
>  Here is the kernel driver:
>  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> 
>  SLOF changes already went in.
> 
>  This depends on "pci: Move NVIDIA vendor id to the rest of ids" 
>  (posted separately).
> >>>
> >>> TBH, I'm not sure it was the best idea to let it live or die on it's
> >>> own when it now creates a build dependency for this series.
> >> I am sure that patch is disgustingly primitive and can make it to
> >> upstream in just one click and the rest of the series will take more
> >> time anyway (always does :) ).
> >>
>  This is based on sha1
>  1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem 
>  for mac99 machine".
> >>>
> >>> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> >>> there dependencies we need to wait for in the ppc tree as well?
> >>
> >> There are few changes in spapr_pci so conflicts are possible, every 
> >> time
> >> when David updates his tree and I rebase I get some minor ones.
> >>
>  Please comment. Thanks.
> >>>
> >>> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> >>>
> >>> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> >>> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used 
> >>> uninitialized in this function [-Werror=maybe-uninitialized]
> >>>  error_report("Failed to create a window, ret = %d (%m)", 
> >>> ret);
> >>>  ^
> >>> cc1: all warnings being treated as errors
> >>
> >> Agrh. How exactly do you make them errors, not warnings? I get no
> >> warning/error with --disable-werror but not having  --disable-werror
> >> prints warnings, not errors so it does not fail the build and easy to 
> >> miss.
> >
> > Are you sure it's printing warnings with --enable-werror?  Otherwise
> > it sounds like you just have a compiler version that's not picking
> > this up.
> 
>  Ah, here is my mistake - I thought not having --disable-werror means
>  that it is enabled as ./configure does not advertise  "--enable-werror":
> 
>  [fstn1-p1 qemu]$ ./configure --help | grep werror
>    --disable-werror disable compilation abort on warning
> 
> 
>  Apparently it is a tri-state flag :)
> >>>
> >>> Um.. no.. I believe it should be on by default as well, I was just
> >>> saying --enable-werror because I thought it was clearer than the
> >>> double negative in "without --disable-werror".
> >>
> >> The default value of werror is "":
> >>
> >> https://git.qemu.org/?p=qemu.git;a=blob;f=configure;h=a61682c3c727f467ce2710c7469a33b261da8ff6;hb=HEAD#l935
> > 
> > Which turns into a "yes" on Linux - see line 1835-1844.
> 
> 
> No it does not - the 'test -d "$source_path/.git"' fails as "git
> worktree" makes .git a file, not a folder.

Oh, right.  Turns into a "yes" for people who don't have weird git
setups :-p.  Care to submit a patch to make it do the right thing in
your setup?

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-24 Thread Alexey Kardashevskiy



On 15/02/2019 16:21, David Gibson wrote:
> On Fri, Feb 15, 2019 at 03:34:52PM +1100, Alexey Kardashevskiy wrote:
>>
>>
>> On 15/02/2019 14:54, David Gibson wrote:
>>> On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote:


 On 15/02/2019 14:24, David Gibson wrote:
> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
>>
>>
>> On 15/02/2019 10:37, Alex Williamson wrote:
>>> On Thu, 14 Feb 2019 16:21:40 +1100
>>> Alexey Kardashevskiy  wrote:
>>>
 This is for passing through NVIDIA V100 GPUs on POWER9 systems.

 This implements a subdriver for NVIDIA V100 GPU with coherent memory 
 and
 NPU/ATS support available in the POWER9 CPU.

 1/4 is a preparation for bigger DMA windows.
 2/4 is a small cleanup.

 Here is the kernel driver:
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a

 SLOF changes already went in.

 This depends on "pci: Move NVIDIA vendor id to the rest of ids" 
 (posted separately).
>>>
>>> TBH, I'm not sure it was the best idea to let it live or die on it's
>>> own when it now creates a build dependency for this series.
>> I am sure that patch is disgustingly primitive and can make it to
>> upstream in just one click and the rest of the series will take more
>> time anyway (always does :) ).
>>
 This is based on sha1
 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem 
 for mac99 machine".
>>>
>>> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
>>> there dependencies we need to wait for in the ppc tree as well?
>>
>> There are few changes in spapr_pci so conflicts are possible, every time
>> when David updates his tree and I rebase I get some minor ones.
>>
 Please comment. Thanks.
>>>
>>> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
>>>
>>> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
>>> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used 
>>> uninitialized in this function [-Werror=maybe-uninitialized]
>>>  error_report("Failed to create a window, ret = %d (%m)", ret);
>>>  ^
>>> cc1: all warnings being treated as errors
>>
>> Agrh. How exactly do you make them errors, not warnings? I get no
>> warning/error with --disable-werror but not having  --disable-werror
>> prints warnings, not errors so it does not fail the build and easy to 
>> miss.
>
> Are you sure it's printing warnings with --enable-werror?  Otherwise
> it sounds like you just have a compiler version that's not picking
> this up.

 Ah, here is my mistake - I thought not having --disable-werror means
 that it is enabled as ./configure does not advertise  "--enable-werror":

 [fstn1-p1 qemu]$ ./configure --help | grep werror
   --disable-werror disable compilation abort on warning


 Apparently it is a tri-state flag :)
>>>
>>> Um.. no.. I believe it should be on by default as well, I was just
>>> saying --enable-werror because I thought it was clearer than the
>>> double negative in "without --disable-werror".
>>
>> The default value of werror is "":
>>
>> https://git.qemu.org/?p=qemu.git;a=blob;f=configure;h=a61682c3c727f467ce2710c7469a33b261da8ff6;hb=HEAD#l935
> 
> Which turns into a "yes" on Linux - see line 1835-1844.


No it does not - the 'test -d "$source_path/.git"' fails as "git
worktree" makes .git a file, not a folder.



-- 
Alexey



Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-15 Thread David Gibson
On Fri, Feb 15, 2019 at 03:34:52PM +1100, Alexey Kardashevskiy wrote:
> 
> 
> On 15/02/2019 14:54, David Gibson wrote:
> > On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote:
> >>
> >>
> >> On 15/02/2019 14:24, David Gibson wrote:
> >>> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
> 
> 
>  On 15/02/2019 10:37, Alex Williamson wrote:
> > On Thu, 14 Feb 2019 16:21:40 +1100
> > Alexey Kardashevskiy  wrote:
> >
> >> This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> >>
> >> This implements a subdriver for NVIDIA V100 GPU with coherent memory 
> >> and
> >> NPU/ATS support available in the POWER9 CPU.
> >>
> >> 1/4 is a preparation for bigger DMA windows.
> >> 2/4 is a small cleanup.
> >>
> >> Here is the kernel driver:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> >>
> >> SLOF changes already went in.
> >>
> >> This depends on "pci: Move NVIDIA vendor id to the rest of ids" 
> >> (posted separately).
> >
> > TBH, I'm not sure it was the best idea to let it live or die on it's
> > own when it now creates a build dependency for this series.
>  I am sure that patch is disgustingly primitive and can make it to
>  upstream in just one click and the rest of the series will take more
>  time anyway (always does :) ).
> 
> >> This is based on sha1
> >> 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem 
> >> for mac99 machine".
> >
> > Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> > there dependencies we need to wait for in the ppc tree as well?
> 
>  There are few changes in spapr_pci so conflicts are possible, every time
>  when David updates his tree and I rebase I get some minor ones.
> 
> >> Please comment. Thanks.
> >
> > Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> >
> > .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> > .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used 
> > uninitialized in this function [-Werror=maybe-uninitialized]
> >  error_report("Failed to create a window, ret = %d (%m)", ret);
> >  ^
> > cc1: all warnings being treated as errors
> 
>  Agrh. How exactly do you make them errors, not warnings? I get no
>  warning/error with --disable-werror but not having  --disable-werror
>  prints warnings, not errors so it does not fail the build and easy to 
>  miss.
> >>>
> >>> Are you sure it's printing warnings with --enable-werror?  Otherwise
> >>> it sounds like you just have a compiler version that's not picking
> >>> this up.
> >>
> >> Ah, here is my mistake - I thought not having --disable-werror means
> >> that it is enabled as ./configure does not advertise  "--enable-werror":
> >>
> >> [fstn1-p1 qemu]$ ./configure --help | grep werror
> >>   --disable-werror disable compilation abort on warning
> >>
> >>
> >> Apparently it is a tri-state flag :)
> > 
> > Um.. no.. I believe it should be on by default as well, I was just
> > saying --enable-werror because I thought it was clearer than the
> > double negative in "without --disable-werror".
> 
> The default value of werror is "":
> 
> https://git.qemu.org/?p=qemu.git;a=blob;f=configure;h=a61682c3c727f467ce2710c7469a33b261da8ff6;hb=HEAD#l935

Which turns into a "yes" on Linux - see line 1835-1844.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy



On 15/02/2019 14:54, David Gibson wrote:
> On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote:
>>
>>
>> On 15/02/2019 14:24, David Gibson wrote:
>>> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:


 On 15/02/2019 10:37, Alex Williamson wrote:
> On Thu, 14 Feb 2019 16:21:40 +1100
> Alexey Kardashevskiy  wrote:
>
>> This is for passing through NVIDIA V100 GPUs on POWER9 systems.
>>
>> This implements a subdriver for NVIDIA V100 GPU with coherent memory and
>> NPU/ATS support available in the POWER9 CPU.
>>
>> 1/4 is a preparation for bigger DMA windows.
>> 2/4 is a small cleanup.
>>
>> Here is the kernel driver:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
>>
>> SLOF changes already went in.
>>
>> This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
>> separately).
>
> TBH, I'm not sure it was the best idea to let it live or die on it's
> own when it now creates a build dependency for this series.
 I am sure that patch is disgustingly primitive and can make it to
 upstream in just one click and the rest of the series will take more
 time anyway (always does :) ).

>> This is based on sha1
>> 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
>> mac99 machine".
>
> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> there dependencies we need to wait for in the ppc tree as well?

 There are few changes in spapr_pci so conflicts are possible, every time
 when David updates his tree and I rebase I get some minor ones.

>> Please comment. Thanks.
>
> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
>
> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used 
> uninitialized in this function [-Werror=maybe-uninitialized]
>  error_report("Failed to create a window, ret = %d (%m)", ret);
>  ^
> cc1: all warnings being treated as errors

 Agrh. How exactly do you make them errors, not warnings? I get no
 warning/error with --disable-werror but not having  --disable-werror
 prints warnings, not errors so it does not fail the build and easy to miss.
>>>
>>> Are you sure it's printing warnings with --enable-werror?  Otherwise
>>> it sounds like you just have a compiler version that's not picking
>>> this up.
>>
>> Ah, here is my mistake - I thought not having --disable-werror means
>> that it is enabled as ./configure does not advertise  "--enable-werror":
>>
>> [fstn1-p1 qemu]$ ./configure --help | grep werror
>>   --disable-werror disable compilation abort on warning
>>
>>
>> Apparently it is a tri-state flag :)
> 
> Um.. no.. I believe it should be on by default as well, I was just
> saying --enable-werror because I thought it was clearer than the
> double negative in "without --disable-werror".

The default value of werror is "":

https://git.qemu.org/?p=qemu.git;a=blob;f=configure;h=a61682c3c727f467ce2710c7469a33b261da8ff6;hb=HEAD#l935



-- 
Alexey



Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote:
> 
> 
> On 15/02/2019 14:24, David Gibson wrote:
> > On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
> >>
> >>
> >> On 15/02/2019 10:37, Alex Williamson wrote:
> >>> On Thu, 14 Feb 2019 16:21:40 +1100
> >>> Alexey Kardashevskiy  wrote:
> >>>
>  This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> 
>  This implements a subdriver for NVIDIA V100 GPU with coherent memory and
>  NPU/ATS support available in the POWER9 CPU.
> 
>  1/4 is a preparation for bigger DMA windows.
>  2/4 is a small cleanup.
> 
>  Here is the kernel driver:
>  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> 
>  SLOF changes already went in.
> 
>  This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
>  separately).
> >>>
> >>> TBH, I'm not sure it was the best idea to let it live or die on it's
> >>> own when it now creates a build dependency for this series.
> >> I am sure that patch is disgustingly primitive and can make it to
> >> upstream in just one click and the rest of the series will take more
> >> time anyway (always does :) ).
> >>
>  This is based on sha1
>  1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
>  mac99 machine".
> >>>
> >>> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> >>> there dependencies we need to wait for in the ppc tree as well?
> >>
> >> There are few changes in spapr_pci so conflicts are possible, every time
> >> when David updates his tree and I rebase I get some minor ones.
> >>
>  Please comment. Thanks.
> >>>
> >>> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> >>>
> >>> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> >>> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used 
> >>> uninitialized in this function [-Werror=maybe-uninitialized]
> >>>  error_report("Failed to create a window, ret = %d (%m)", ret);
> >>>  ^
> >>> cc1: all warnings being treated as errors
> >>
> >> Agrh. How exactly do you make them errors, not warnings? I get no
> >> warning/error with --disable-werror but not having  --disable-werror
> >> prints warnings, not errors so it does not fail the build and easy to miss.
> > 
> > Are you sure it's printing warnings with --enable-werror?  Otherwise
> > it sounds like you just have a compiler version that's not picking
> > this up.
> 
> Ah, here is my mistake - I thought not having --disable-werror means
> that it is enabled as ./configure does not advertise  "--enable-werror":
> 
> [fstn1-p1 qemu]$ ./configure --help | grep werror
>   --disable-werror disable compilation abort on warning
> 
> 
> Apparently it is a tri-state flag :)

Um.. no.. I believe it should be on by default as well, I was just
saying --enable-werror because I thought it was clearer than the
double negative in "without --disable-werror".

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 04:37:43PM -0700, Alex Williamson wrote:
> On Thu, 14 Feb 2019 16:21:40 +1100
> Alexey Kardashevskiy  wrote:
> 
> > This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> > 
> > This implements a subdriver for NVIDIA V100 GPU with coherent memory and
> > NPU/ATS support available in the POWER9 CPU.
> > 
> > 1/4 is a preparation for bigger DMA windows.
> > 2/4 is a small cleanup.
> > 
> > Here is the kernel driver:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> > 
> > SLOF changes already went in.
> > 
> > This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
> > separately).
> 
> TBH, I'm not sure it was the best idea to let it live or die on it's
> own when it now creates a build dependency for this series.

I'd suggest folding it into this series for reconsideration - the
original post's clearly been lost track of.

> 
> > This is based on sha1
> > 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
> > mac99 machine".
> 
> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> there dependencies we need to wait for in the ppc tree as well?
> 
> > Please comment. Thanks.
> 
> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> 
> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used uninitialized in 
> this function [-Werror=maybe-uninitialized]
>  error_report("Failed to create a window, ret = %d (%m)", ret);
>  ^
> cc1: all warnings being treated as errors
> 
> Is this series expected to go in through the ppc branch given the bulk
> of the changes are there?  Thanks,
> 
> Alex
> 

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
> 
> 
> On 15/02/2019 10:37, Alex Williamson wrote:
> > On Thu, 14 Feb 2019 16:21:40 +1100
> > Alexey Kardashevskiy  wrote:
> > 
> >> This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> >>
> >> This implements a subdriver for NVIDIA V100 GPU with coherent memory and
> >> NPU/ATS support available in the POWER9 CPU.
> >>
> >> 1/4 is a preparation for bigger DMA windows.
> >> 2/4 is a small cleanup.
> >>
> >> Here is the kernel driver:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> >>
> >> SLOF changes already went in.
> >>
> >> This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
> >> separately).
> > 
> > TBH, I'm not sure it was the best idea to let it live or die on it's
> > own when it now creates a build dependency for this series.
> I am sure that patch is disgustingly primitive and can make it to
> upstream in just one click and the rest of the series will take more
> time anyway (always does :) ).
> 
> >> This is based on sha1
> >> 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
> >> mac99 machine".
> > 
> > Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> > there dependencies we need to wait for in the ppc tree as well?
> 
> There are few changes in spapr_pci so conflicts are possible, every time
> when David updates his tree and I rebase I get some minor ones.
> 
> >> Please comment. Thanks.
> > 
> > Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> > 
> > .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> > .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used uninitialized 
> > in this function [-Werror=maybe-uninitialized]
> >  error_report("Failed to create a window, ret = %d (%m)", ret);
> >  ^
> > cc1: all warnings being treated as errors
> 
> Agrh. How exactly do you make them errors, not warnings? I get no
> warning/error with --disable-werror but not having  --disable-werror
> prints warnings, not errors so it does not fail the build and easy to miss.

Are you sure it's printing warnings with --enable-werror?  Otherwise
it sounds like you just have a compiler version that's not picking
this up.

> > Is this series expected to go in through the ppc branch given the bulk
> > of the changes are there?  Thanks,
> 
> I think so.
> 
> 

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy



On 15/02/2019 14:24, David Gibson wrote:
> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote:
>>
>>
>> On 15/02/2019 10:37, Alex Williamson wrote:
>>> On Thu, 14 Feb 2019 16:21:40 +1100
>>> Alexey Kardashevskiy  wrote:
>>>
 This is for passing through NVIDIA V100 GPUs on POWER9 systems.

 This implements a subdriver for NVIDIA V100 GPU with coherent memory and
 NPU/ATS support available in the POWER9 CPU.

 1/4 is a preparation for bigger DMA windows.
 2/4 is a small cleanup.

 Here is the kernel driver:
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a

 SLOF changes already went in.

 This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
 separately).
>>>
>>> TBH, I'm not sure it was the best idea to let it live or die on it's
>>> own when it now creates a build dependency for this series.
>> I am sure that patch is disgustingly primitive and can make it to
>> upstream in just one click and the rest of the series will take more
>> time anyway (always does :) ).
>>
 This is based on sha1
 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
 mac99 machine".
>>>
>>> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
>>> there dependencies we need to wait for in the ppc tree as well?
>>
>> There are few changes in spapr_pci so conflicts are possible, every time
>> when David updates his tree and I rebase I get some minor ones.
>>
 Please comment. Thanks.
>>>
>>> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
>>>
>>> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
>>> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used uninitialized 
>>> in this function [-Werror=maybe-uninitialized]
>>>  error_report("Failed to create a window, ret = %d (%m)", ret);
>>>  ^
>>> cc1: all warnings being treated as errors
>>
>> Agrh. How exactly do you make them errors, not warnings? I get no
>> warning/error with --disable-werror but not having  --disable-werror
>> prints warnings, not errors so it does not fail the build and easy to miss.
> 
> Are you sure it's printing warnings with --enable-werror?  Otherwise
> it sounds like you just have a compiler version that's not picking
> this up.

Ah, here is my mistake - I thought not having --disable-werror means
that it is enabled as ./configure does not advertise  "--enable-werror":

[fstn1-p1 qemu]$ ./configure --help | grep werror
  --disable-werror disable compilation abort on warning


Apparently it is a tri-state flag :)


> 
>>> Is this series expected to go in through the ppc branch given the bulk
>>> of the changes are there?  Thanks,
>>
>> I think so.
>>
>>
> 

-- 
Alexey



Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy



On 15/02/2019 10:37, Alex Williamson wrote:
> On Thu, 14 Feb 2019 16:21:40 +1100
> Alexey Kardashevskiy  wrote:
> 
>> This is for passing through NVIDIA V100 GPUs on POWER9 systems.
>>
>> This implements a subdriver for NVIDIA V100 GPU with coherent memory and
>> NPU/ATS support available in the POWER9 CPU.
>>
>> 1/4 is a preparation for bigger DMA windows.
>> 2/4 is a small cleanup.
>>
>> Here is the kernel driver:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
>>
>> SLOF changes already went in.
>>
>> This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
>> separately).
> 
> TBH, I'm not sure it was the best idea to let it live or die on it's
> own when it now creates a build dependency for this series.
I am sure that patch is disgustingly primitive and can make it to
upstream in just one click and the rest of the series will take more
time anyway (always does :) ).

>> This is based on sha1
>> 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
>> mac99 machine".
> 
> Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
> there dependencies we need to wait for in the ppc tree as well?

There are few changes in spapr_pci so conflicts are possible, every time
when David updates his tree and I rebase I get some minor ones.

>> Please comment. Thanks.
> 
> Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:
> 
> .../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
> .../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used uninitialized in 
> this function [-Werror=maybe-uninitialized]
>  error_report("Failed to create a window, ret = %d (%m)", ret);
>  ^
> cc1: all warnings being treated as errors

Agrh. How exactly do you make them errors, not warnings? I get no
warning/error with --disable-werror but not having  --disable-werror
prints warnings, not errors so it does not fail the build and easy to miss.

> Is this series expected to go in through the ppc branch given the bulk
> of the changes are there?  Thanks,

I think so.


-- 
Alexey



Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alex Williamson
On Thu, 14 Feb 2019 16:21:40 +1100
Alexey Kardashevskiy  wrote:

> This is for passing through NVIDIA V100 GPUs on POWER9 systems.
> 
> This implements a subdriver for NVIDIA V100 GPU with coherent memory and
> NPU/ATS support available in the POWER9 CPU.
> 
> 1/4 is a preparation for bigger DMA windows.
> 2/4 is a small cleanup.
> 
> Here is the kernel driver:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a
> 
> SLOF changes already went in.
> 
> This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
> separately).

TBH, I'm not sure it was the best idea to let it live or die on it's
own when it now creates a build dependency for this series.

> This is based on sha1
> 1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for 
> mac99 machine".

Perhaps this is why it doesn't apply cleanly against qemu.git.  Are
there dependencies we need to wait for in the ppc tree as well?

> Please comment. Thanks.

Besides the build dependency on PCI_VENDOR_ID_NVIDIA, I also get this:

.../qemu.git/hw/vfio/spapr.c: In function ‘vfio_spapr_create_window’:
.../qemu.git/hw/vfio/spapr.c:212:9: error: ‘ret’ may be used uninitialized in 
this function [-Werror=maybe-uninitialized]
 error_report("Failed to create a window, ret = %d (%m)", ret);
 ^
cc1: all warnings being treated as errors

Is this series expected to go in through the ppc branch given the bulk
of the changes are there?  Thanks,

Alex



[Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-13 Thread Alexey Kardashevskiy
This is for passing through NVIDIA V100 GPUs on POWER9 systems.

This implements a subdriver for NVIDIA V100 GPU with coherent memory and
NPU/ATS support available in the POWER9 CPU.

1/4 is a preparation for bigger DMA windows.
2/4 is a small cleanup.

Here is the kernel driver:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci?h=v5.0-rc6=7f92891778dff62303c070ac81de7b7d80de331a

SLOF changes already went in.

This depends on "pci: Move NVIDIA vendor id to the rest of ids" (posted 
separately).

This is based on sha1
1ea6057 Mark Cave-Ayland "mac_newworld: change default NIC to sungem for mac99 
machine".

Please comment. Thanks.



Alexey Kardashevskiy (4):
  vfio/spapr: Fix indirect levels calculation
  vfio/spapr: Rename local systempagesize variable
  vfio: Make vfio_get_region_info_cap public
  spapr: Support NVIDIA V100 GPU with NVLink2

 hw/vfio/pci.h |   2 +
 include/hw/pci-host/spapr.h   |   9 +
 include/hw/ppc/spapr.h|   3 +-
 include/hw/vfio/vfio-common.h |   2 +
 hw/ppc/spapr.c|  25 ++-
 hw/ppc/spapr_pci.c| 333 +-
 hw/vfio/common.c  |   2 +-
 hw/vfio/pci-quirks.c  | 120 
 hw/vfio/pci.c |  14 ++
 hw/vfio/spapr.c   |  47 +++--
 hw/vfio/trace-events  |   6 +-
 11 files changed, 545 insertions(+), 18 deletions(-)

-- 
2.17.1