> On July 27, 2016, 4:43 p.m., Andreas Hansson wrote: > > I would really prefer if we didn't have to add this complexity. > > > > I thought we were pretty much in a position where we could remove the > > horrible shadow memory hack. Could we not pursue that route rather? It > > would be a much better solution long term.
That may be a better longterm solution, but until then this is necessary to get KVM working with the APU model. I rewrote the patch to remove the most complicated C++ changes. Now, instead of detecting the shadow memory using a heuristic, which was admittedly a bit overcomplicated and overspecific to the ruby shadow memory, we add a parameter to AbstractMemory explicitly saying whether a memory should be mapped by KVM. This has several advantages. Now the only code tying this patch to the shadow memory is in the configuration files. It is also generally useful to have a way to stop KVM from accessing certain memories. For example, if a hypothetical configuration script created a separate memory for a device that could not be accessed directly by the CPU, then it would be pointless for KVM to map that memory, and doing so could even introduce difficult-to-detect errors if KVM were to erroneously write to that memory during acceleration. With this patch it would be possible to avoid that by telling KVM not to map the memory region. Is this acceptable? - David ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3580/#review8551 ----------------------------------------------------------- On July 26, 2016, 11:22 p.m., David Hashe wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3580/ > ----------------------------------------------------------- > > (Updated July 26, 2016, 11:22 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11562:7375e1f533fa > --------------------------- > cpu, mem, sim: Enable KVM support for Ruby > > Use heuristic to avoid mapping both main memory and its copy when > --access-backing-store is specified. > > Remember whether a BackingStoreEntry is in the global address map. > > Fix bug causing incomplete draining of Ruby Sequencer. > > Skip mapping ranges reserved by KVM. > > > Diffs > ----- > > src/cpu/kvm/vm.cc 704b0198f747b766b839c577614eb2924fd1dfee > src/mem/physical.hh 704b0198f747b766b839c577614eb2924fd1dfee > src/mem/physical.cc 704b0198f747b766b839c577614eb2924fd1dfee > src/mem/ruby/system/Sequencer.cc 704b0198f747b766b839c577614eb2924fd1dfee > src/sim/system.cc 704b0198f747b766b839c577614eb2924fd1dfee > > Diff: http://reviews.gem5.org/r/3580/diff/ > > > Testing > ------- > > > Thanks, > > David Hashe > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
