qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Detecting context switch in QEMU


From: Xin Tong
Subject: Re: [Qemu-devel] Detecting context switch in QEMU
Date: Sun, 2 Sep 2012 14:48:43 -0700

On Sun, Sep 2, 2012 at 8:52 AM, Xin Tong <address@hidden> wrote:
> On Sat, Sep 1, 2012 at 10:52 PM, Mulyadi Santosa
> <address@hidden> wrote:
>> On Sun, Sep 2, 2012 at 2:33 AM, Xin Tong <address@hidden> wrote:
>>> I want to detect context switches in QEMU x86_64-softmmu. one of the
>>> ideas i have is to track the write to CR3. is this valid on QEMU  (
>>> i.e. are their any cases in which the assumption could break).
>>
>>
>> CMIIW, if context switch happen from a parent process to its NPTL
>> based thread, or to kernel thread, then CR3 won't be updated since
>> they are using the same address space in Linux kernel, right?
>>
BTW, if a thread makes a system call, when the kernel is servicing the
syscall. is it still accessing the thread's memory using the threads
page table (i.e. the kernel is using virtual address ?). how about AIO
kernel threads  ?

Xin

>> And that includes no TLB flush AFAIK.....
>>
> Ok, i do not know this. but it seems tracking CR3 is no good. any ideas ?
>
> Xin
>
>>
>> --
>> regards,
>>
>> Mulyadi Santosa
>> Freelance Linux trainer and consultant
>>
>> blog: the-hydra.blogspot.com
>> training: mulyaditraining.blogspot.com



reply via email to

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