qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] [extension module] extension module for translating KVM g


From: qiaonuohan
Subject: [Qemu-discuss] [extension module] extension module for translating KVM guest's physical address to host's address
Date: Wed, 22 Feb 2012 16:00:36 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Hi Dave and manager of qemu-discuss,

I have implemented an extension module for translating KVM guest's
physical address to host's address. The related command is "qemu-vtop".

The attachment is the code I implemented. Please copy the file to the
crash-<version>/extensions subdirectory and from the top-level
crash-<version> directory, enter:

  $ make extensions

(please refer to http://people.redhat.com/anderson/extensions.html)

To add the module's command(s) to a running crash session, enter:

  crash> extend qemu-vtop.so

"mod -s kvm" is needed to load kvm debug-info to offer some data to
qemu-vtop command.

The command uses information of struct "kvm_memslots" to get the
relationship between gpa and hva. Struct "kvm_memslots" is holded by a
file, called "anon_inode:kvm-vm", opened by qemu-kvm. Then, "do_vtop" is
called to get hpa. About the detailed implementation, please refer to
attachment.

The functionality is limited, but I think it is useful when debugging a
qemu-kvm virtual machine. So I post it.

-- 
--
Regards
Qiao Nuohan

Attachment: qemu-vtop.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]