• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# Test script for KVM RAS
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public
7# License as published by the Free Software Foundation; version
8# 2.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13# General Public License for more details.
14#
15# You should find a copy of v2 of the GNU General Public License somewhere
16# on your Linux system; if not, write to the Free Software Foundation,
17# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19# Copyright (C) 2010, Intel Corp.
20# Author: Jiajia Zheng <jiajia.zheng@intel.com>
21#
22
23killall simple_process
24
25cd GUEST_DIR
26
27./simple_process > /dev/null &
28
29./page-types -p `pidof simple_process` -LN -b anon > guest_page
30if [ -s guest_page ]; then
31	ADDR_KLOG=`awk 'NR > 3 {print "0x"$2}' guest_page | sed -n -e '1p'`
32	ADDR=`echo $ADDR_KLOG"000"`
33	echo "guest physical address is $ADDR" > guest_tmp
34fi
35
36