Skip to contentSkip to conversation

Support for AVX within TCG: Work Product Submission

Qemu-devel Jan Bobek 2 participants 2 messages Aug 25, 2019 – Aug 27, 2019

lore
Share & tools
lore

Jan Bobek

author
#0 lore raw

Hi folks,

those of you who have been keeping up with Google Summer of Code this year might know that it's nearly over -- meaning that it's time for me to summarize all the work that I have done as a participant. Without further ado, you can find the summary attached below.

Huge thanks to everyone who made this possible!

Best,
-Jan Bobek

----

GSOC WORK PRODUCT SUBMISSION

TITLE: Support for AVX within TCG
DATE: 08/25/2019
AUTHOR: Jan Bobek <[email protected]>
MENTOR: Richard Henderson <[email protected]>

I. SUMMARY

The goal of this GSoC project was to implement support for AVX instructions in the i386 TCG front-end. The project was effectively split up into two parts:

- extending RISU [1] with the ability to generate and test x86

    instruction streams (to properly test the new AVX implementation);

- the actual work on AVX instructions in the i386 TCG front-end.

II. RISU CHANGES

There have been two patch series with changes to RISU:

- The first one [2] adds support for testing x86 instruction sequences, and has been merged as early as June 7, 2019.

- The second series [3] implements generation of x86 instruction streams using vector instructions up to AVX2; its latest iteration has not been merged yet due to several more or less minor issues raised during code review.

Despite the second series not being merged yet, the implemented functionality was considered sufficient and a decision was made to proceed to the next stage of the project [4].

III. QEMU CHANGES

All QEMU changes related to this project are included in a single extensive patch series [5]; previous iterations can be found at [6],
[7] and [8].

The series features:

- brand-new infrastructure for instruction decoding;

- support for decoding vector instructions up to AVX2.

Work that remains to be done includes:

- rewrite of old ad-hoc helpers into gvec-style helpers;

- implementation of helpers for previously unsupported AVX instructions (e.g. VGATHER et al.)

IV. FINAL NOTES

Even though I could not completely finish the project in the allotted time, I had a great time working on it, and I am planning to do the rest of the work in my free time over the coming weeks. Needless to say, I learned a lot in the process (especially about the x86 ISA), and I am very thankful to the GSoC program for making it all possible.

Last but definitely not least, I would like to thank my mentor, Richard Henderson, for his support and assistance throughout this project. Your insights during code reviews have been indispensable, and I would not have been able to make as much progress on this project without your guidance.

Thank you, Richard!

REFERENCES

1. http://git.linaro.org/people/peter.maydell/risu.git/
2. https://lists.nongnu.org/archive/html/qemu-devel/2019-05/msg05720.html
3. https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg02916.html
4. https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg04758.html
5. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg04412.html
6. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg02616.html
7. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01790.html
8. https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg07041.html

#1 lore raw
Quoted 8 lines · Jan Bobek

Hi folks,

those of you who have been keeping up with Google Summer of Code this year might know that it's nearly over -- meaning that it's time for me to summarize all the work that I have done as a participant. Without further ado, you can find the summary attached below.

Quoted 4 lines

Huge thanks to everyone who made this possible!

Best,
-Jan Bobek

Thanks for your contributions, Jan!

If you have the opportunity to attend KVM Forum 2019 in Lyon, France it would allow you to meet many members of the QEMU community:
https://events.linuxfoundation.org/events/kvm-forum-2019/

Stefan