diff -r 2ab81a7ae20b -r 4cd0dfe5b9ab util/m5/m5.c --- a/util/m5/m5.c Mon Aug 09 10:18:59 2010 -0700 +++ b/util/m5/m5.c Mon Aug 09 10:19:05 2010 -0700 @@ -65,6 +65,11 @@ int offset = 0; int len; + // Touch all buffer pages to ensure they are mapped in the + // page table. This is required in the case of X86_FS, where + // Linux does demand paging. + memset(buf, 0, sizeof(buf)); + while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { write(dest_fid, buf, len); offset += len;