qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] How does a system call work on QEMU?


From: Mulyadi Santosa
Subject: Re: [Qemu-devel] How does a system call work on QEMU?
Date: Thu, 14 May 2009 11:38:06 +0700

On 5/14/09, address@hidden <address@hidden> wrote:
>
> Paravirtualized Xen guest kernel is on ring1 so Xen must forward system
> calls to it and then guest kernel replies with a hypercall to Xen.
> How does a system call work on QEMU?
> When a guest kernel wants to directly access to device or perform a
> sensitive but not privilege instruction, what's happened?

Which mode of Qemu operations do you refer to? if you refer to full
MMU emulation (no KVM or kqemu involved then), then intercepting
syscall is basically intercepting interrupt 80 hex or SYSENTER/SYSCALL
into host user mode instruction during code translation.

Using KVM, it behaves more or less the same like Xen. KVM hypervisor
sits in ring zero root mode (sometimes I am confused about root and
non root mode, so guys CMIIW), while  guest kernel sits in ring 0 non
root mode. Non privileged instruction is directly handled by CPU,
while privileged one make CPU exits to root mode. CPU will trap such
instructions and redirect them to KVM entry points.

And last, if you're refererring linux-user mode, it's using same code
translation. It just don't produce user mode code, but instead calling
syscall() C function.

That's all I can recall, CMIIW people.

regards,

Mulyadi.




reply via email to

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