From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41246 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpNLu-0006so-PZ for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:02:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpNLs-0003OM-Jw for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:02:10 -0500 Received: from smtp1.iitd.ernet.in ([202.141.68.45]:39135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpNLr-0003MS-Gn for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:02:08 -0500 Message-ID: <4D5AA2C9.4030000@cse.iitd.ac.in> Date: Tue, 15 Feb 2011 21:29:05 +0530 From: Dushyant Bansal MIME-Version: 1.0 References: <7564d180e958415b388e0cb93e2f2a71.squirrel@webmail.iitd.ernet.in> <57F58C04-DDF3-4F8C-9BC3-DAED54D2D088@suse.de> <4D4C5149.80303@cse.iitd.ac.in> <7703D057-F12D-4B95-9AEE-190C4EB2A3CE@suse.de> <4D5A8BDB.1000206@cse.iitd.ac.in> <683A1DC5-CC47-492B-AEC0-29795890CEE8@suse.de> In-Reply-To: <683A1DC5-CC47-492B-AEC0-29795890CEE8@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs' has no member named 'pvr' List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-devel@nongnu.org List" , "" , Avi Kivity On Tuesday 15 February 2011 08:03 PM, Alexander Graf wrote: > On 15.02.2011, at 15:21, Dushyant Bansal wrote: > > >> >>>>> Hrm. This means that your kernel headers in /usr/include/linux are too old. Can you try and find out which kernel version they are from please >>>>> >>>>> >>>>> >>>> Yes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. >>>> Thanks a lot. >>>> >>>> >>> Awesome! I'm eager to hear how well it works for you :) >>> >> I collected some performance stats using kvm_stat. To get more information about exit counts of individual instructions, I configured CFLAGS_emulate.o with DDEBUG flag. >> Now, I can see output of "pr_debug("Emulating opcode %d / %d\n", get_op(inst), get_xop(inst));" instruction in kernel logs. >> I have two queries: >> >> 1. The count of "Emulating opcode...." statement in /var/log/kern.log (3 million) is coming out to be much less than emulated_inst_exits (22 million) using kvm_stat. >> > The kernel log ring buffer is probably faster filled than read :). > > >> 2. How to configure makefiles to get output of printk statements inside kvm/arch/powerpc/kvm/trace.h >> > Better don't make them printks - just use the tracing framework. I'd write up a small howto here myself, but I'm pretty much on the jump to my plane for vacation. Avi, could you please guide him a bit on how to get data out of tracepoints? > Thanks for the quick reply :) I have added some more trace parameters in the tracing framework and currently, it is working fine. 1. Add new field in "struct kvm_vcpu_stat" (kvm_host.h) 2. Add corresponding entry in "struct kvm_stats_debugfs_item debugfs_entries[]" (book3s.c) 3. Increment or Decrement that field where ever necessary. I can see stats for the new parameter in kvm_stat output. I guess, this approach is okay. > This means exactly what it means. There are two possible causes: > > 1) Your kernel is too old and doesn't support the capability > 2) Qemu was compiled with kernel headers that don't know the capability yet > > If it's 2, just copy some of the kvm*.h files from your kernel source over to /usr/include/linux or /usr/include/asm-powerpc and fix them up to compile (remove __user). > > I think, its reason 2. I'll try this. Thanks, Dushyant