From: Richard W.M. Jones Date: Tue, 16 Apr 2024 14:49:21 +0000 (+0100) Subject: 2024-tcg: Updates X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=91f8bb15a1706ff169cf409923e134fcbeb73461;p=riscv-talks.git 2024-tcg: Updates --- diff --git a/2024-tcg/01-tcg-translation.png b/2024-tcg/01-tcg-translation.png new file mode 100644 index 0000000..3f9c817 Binary files /dev/null and b/2024-tcg/01-tcg-translation.png differ diff --git a/2024-tcg/01-tcg-translation.svg b/2024-tcg/01-tcg-translation.svg index ec4876b..1fb6c7e 100644 --- a/2024-tcg/01-tcg-translation.svg +++ b/2024-tcg/01-tcg-translation.svg @@ -2,13 +2,16 @@ + inkscape:current-layer="layer1" + showgrid="false" + inkscape:export-bgcolor="#ffffffff" /> - - - @@ -116,36 +102,36 @@ xml:space="preserve" transform="matrix(0.26458333,0,0,0.26458333,-4.2320215,-5.4130078)" id="text4" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Liberation Mono';-inkscape-font-specification:'Liberation Mono';white-space:pre;shape-inside:url(#rect5);fill:none;stroke:#000000">auipc a5,0x13 + id="tspan5">auipc a5,0x13 addi a5,a5,1756 + id="tspan40">addi a5,a5,1756 sd a5,8(s9) + id="tspan42">sd a5,8(s9) sd a5,0(s9) + id="tspan44">sd a5,0(s9) j 591c + id="tspan46">j 591c + id="tspan48"> mv a0,a3 + id="tspan50">mv a0,a3 sd a3,-296(s0) + id="tspan52">sd a3,-296(s0) jal 40a0 + id="tspan54">jal 40a0 beqz a0,584e + id="tspan56">beqz a0,584e in qemu (host) memory. + y="28.275999">in qemu (host) memory + + + + + + + + + + + + + + + + + auipc a5,0x13 +addi a5,a5,1756 +sd a5,8(s9) +sd a5,0(s9) +sret + + + TranslationBlock________________x86 code ... ...call helper_sret + in qemu (host) memory + guest physical page + qemu function________________helper_sret(env){ ... ...} + + + diff --git a/2024-tcg/03-not-obvious.png b/2024-tcg/03-not-obvious.png new file mode 100644 index 0000000..0129232 Binary files /dev/null and b/2024-tcg/03-not-obvious.png differ diff --git a/2024-tcg/03-not-obvious.svg b/2024-tcg/03-not-obvious.svg new file mode 100644 index 0000000..feceb27 --- /dev/null +++ b/2024-tcg/03-not-obvious.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + Some things which are important but not obvious: * TB invalidation is page based * Some jumps can be optimized * Guest's page cache is important * Slow performance is bad, but uneven performance might be worse + + diff --git a/2024-tcg/04-experiments.png b/2024-tcg/04-experiments.png new file mode 100644 index 0000000..a323734 Binary files /dev/null and b/2024-tcg/04-experiments.png differ diff --git a/2024-tcg/04-experiments.svg b/2024-tcg/04-experiments.svg new file mode 100644 index 0000000..2afaa97 --- /dev/null +++ b/2024-tcg/04-experiments.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + Experiments: * "Super-pages" * Software TLB changes * CPU state optimization * QOM casts + + diff --git a/2024-tcg/05-lessons.png b/2024-tcg/05-lessons.png new file mode 100644 index 0000000..cb96155 Binary files /dev/null and b/2024-tcg/05-lessons.png differ diff --git a/2024-tcg/05-lessons.svg b/2024-tcg/05-lessons.svg new file mode 100644 index 0000000..31c2d3b --- /dev/null +++ b/2024-tcg/05-lessons.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + Lessons: * There are no easy fixes * Lots of guest and host RAM helps performance * Translation time doesn't matter much * CPU pinning * Flame graphs & profiles + +