[PTLsim-devel] multi-node simulation

Matt T. Yourst
Mon Nov 19 20:45:08 EST 2007


On Monday 19 November 2007 15:43, Clay Andreasen wrote:
> I am interesting in developing a multi-node x86-64 simulation environment
> and was wondering whether this might be built using ptlsim/X.
>
> One thing I need to be able to do is to simulate a network device which
> does not currently exist.  From my understanding of Xen (limited), it
> appears that it makes real devices available as virtual devices but does
> not allow you to create new simulated devices.  Is this true?  Would
> it be possible to modify the domain0 kernel to emulate the device and
> have it presented to the user domain where ptlsim/X was running so that
> the kernel there would see it?
> Another crazy idea someone suggested was running ptlsim/X under Qemu
> and then create a new device in Qemu.  This sounds like it would be a
> significant permormance hit.
>
> Another thing I need to do is modify the cache model to be exclusive ala
> AMD. Has someone already created this model?
>
> Am I way off base here?  Am I asking the wrong people?
>

We're currently in the process of getting rid of Xen entirely, so we can 
switch to KVM and/or kqemu. This will solve many problems, including the one 
you described, since you'll then be able to modify the QEMU model outside the 
virtual machine to simulate your prototype network device. PTLsim, which runs 
inside the virtual machine, will pass through I/O and memory mapped register 
accesses to your device without having to modify PTLsim itself.

Here's a brief summary of our design for this new version:

https://ptlsim.org/pipermail/ptlsim-devel/2007-October/000163.html

Hopefully the KVM/kqemu support will be complete in 3 to 4 months from now. 
It's being written by another person who's only working on it part time, so I 
can't guarantee that timeframe. Once that's done, doing what you described 
should be fairly easy, but it's currently impossible with Xen.

I'm not sure how accurate your results would be with PTLsim even if you wait 
for the KVM/kqemu/QEMU version, since you'd need to also do a full cycle 
accurate model of your prototype device so the timing would match up with the 
simulated core. QEMU would have to be aware of the PTLsim cycle counter to do 
this, so as to model real latencies w.r.t. the core's cycle count.

You could e-mail Fabrice Bellard (QEMU's developer) and ask him - he actually 
contacted me about this same problem earlier this year, and he says QEMU may 
add support for cycle accurate device models in a new version. This support 
could then be used by PTLsim if and when it gets added.

- Matt

-------------------------------------------------------
 Matt T. Yourst                    yourst at peptidal.com
 Peptidal Research Inc., Co-Founder and Lead Architect
-------------------------------------------------------


More information about the PTLsim-devel mailing list