Quoting Steve Reinhardt <[email protected]>:

 On Wed, Sep 28, 2011 at 3:09 AM, Gabe Black <[email protected]> wrote:

A PageTable object is an example of an address space. A guest
page table in memory is an address space. Because we have two,
incompatible abstractions for essentially the same thing, that isn't
justification for not having one abstraction to represent both. A
Workload is an abstraction. I should have to care that when I access
address 0xffff0000 that it's looked up in a fake PageTable hash map, or
if it's looked up in some guest memory on some NUMA node somewhere. I
just want to know what's on the stack.


I'm still confused... yes, they're both address spaces, but that doesn't
mean we need a common abstraction if we don't do the same thing with them.
 The Process object in SE mode represents the same thing as a process inside
the Linux kernel in FS mode, but the simulator doesn't interact with them in
the same way, so we don't need a common base class.  In fact, as you're
pointing out, the Process in SE mode has more in common with the Kernel
object in FS mode with respect to what the simulator uses it for.

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


That's why a Kernel and a Process are both workloads... They *are* basically the same thing, just in different contexts, which is what I'm getting at. And we do need a common abstraction for address spaces, because we have a common wrapper around them, namely ports which do translation. Why they do translation, how they're translating, what being read or written, none of that matters. They take an address in and turn it into some other address. Then we have one type of port that does translation, it hooks up to a common interface, and that's that. Then we don't have to have vports or tports and whatever other variation we have now. When Processes and Kernels are both instances of a Workload, you don't have to do a cast into the subclass to get the object that needs to be handled in a special way, all to do the same job. It's just something like

Addr phys = workload->addressSpace->translate(virt);

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

Reply via email to