* [libre-riscv-dev] Avoiding Spectre or Meltdown
From: Yehowshua @ 2020-05-18 13:03 UTC (permalink / raw)
To: Libre-RISCV General Development
I know Jacob mentioned some scheme earlier.
If you shadow commits to memory(really cache) during speculation by having commits placed in a buffer, which you can ignore once branch is resolved, wouldn’t that avoid some problems with Spectre and Meltdown?
Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Avoiding Spectre or Meltdown
From: Luke Kenneth Casson Leighton @ 2020-05-18 13:26 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <33B8ACFA-9A9F-482F-985B-D5E5C44B56B9@gatech.edu>
On Monday, May 18, 2020, Yehowshua <yimmanuel3@gatech.edu> wrote:
> I know Jacob mentioned some scheme earlier.
>
> If you shadow commits to memory(really cache) during speculation by having
> commits placed in a buffer, which you can ignore once branch is resolved,
> wouldn’t that avoid some problems with Spectre and Meltdown?
hmm hmm i honestly do not know. my understanding of these OoO issues is
limited.
* we can calculate the Effective Address (immediate or indexed) and i
deliberately put in a "hold" system (addr.request and addr.go), so even
starting the actual LDST can be shadowed (defined as a prohibition against
committing).
* when addr.go is sent, there will be either a "address is ok" or an
exception signal comes back.
* a ST will subsequently wait for an explicit "st.go" however LD at present
assumes it may proceed at any time
therefore at the moment, it is the address computation which can proceed
speculatively without causing "spec/melt" harm.
however beyond the "addr.go" point, the assumption is that if no exception
comes back, all resources required to complete the LD or ST have been
reserved (TLBs established, L1 cache line valid and held) and there is a
100% guarantee that the operation will succeed.
how those API rules interact with spec/melt i do not really know.
i *believe* it is that you are not allowed to attempt "speculative
anything" which could cause an exception, is that right?
if that is the case we will need to hold all addr.go firing until any form
of shadowing (branches etc) are 100% clear.
this would result in performance that completely sucks, especially in tight
inner loops.
i would advocate making it possible to set a bit that changes that
behaviour at the hardware level (supervisor bit).
l.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 320] New: split out software install and deps into separate script
From: bugzilla-daemon @ 2020-05-18 14:02 UTC (permalink / raw)
To: libre-riscv-dev
https://bugs.libre-soc.org/show_bug.cgi?id=320
Bug ID: 320
Summary: split out software install and deps into separate
script
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: Other
OS: Linux
Status: CONFIRMED
Severity: enhancement
Priority: ---
Component: Source Code
Assignee: lkcl@lkcl.net
Reporter: lkcl@lkcl.net
CC: libre-riscv-dev@lists.libre-riscv.org
NLnet milestone: ---
cole can you create a separate script which rather than installs stuff in the
chroot just installs nmigen yosys simbiyosys and git clones the dev repos soc,
nmutil, ieee754fpu and so on?
not as a chroot just a straight install.
we need this quite fast becaude there are people who will need to use it over
the nect 1 to 5 days.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 320] split out software install and deps into separate script
From: bugzilla-daemon @ 2020-05-18 14:03 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-320-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=320
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|lkcl@lkcl.net |colepoirier@gmail.com
Priority|--- |High
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 320] split out software install and deps into separate script
From: bugzilla-daemon @ 2020-05-18 14:04 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-320-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=320
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
it is probably stuff that is already in the yaml files.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] Rough timing estimate in yosys
From: Michael Nolan @ 2020-05-18 14:11 UTC (permalink / raw)
To: Libre-RISCV General Development
With all the work going on designing functional units, I was wondering
if there was a way to get a rough estimate of the maximum frequency a
module can run at. I can get the longest path from running yosys -p
"read_ilang module.il; synth; ltp", but that just prints out the cells
between register A and register B. I realize that the actual timing is
going to depend on layout, but is there a way to get a rough estimate,
say by passing in a cell library or just a rule of thumb of ~500ps per cell?
On a semi-related note, running ltp on a pipeline shows that there's a
bunch of loops.
From running synth and ltp on the logical pipeline:
Warning: Detected loop at \stage_o$next [63] in pipe
Warning: Detected loop at \stage_o$next [62] in pipe
Warning: Detected loop at \stage_o$next [61] in pipe
Warning: Detected loop at \stage_o$next [60] in pipe
Warning: Detected loop at \stage_o$next [59] in pipe
Warning: Detected loop at \stage_o$next [58] in pipe
Warning: Detected loop at \stage_o$next [57] in pipe
Warning: Detected loop at \stage_o$next [56] in pipe
Warning: Detected loop at \stage_o$next [55] in pipe
Warning: Detected loop at \stage_o$next [54] in pipe
Warning: Detected loop at \stage_o$next [53] in pipe
Warning: Detected loop at \stage_o$next [52] in pipe
Warning: Detected loop at \stage_o$next [51] in pipe
Warning: Detected loop at \stage_o$next [50] in pipe
Warning: Detected loop at \stage_o$next [49] in pipe
Warning: Detected loop at \stage_o$next [48] in pipe
Warning: Detected loop at \stage_o$next [47] in pipe
Warning: Detected loop at \stage_o$next [46] in pipe
Is this supposed to happen?
--Michael
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Rough timing estimate in yosys
From: Luke Kenneth Casson Leighton @ 2020-05-18 15:05 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <b8db8150-bc06-63c7-49c4-c6536f6bed64@gmail.com>
On Monday, May 18, 2020, Michael Nolan <mtnolan2640@gmail.com> wrote:
> With all the work going on designing functional units, I was wondering if
> there was a way to get a rough estimate of the maximum frequency a module
> can run at. I can get the longest path from running yosys -p "read_ilang
> module.il; synth; ltp", but that just prints out the cells between
> register A and register B.
oh, good. that's a useful discovery.
> I realize that the actual timing is going to depend on layout, but is
> there a way to get a rough estimate, say by passing in a cell library or
> just a rule of thumb of ~500ps per cell?
i believe it is calculated based on the switching time of a given
transistor, at both the geometry, and also a given voltage.
a chain of such transistors is then multiplied by the longest path.
at the speeds we are doing, speed of light is not a major factor: it will
be however at 28nm or below.
also affecting the switching time is the fanout. if one gate tries to
drive 200 clearly this will either fail or just take a hell of a long time.
to solve that, buffers must be inserted into the line and of course those
also add switching delay.
>
> On a semi-related note, running ltp on a pipeline shows that there's a
> bunch of loops.
>
> From running synth and ltp on the logical pipeline:
>
> Warning: Detected loop at \stage_o$next [63] in pipe
hmm i do not know.
we are doing an design where the registers can be held until acknowledged
by ready/valid signalling: it's possible that the storage of the register
is interpreted as "a loop".
can you raise a bugreport about it so thatbit can be investigated? mention
that a small unit test should be made.
l.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 321] New: BUG: Running ltp on a pipeline gives warnings about loops
From: bugzilla-daemon @ 2020-05-18 15:21 UTC (permalink / raw)
To: libre-riscv-dev
https://bugs.libre-soc.org/show_bug.cgi?id=321
Bug ID: 321
Summary: BUG: Running ltp on a pipeline gives warnings about
loops
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Windows
Status: CONFIRMED
Severity: normal
Priority: ---
Component: Source Code
Assignee: lkcl@lkcl.net
Reporter: mtnolan2640@gmail.com
CC: libre-riscv-dev@lists.libre-riscv.org
NLnet milestone: ---
Created attachment 55
--> https://bugs.libre-soc.org/attachment.cgi?id=55&action=edit
Photo of loop in yosys graph
Running `ltp` in yosys on a pipeline gives many warnings about loops being
detected. For instance, running yosys -p `read_ilang logical_pipeline.il;
synth; ltp` in soc/fu/logical/test gives the following output:
yosys> ltp
3. Executing LTP pass (find longest path).
Longest topological path in input (length=4):
0: \op__input_carry [1]
1: $abc$6362$new_n198_ (via
$abc$6362$auto$blifparse.cc:377:parse_blif$6427)
2: $abc$6362$new_n199_ (via
$abc$6362$auto$blifparse.cc:377:parse_blif$6428)
3: $abc$6362$new_n201_ (via
$abc$6362$auto$blifparse.cc:377:parse_blif$6430)
4: \carry_in$25 (via $abc$6362$auto$blifparse.cc:377:parse_blif$6432)
Longest topological path in output (length=9):
0: \stage_o [63]
<snip>
9: \cr0$24 [3] (via $abc$8116$auto$blifparse.cc:377:parse_blif$8261)
Longest topological path in main (length=34):
0: \op__insn_type [5]
<snip>
34: \stage_o [5] (via $abc$6433$auto$blifparse.cc:377:parse_blif$7943)
Longest topological path in countz (length=27):
0: \rs_i [47]
<snip>
27: \result_o [0] (via $abc$6123$auto$blifparse.cc:377:parse_blif$6352)
Warning: Detected loop at \stage_o$next [63] in pipe
Warning: Detected loop at \stage_o$next [62] in pipe
Warning: Detected loop at \stage_o$next [61] in pipe
Warning: Detected loop at \stage_o$next [60] in pipe
<snip>
Warning: Detected loop at \stage_o$next [0] in pipe
Warning: Detected loop at \so$23$next in pipe
Warning: Detected loop at \r_busy$next in pipe
Warning: Detected loop at \op__insn$20$next [31] in pipe
Warning: Detected loop at \op__insn$20$next [30] in pipe
Warning: Detected loop at \op__insn$20$next [29] in pipe
Warning: Detected loop at \op__insn$20$next [28] in pipe
...
Graphing the module (show pipe) shows a couple of loops in the top level pipe
object, outside of the stages
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Rough timing estimate in yosys
From: Luke Kenneth Casson Leighton @ 2020-05-18 15:52 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDx4NUxJRbYp9oNKBWxM1XDVjHRnD2TxhsCOfog=88gmfw@mail.gmail.com>
On Monday, May 18, 2020, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
>
>> Warning: Detected loop at \stage_o$next [63] in pipe
>
>
> we are doing an design where the registers can be held until acknowledged
> by ready/valid signalling: it's possible that the storage of the register
> is interpreted as "a loop".
>
> can you raise a bugreport about it so thatbit can be investigated?
> mention that a small unit test should be made.
>
https://bugs.libre-soc.org/attachment.cgi?id=55&action=edit
ok yes that's fine.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 321] BUG: Running ltp on a pipeline gives warnings about loops
From: bugzilla-daemon @ 2020-05-18 15:57 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-321-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=321
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #0)
> Created attachment 55 [details]
> Photo of loop in yosys graph
> Warning: Detected loop at \stage_o$next [63] in pipe
ok yes this is fine.
look closely at the MUXes. note that when the front mux is set, the register
is outputted (from the DFF, which is on a clock latch).
however if the MUX is not set, the input is sent through combinatorially.
so the "loop" is not a combinatoriak looo, it is a time synced loop that traps
the value of the input, endlessly replaying it until such time as soneone sets
the MUX to low.
there is probably a better way to do this however it is not doing any harm.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 319] POWER9 setting carry (and other) XER flags
From: bugzilla-daemon @ 2020-05-18 16:13 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-319-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=319
Luke Kenneth Casson Leighton <lkcl@lkcl.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|lkcl@lkcl.net |mtnolan2640@gmail.com
--- Comment #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
michael could you convert all the outgoing XER fields to a Data record type?
this basically treating them just like spr1 2 3 which are Data type
what can then be done is, in the main_stage.py set the "ok" flag of carry32.ok
to 1 to indicate a *desire* to have the output_stage compute cr32 and so on.
each mainstage can then set those ok bits as needed.
some of those flags i think we might get already from the CSV files
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-18 16:26 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #12 from Cesar Strauss <cestrauss@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #11)
> excellent. similar to https://bugs.libre-soc.org/show_bug.cgi?id=316
> if you'd like we can find a practical and useful example that's an awful
> lot less complicated than this one, by way of getting started.
No need, it's fine. I think I got the hang of nMigen now. I got over the
initial shock some time ago, while following this project. Verilog is my HDL of
choice, but the fundamental concepts are the same.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-18 16:38 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #13 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cesar Strauss from comment #12)
> No need, it's fine. I think I got the hang of nMigen now. I got over the
> initial shock some time ago, while following this project.
very funny :)
> Verilog is my HDL
> of choice, but the fundamental concepts are the same.
yes. everything is there.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-18 16:56 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #14 from Cesar Strauss <cestrauss@gmail.com> ---
Dear Luke,
I see uses of "latchregister" and "SRLatch" in code. In the nMigen library,
they are internally implemented with synchronous logic, although partly
resembling the function of their asynchronous equivalents.
Do you, by any chance, intend to replace them, in the ASIC, with real
asynchronous latches? As depicted in several diagrams at
https://libre-soc.org/3d_gpu/architecture/6600scoreboard/ ?
Regards,
Cesar
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 318] fix LDSTCompUnit
From: bugzilla-daemon @ 2020-05-18 17:19 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-318-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=318
--- Comment #15 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cesar Strauss from comment #14)
> Dear Luke,
>
> I see uses of "latchregister" and "SRLatch" in code. In the nMigen library,
> they are internally implemented with synchronous logic, although partly
> resembling the function of their asynchronous equivalents.
yes. this was the best i could think of that is reasonably close and at the
same time is verifiable if we went with standard commercial tools.
SR NAND most definitely is not verifiable except with proprietary tools that
are rented at USD 250,000 a week.
>
> Do you, by any chance, intend to replace them, in the ASIC, with real
> asynchronous latches?
for the CompUnits, probably not. the gate count (number of SRLatch instances)
is not high enough to justify the risk.
> As depicted in several diagrams at
> https://libre-soc.org/3d_gpu/architecture/6600scoreboard/ ?
yes. i kept these to make it possible to understand the relationship with what
Mitch taught me.
however you have to appreciate that the 6600 diagrams worked by alternating low
and high clock cycles.
in particular, the Dependency Matrix cells very specifically activate "issue"
on the HI cycle and clear GOREAD on i believe the LO cycle.
i decided that sticking closely to this as a very first chip might not be a
good idea, although it is extremely cool.
consequently instead i created SRLatch and then used a sync on resetting it as
the "primary method" of responding to REQUEST signals.
you will therefore see a GO signal be the reset driver on for example the read
latch, as a *sync* not a comb.
this leaves the SRLatch latch open for precisely one clock cycle, and the
corresponding REQ, generated from the Q of the SRlatch instance, will then
drop. which is exactly what is needed to capture the incoming data.
remember, GOREAD is only set (and set for only one cycle) when the Regfile Bus
is svailable to transport data to this Unit.
a standard design (wishbone) would use ready/valid signalling to do exactly the
same thing, it is just different names.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] daily kan-ban update 18may2020
From: Tobias Platen @ 2020-05-18 18:18 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <CAPweEDyF42ND9xF=Rat1yv2+M1+VtrX1bgRSrMJbAyaThcjfnw@mail.gmail.com>
Today I was reading and trying to understand Chapter 2. Branch Facility.
Tobias
On Mon, 18 May 2020 12:45:26 +0100
Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> over the weekend i:
>
> * continued to help michael with the pipelines (and moved them to
> soc.fu this morning).
> * also helped cole.
> * and a new team member cesar (welcome!).
> * and got LDSTCompUnit working (maybe).
> * and had a fascinating conversation thanks to yehowshua and jeremy
> (also welcome!), which resulted in this
> (https://libre-soc.org/3d_gpu/architecture/tomasulo_transformation/).
> * and did a preliminary first cut at a pinmux for the 180nm chip.
> * and probably some other things i've forgotten about as i was up late
> enough that my neuro-electrical memory is slightly shot.
> * also this morning i reviewed the XER register and added some tables
> from p45-6 of V3.0B spec to determine when the bits are set.
> documented here https://libre-soc.org/openpower/pipeline_operands/
>
> this latter is going to be a bit of a pig. if we don't treat the XER
> bits - each *bit* - as an actual separate and distinct "register" -
> protected by a Dependency Matrix column - we might as well give up -
> and no, doing an in-order design will not help on any level of
> performance because all of those operations which set XER bits *still*
> need to stall. microwatt only gets away with this because it is only
> a 2-stage pipeline.
>
> today i will see how it goes because am still recovering from the
> effects of three disrupted sleep nights in a row.
>
> l.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
--
Tobias Platen <libre-soc[at]platen-software[dot]de>
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Avoiding Spectre or Meltdown
From: Jacob Lifshay @ 2020-05-18 18:41 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <33B8ACFA-9A9F-482F-985B-D5E5C44B56B9@gatech.edu>
On Mon, May 18, 2020, 06:03 Yehowshua <yimmanuel3@gatech.edu> wrote:
> I know Jacob mentioned some scheme earlier.
>
See also: https://bugs.libre-soc.org/show_bug.cgi?id=209
Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 316] bperm TODO
From: bugzilla-daemon @ 2020-05-18 19:03 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=316
--- Comment #39 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #38)
> cole i moved the soc.logical.bperm code into soc.fu.logical.bperm
> can i leave it with you to update the imports?
Just went to do this, but it appears you or someone else has already done this.
Thank you. Going to start working on the formal proof now.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 209] spectre-proof speculative execution
From: bugzilla-daemon @ 2020-05-18 19:06 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-209-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=209
Yehowshua <yimmanuel3@gatech.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yimmanuel3@gatech.edu
--- Comment #3 from Yehowshua <yimmanuel3@gatech.edu> ---
According to the Spectre paper here: https://spectreattack.com/spectre.pdf
there are multiple Spectre style vulnerabilities. I will focus here on Spectre
variant 1 from the paper.
The solution I present below comes from the Solutions section of the paper in
"Mitigation Options".
Variant 1 of the attack can be prevented by having commit buffers from L2 or
memory to L1 during speculative execution, and by having a commit buffer from
reg to L1.
Its all about making sure that cache is reverted during L1 so that you can
cache flushes cannot leak sensitive information.
Oh, and cache flushes should be disallowed during speculative execution.
The timing concept you describe
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 320] split out software install and deps into separate script
From: bugzilla-daemon @ 2020-05-18 19:11 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-320-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=320
--- Comment #2 from Cole Poirier <colepoirier@gmail.com> ---
Sure, should only take about 5 minutes because I already have the yosys part
separated out, and the dev repos are straightforward. I'm not sure what you're
referring to with regard to the yaml files. Can you please be more specific?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] daily kan-ban update 18may2020
From: Luke Kenneth Casson Leighton @ 2020-05-18 19:21 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <20200518201840.f98bff75f9f55216f486be59@platen-software.de>
On Mon, May 18, 2020 at 7:18 PM Tobias Platen
<libre-soc@platen-software.de> wrote:
> Today I was reading and trying to understand Chapter 2. Branch Facility.
you mean section 11.5.1 of Mitch's book? it's very simple: the Branch
Function Unit holds a "shadow" - write-hazard - over anything that is
added after the Branch instruction was issued. this "shadow" hooks
into all GO_WRITE phases of all instructions so "shadowed". this
allows those units to *generate* results but NOT write them.
that Branch Unit may have a register it needs to read which happens to
be blocked because another (past) unit - one that was issued *before*
the branch - is due to write to it. therefore, quite a few
instructions may build up with that "shadow" preventing them from
writing.
eventually, the register that the Branch Unit is waiting for will be
written to. at that point, the Branch Unit can compute the outcome of
the Branch. if it was "correct as predicted", the "shadow" is simply
dropped: all units with write-blocks now demand access to Regfile (and
memory).
if however it was wrong, the "GO_DIE" signal of the Shadow is pulled,
all those results get trashed immediately, and the Branch Unit sets a
new PC, down the "other" path, with new instruction issue beginning
from that new (correct) point.
so, to reiterate:
* some prior instructions happen to write to registers that the Branch
needs. this takes time
* the Branch is issued with
(A) a "Read-after-Write" Hazard on the instruction that is writing
to the register it needs and
(B) a "Shadow" enabled which activates on *any* future instruction
* future instructions note that shadow and DISABLE "write commit"
capability but CONTINUE execution
* Branch Unit eventually gets the register it needs, completes its
decision-making, and either pulls "OK" or "DIE" on the Shadow.
it's pretty straightforward.
the exact same scheme is used for exceptions, interrupts and predication.
necessary modifications to the diagram on p55 are shown here:
https://libre-soc.org/3d_gpu/shadow.jpg
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 209] spectre-proof speculative execution
From: bugzilla-daemon @ 2020-05-18 19:24 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-209-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=209
--- Comment #4 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Yehowshua from comment #3)
> Its all about making sure that cache is reverted during L1 so that you can
> cache flushes cannot leak sensitive information.
so basically this extends the Dependency Matrix "Shadow" concept actually
right down into the Caches.
(if a Shadow exists it is because there is some "damage" that could occur due
to cancellation).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] [Bug 209] spectre-proof speculative execution
From: Yehowshua @ 2020-05-18 19:25 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <bug-209-13-shMgt04DnC@https.bugs.libre-soc.org/>
> On May 18, 2020, at 3:24 PM, bugzilla-daemon@libre-soc.org wrote:
>
> so basically this extends the Dependency Matrix "Shadow" concept actually
> right down into the Caches.
Exactly - keep in mind that this is only for variant 1.
I’ll read up on the other variants later.
Why do CPUs have to be so complicated...
Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 320] split out software install and deps into separate script
From: bugzilla-daemon @ 2020-05-18 19:32 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-320-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=320
--- Comment #3 from Cole Poirier <colepoirier@gmail.com> ---
Do you want me to assume the user has already correctly set up ssh config? Or
just basic setup with clone via read-only https?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] [Bug 209] spectre-proof speculative execution
From: Luke Kenneth Casson Leighton @ 2020-05-18 19:38 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <0C5BB73E-D5A4-4EE5-8BDE-C5F48188B74E@gatech.edu>
On Mon, May 18, 2020 at 8:25 PM Yehowshua <yimmanuel3@gatech.edu> wrote:
> > so basically this extends the Dependency Matrix "Shadow" concept actually
> > right down into the Caches.
>
> Exactly - keep in mind that this is only for variant 1.
> I’ll read up on the other variants later.
>
> Why do CPUs have to be so complicated...
Hugh said on one of the Virtual Coffee Calls, he's been in touch with
the IBM engineers for many years. back when they first met, they told
him - straight up - that CPU design is hard. however - it took
several years for him to properly and actually appreciate that when
they said "hard" they did not mean it in the ordinary sense of
"certain kinds of software engineering problems are hard", they meant,
like, REALLY hard.
this is why i recommended that we go with python, because not only can
we apply OO (Object-Orientated) techniques, we tap directly into the
"default mindset" behind python, which is that you *do not* write code
- ever - without having an adequate unit test.
this in combination with patiently following Mitch's advice of
drilling down to first principles, i am confident that we'll do fine.
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
page: next prev latest
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git