> On Aug. 4, 2016, 4:52 p.m., Andreas Hansson wrote:
> > This is _very_ dangerous.
> > 
> > The "functional" accessor functions are really only for debug access, and 
> > any writes happening on the functional interfaces do not really have a 
> > well-defined consistency model with respect to the "real" memory accessrs 
> > using atomic/timing. This is a really dangerous hack...
> 
> Michael LeBeane wrote:
>     The motivation for this is to make KVM work in ruby (it currently issues 
> an atomic access to do MMIO, and atomic is not supported in Ruby).  We could 
> add ruby specific code in KVM to do a functional access when using Ruby 
> instead.  Do you have any other suggestions?
> 
> Andreas Hansson wrote:
>     Who is accessing what, and under what conditions? Why is the atomic 
> access going via Ruby?
>     
>     If all the Ruby blocks are truly idle, is implementing atomic not trivial?
> 
> Andreas Sandberg wrote:
>     Have you considered adding timing support to KVM instead?
>     
>     I don't think it would be that hard, you could just have to add a new 
> state to BaseKvmCPU to indicate that an MMIO access is in flight (e.g., 
> RunningMMIOPending). When you receive a response, you transition into the 
> RunningServiceCompletion state and wake the CPU. You'd end up with these 
> state transitions Runnning -> RunningService -> RunningMMIOPending -> 
> RunningServiceCompletion for a typical MMIO.
>     
>     Obviously, you'd still have to issue atomic accesses if the system is in 
> atomic mode.

Thanks for the feedback!  I have implemented timing accesses in KVM as you 
suggested in r3619 and will close this patch.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3588/#review8569
-----------------------------------------------------------


On Aug. 4, 2016, 4:49 p.m., Michael LeBeane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3588/
> -----------------------------------------------------------
> 
> (Updated Aug. 4, 2016, 4:49 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 11554:57b008eb65c3
> ---------------------------
> ruby: convert atomic accesses to functional in RubyPort
> Instead of panicing when receiving an atomic access in ruby, convert it to a
> functional access and warn the user.  This makes device models that issue
> atomic accesses (such as KVM when performing a MMIO access) work correctly in
> Ruby.
> 
> 
> Diffs
> -----
> 
>   src/mem/ruby/system/RubyPort.hh 91f58918a76abf1a1dedcaa70a9b95789da7b88c 
> 
> Diff: http://reviews.gem5.org/r/3588/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael LeBeane
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to