There's no prepackaged mechanism for this specifically, you'd have to
roll your own at some level (probably using
suspendContext/activateContext).

Steve

On Wed, Jul 21, 2010 at 9:50 PM, Sujay Phadke <[email protected]> wrote:
> "enable /disable the CPUs so that only one runs at a time"
>
> Hi Steve,
>     could you explain if there is already a way to do this in SE mode, or is
> it something that we have to hack in?
>
> Thanks.
>
> ----- Original Message ----- From: "Steve Reinhardt" <[email protected]>
> To: "M5 users mailing list" <[email protected]>
> Sent: Tuesday, July 20, 2010 11:33 AM
> Subject: Re: [m5-users] changing workloads
>
>
> On Mon, Jul 19, 2010 at 10:24 PM, nathan binkert <[email protected]> wrote:
>>>
>>> I am working on some timing attack problems. I was wondering whether it
>>> is
>>> possible to use m5 in SE mode to do a pseudo switch of contexts: to
>>> execute
>>> a workload, then (using the current processor state including caches,
>>> bpreds
>>> etc) switch to another one - to simulate a regular and an attacker
>>> process.
>>> One possible solution would be switching the same CPU class but with a
>>> different workload parameter. Will it preserve the processor state?
>>> Essentially all that is required is two different address spaces, one for
>>> each workload and the workloads executed sequentially (being able to
>>> schedule between them would be great too!). Perhaps using SMT mode but
>>> suspending / resuming the threads will work for that?
>>
>> SE mode isn't designed to do this stuff, but that said, I'd imagine
>> that it could be made to work without too much work. You can't just
>> switch the workload parameter because the workload is really only used
>> when the application is starting up. You'd need to have two workloads
>> loaded into two contexts and write some code to swap contexts.
>
> I can think of a few ways to do it:
>
> - use the SMT support in O3 and enable/disable threads so that only
> one runs at a time
> - hook up two CPUs to the same caches and enable/disable the CPUs so
> that only one runs at a time
> - write code to explicitly save/restore the CPU state
>
> The last one is the closest to what happens in real life but also the most
> work.
>
> Steve
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to