* [Qemu-devel] Accessing a linux guest's data structures
@ 2011-11-06 16:01 Ankur Dahiya
2011-11-06 17:02 ` Mulyadi Santosa
0 siblings, 1 reply; 8+ messages in thread
From: Ankur Dahiya @ 2011-11-06 16:01 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
Hi
I am a beginner qemu developer.
I am running a linux guest inside qemu and I need to determine what
process, thread is currently running in the guest.
How should I do this? Any suggestions? Or can anyone point me to the
relevant areas in qemu's source.
Thanks.
Ankur Dahiya
[-- Attachment #2: Type: text/html, Size: 375 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-06 16:01 [Qemu-devel] Accessing a linux guest's data structures Ankur Dahiya
@ 2011-11-06 17:02 ` Mulyadi Santosa
[not found] ` <CAP3U8uduCEjrGs284go7KZbxRbFba0jbU07Hj+uH72u7yUo+Ug@mail.gmail.com>
2011-11-08 5:27 ` 陳韋任
0 siblings, 2 replies; 8+ messages in thread
From: Mulyadi Santosa @ 2011-11-06 17:02 UTC (permalink / raw)
To: Ankur Dahiya; +Cc: qemu-devel
On Sun, Nov 6, 2011 at 23:01, Ankur Dahiya <legalos.lotr@gmail.com> wrote:
> Hi
> I am a beginner qemu developer.
> I am running a linux guest inside qemu and I need to determine what process,
> thread is currently running in the guest.
> How should I do this? Any suggestions? Or can anyone point me to the
> relevant areas in qemu's source.
Do you want to do that in kernel perspective or user mode perspective?
How about simply ssh-ing into the guest and run "ps"?
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
[not found] ` <CAP3U8uduCEjrGs284go7KZbxRbFba0jbU07Hj+uH72u7yUo+Ug@mail.gmail.com>
@ 2011-11-07 1:35 ` Mulyadi Santosa
0 siblings, 0 replies; 8+ messages in thread
From: Mulyadi Santosa @ 2011-11-07 1:35 UTC (permalink / raw)
To: Ankur Dahiya; +Cc: qemu-devel
Hi :)
On Mon, Nov 7, 2011 at 00:46, Ankur Dahiya <legalos.lotr@gmail.com> wrote:
> Hey, thanks for the reply.
> I dont want to ssh to the guest!
> What I basically want to do is monitor the guest state. Like I want to track
> what system calls are being called,
> what process and thread are currently running...Things that an
> instrumentation framework like valgrind does...
> But i want to do it without disturbing the guest (transparent to the guest).
> Is this too difficult? Any suggestions?
Alright, I got better understanding upon your need.
OK, I suggest to explore kdb/kgdb and hook gdb from host into it via
the qemu's gdb stub. I think that should do it.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-06 17:02 ` Mulyadi Santosa
[not found] ` <CAP3U8uduCEjrGs284go7KZbxRbFba0jbU07Hj+uH72u7yUo+Ug@mail.gmail.com>
@ 2011-11-08 5:27 ` 陳韋任
2011-11-08 9:43 ` Andreas Färber
1 sibling, 1 reply; 8+ messages in thread
From: 陳韋任 @ 2011-11-08 5:27 UTC (permalink / raw)
To: Mulyadi Santosa; +Cc: Ankur Dahiya, qemu-devel
> > Hi
> > I am a beginner qemu developer.
> > I am running a linux guest inside qemu and I need to determine what process,
> > thread is currently running in the guest.
> > How should I do this? Any suggestions? Or can anyone point me to the
> > relevant areas in qemu's source.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I guess he want to know how to know which process is running in the
guest OS from QEMU's perspective.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-08 5:27 ` 陳韋任
@ 2011-11-08 9:43 ` Andreas Färber
2011-11-08 9:48 ` Vasiliy Tolstov
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2011-11-08 9:43 UTC (permalink / raw)
To: 陳韋任; +Cc: Ankur Dahiya, Mulyadi Santosa, qemu-devel
Am 08.11.2011 06:27, schrieb 陳韋任:
>>> I am running a linux guest inside qemu and I need to determine what process,
>>> thread is currently running in the guest.
>>> How should I do this? Any suggestions? Or can anyone point me to the
>>> relevant areas in qemu's source.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I guess he want to know how to know which process is running in the
> guest OS from QEMU's perspective.
And QEMU doesn't know or care, as a processor emulator.
Therefore in some way the guest's cooperation is needed.
HTE,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-08 9:43 ` Andreas Färber
@ 2011-11-08 9:48 ` Vasiliy Tolstov
2011-11-08 10:21 ` Ankur Dahiya
0 siblings, 1 reply; 8+ messages in thread
From: Vasiliy Tolstov @ 2011-11-08 9:48 UTC (permalink / raw)
To: Andreas Färber
Cc: Ankur Dahiya, Mulyadi Santosa, qemu-devel,
陳韋任
2011/11/8 Andreas Färber <afaerber@suse.de>:
> Am 08.11.2011 06:27, schrieb 陳韋任:
>>>> I am running a linux guest inside qemu and I need to determine what process,
>>>> thread is currently running in the guest.
>>>> How should I do this? Any suggestions? Or can anyone point me to the
>>>> relevant areas in qemu's source.
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> I guess he want to know how to know which process is running in the
>> guest OS from QEMU's perspective.
>
> And QEMU doesn't know or care, as a processor emulator.
> Therefore in some way the guest's cooperation is needed.
>
Try to see on libvmi (successor of xenaccess). Tou need vm
introspection that can be possible via libvmi.
--
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-08 9:48 ` Vasiliy Tolstov
@ 2011-11-08 10:21 ` Ankur Dahiya
2011-11-08 11:08 ` 陳韋任
0 siblings, 1 reply; 8+ messages in thread
From: Ankur Dahiya @ 2011-11-08 10:21 UTC (permalink / raw)
To: Vasiliy Tolstov
Cc: Mulyadi Santosa, Andreas Färber, 陳韋任,
qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
Thanks for the suggestions, guys! I will take a look at libvmi.
As an aside, can someone tell me where in the qemu source can I inspect
each guest instruction?
I want all guest instructions to first go through my code.
Ankur Dahiya
On Tue, Nov 8, 2011 at 3:18 PM, Vasiliy Tolstov <v.tolstov@selfip.ru> wrote:
> 2011/11/8 Andreas Färber <afaerber@suse.de>:
> > Am 08.11.2011 06:27, schrieb 陳韋任:
> >>>> I am running a linux guest inside qemu and I need to determine what
> process,
> >>>> thread is currently running in the guest.
> >>>> How should I do this? Any suggestions? Or can anyone point me to the
> >>>> relevant areas in qemu's source.
> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >> I guess he want to know how to know which process is running in the
> >> guest OS from QEMU's perspective.
> >
> > And QEMU doesn't know or care, as a processor emulator.
> > Therefore in some way the guest's cooperation is needed.
> >
>
> Try to see on libvmi (successor of xenaccess). Tou need vm
> introspection that can be possible via libvmi.
>
>
> --
> Vasiliy Tolstov,
> Clodo.ru
> e-mail: v.tolstov@selfip.ru
> jabber: vase@selfip.ru
>
[-- Attachment #2: Type: text/html, Size: 2864 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Accessing a linux guest's data structures
2011-11-08 10:21 ` Ankur Dahiya
@ 2011-11-08 11:08 ` 陳韋任
0 siblings, 0 replies; 8+ messages in thread
From: 陳韋任 @ 2011-11-08 11:08 UTC (permalink / raw)
To: Ankur Dahiya
Cc: 陳韋任, Mulyadi Santosa, Andreas F酺ber,
Vasiliy Tolstov, qemu-devel
> Thanks for the suggestions, guys! I will take a look at libvmi.
> As an aside, can someone tell me where in the qemu source can I inspect
> each guest instruction?
> I want all guest instructions to first go through my code.
For i386 guest, see disas_insn (target-i386/translate.c). It
disassembles i386 guest binary. QEMU provides "-d in_asm" option
to log every guest instruction it translates. You might want to
take a look on qemu_log.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-11-08 11:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 16:01 [Qemu-devel] Accessing a linux guest's data structures Ankur Dahiya
2011-11-06 17:02 ` Mulyadi Santosa
[not found] ` <CAP3U8uduCEjrGs284go7KZbxRbFba0jbU07Hj+uH72u7yUo+Ug@mail.gmail.com>
2011-11-07 1:35 ` Mulyadi Santosa
2011-11-08 5:27 ` 陳韋任
2011-11-08 9:43 ` Andreas Färber
2011-11-08 9:48 ` Vasiliy Tolstov
2011-11-08 10:21 ` Ankur Dahiya
2011-11-08 11:08 ` 陳韋任
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).