Re: [Qemu-devel] AVX support for TCG

2019-01-18 Thread Stefan Hajnoczi
On Thu, Jan 17, 2019 at 03:57:08PM +0200, Nick Renieris wrote: > Just a heads up, I don't know if I want to go for this myself yet. > I'm still not sure I'll even be able to deliver the refactoring in > time (Step 2 in your list), and I hadn't even considered tests for SSE > as something I'd have

Re: [Qemu-devel] AVX support for TCG

2019-01-17 Thread Nick Renieris
Thanks Stefan, Just a heads up, I don't know if I want to go for this myself yet. I'm still not sure I'll even be able to deliver the refactoring in time (Step 2 in your list), and I hadn't even considered tests for SSE as something I'd have to do since they're already implemented. In addition,

Re: [Qemu-devel] AVX support for TCG

2019-01-17 Thread Stefan Hajnoczi
On Wed, Dec 26, 2018 at 1:29 AM Nick Renieris wrote: > Do you think this could work as a GSoC project? I'm potentially > interested in working on it this summer. Richard and Nick, You are welcome to create a GSoC project idea and post it here: https://wiki.qemu.org/Google_Summer_of_Code_2019

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Nick Renieris
Right, that makes sense, thanks for the explanations. As someone with very little x86 experience (zero experience from this perspective) it's kind of daunting that I'd have to refactor all this stuff. All these helpers via macros to get around C's 'minimalism' also seem like something I'd have to

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Richard Henderson
On 1/5/19 8:09 AM, Nick Renieris wrote: > Στις Παρ, 4 Ιαν 2019 στις 11:51 μ.μ., ο/η Richard Henderson > έγραψε: >> As an integer it is always passed by value. As a structure some host abis >> pass >> it by reference, and the TCG compiler doesn't know about that. > > Ah so they modify it? If so

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Richard Henderson
On 1/5/19 7:43 AM, Nick Renieris wrote: > Just curious, why is gvec-desc a bitfield instead of a normal struct? > Surely it'd be more readable that way. Also this is C, so it's not > even a typed bitfield, just a uint32. I'm guessing there's a reason > behind this? As an integer it is always

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Nick Renieris
Στις Σάβ, 5 Ιαν 2019 στις 12:14 π.μ., ο/η Richard Henderson έγραψε: > No, it's just calling conventions. And it could be worked around, but I think > what we have is convenient enough. > > Especially since the sizes are encoded as (n+1)*8, which also shows the > compiler that the size is

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Nick Renieris
Ohh got it, thanks. Στις Σάβ, 5 Ιαν 2019 στις 12:38 π.μ., ο/η Richard Henderson έγραψε: > > On 1/5/19 8:33 AM, Nick Renieris wrote: > > I know host ABI's can differ like that, but I don't understand why > > that should matter. Everything (TCG compiler included) is compiled > > with the same way,

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Richard Henderson
On 1/5/19 8:33 AM, Nick Renieris wrote: > I know host ABI's can differ like that, but I don't understand why > that should matter. Everything (TCG compiler included) is compiled > with the same way, right? For the host arch. No, not all of the pieces are compiled the same way. TCG generates

Re: [Qemu-devel] AVX support for TCG

2019-01-04 Thread Nick Renieris
Στις Παρ, 4 Ιαν 2019 στις 11:51 μ.μ., ο/η Richard Henderson έγραψε: > As an integer it is always passed by value. As a structure some host abis > pass > it by reference, and the TCG compiler doesn't know about that. Ah so they modify it? If so it could surely be worked around with explicit

Re: [Qemu-devel] AVX support for TCG

2018-12-30 Thread Richard Henderson
On 12/31/18 7:51 AM, Nick Renieris wrote: > The PS4's APU doesn't support AVX2 or AVX-512 so I'd be fine if I > didn't have enough time to implement them. Fair enough. A goal like this is a good thing. >> The tcg-op-gvec.h infrastructure allows for the different modes that avx+mmx >> allows: >>

Re: [Qemu-devel] AVX support for TCG

2018-12-30 Thread Nick Renieris
Στις Σάβ, 29 Δεκ 2018 στις 10:24 μ.μ., ο/η Richard Henderson έγραψε: > I did have a beginner in mind when guessing 4 months. Don't take that as a > fully speced out answer, but it may well be that full avx2 support cannot be > done within the 3 months of gsoc. I would certainly expect avx512 to

Re: [Qemu-devel] AVX support for TCG

2018-12-29 Thread Richard Henderson
On 12/29/18 12:43 AM, Nick Renieris wrote: >>> Do you think this could work as a GSoC project? I'm potentially >>> interested in working on it this summer. > >> Could be. My first guess is something like 4 months work for this. > > Four months full-time? If so I would say it's not viable for a

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Alex Bennée
On Fri, 28 Dec 2018, 13:46 Nick Renieris > Another question, are there existing discussions about this > refactoring effort or specifically AVX? I asked a similar question on > IRC a few days ago and got no answers. > You might want to try again next week. Most QEMU hackers are away for the

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Nick Renieris
Στις Παρ, 28 Δεκ 2018 στις 4:39 μ.μ., ο/η Peter Maydell έγραψε: > If your editor can't show multiple views onto one file with > the same simplicity and UI as it has for multiple different > files then I would suggest getting a better editor :-) Apparently I just didn't know how to use my editor

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Peter Maydell
On Fri, 28 Dec 2018 at 14:28, Nick Renieris wrote: > Right, thanks, that file looks better, though I still think splitting > to multiple files would absolutely be of value, if only for the > practicality of being able to have several parts of it open at the > same in a code editor (instead of

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Nick Renieris
Right, thanks, that file looks better, though I still think splitting to multiple files would absolutely be of value, if only for the practicality of being able to have several parts of it open at the same in a code editor (instead of having to jump back and forth or find workarounds to open the

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Peter Maydell
On Fri, 28 Dec 2018 at 13:45, Nick Renieris wrote: > Also, I hope you meant four months for me, not for you - I'm > completely new to the QEMU codebase. I expect it will take me weeks > just to understand x86's 'translate.c' (who thought it'd be a good > idea to put all this stuff in _one_

Re: [Qemu-devel] AVX support for TCG

2018-12-28 Thread Nick Renieris
>> Do you think this could work as a GSoC project? I'm potentially >> interested in working on it this summer. >Could be. My first guess is something like 4 months work for this. Four months full-time? If so I would say it's not viable for a GSoC project (it's 3 months), I've done the

Re: [Qemu-devel] AVX support for TCG

2018-12-25 Thread Richard Henderson
On 12/26/18 12:28 PM, Nick Renieris wrote: > Hi Richard, > > I did know about https://github.com/andikleen/qemu-avx but didn't > mention it as it seems abandoned and quite old (also it doesn't use > `TCGv_vec`). Yep. Mine pre-dates tcg-op-gvec.h as well. > Do you think this could work as a

Re: [Qemu-devel] AVX support for TCG

2018-12-25 Thread Nick Renieris
Hi Richard, I did know about https://github.com/andikleen/qemu-avx but didn't mention it as it seems abandoned and quite old (also it doesn't use `TCGv_vec`). Do you think this could work as a GSoC project? I'm potentially interested in working on it this summer. Thanks, Nick R. Στις Τετ, 26

Re: [Qemu-devel] AVX support for TCG

2018-12-25 Thread Richard Henderson
On 12/26/18 10:43 AM, Nick Renieris wrote: > Hello, > > What's the current status on AVX support for TCG? Is there anyone working on > it? > Is there interest for it? A couple of people, including myself, have started on it, but no results posted so far. It's a large amount of work to clean up

[Qemu-devel] AVX support for TCG

2018-12-25 Thread Nick Renieris
Hello, What's the current status on AVX support for TCG? Is there anyone working on it? Is there interest for it? Effort was put into making 'TCGv_vec', as elaborated in this talk: "[2017] Vectoring in on QEMU's TCG Engine by Alex Bennée" (https://www.youtube.com/watch?v=IYHTwnde0g8) ,yet