qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 0/9] S390x KVM support


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH 0/9] S390x KVM support
Date: Thu, 22 Oct 2009 12:28:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

On 10/22/2009 12:22 PM, Carsten Otte wrote:
Avi Kivity wrote:
Right, but why? x86 qemu doesn't care about either pc or eflags (with in-kernel irqchip, which s390 essentially is).
For different reasons. Most prominent for setting the condition code,
which is a sideband result of most instructions that indicates whether or
not the instruction actually worked - similar to the exception model in
high level programming languages.

Ok.  Thanks for the explanation.

On x86 we avoid emulating instructions in userspace. Instead the kernel requests userspace to do something (triggered by the instruction), and the kernel does anything which might be implied by the instruction (like copying the result into a register, or updating pc).

An example is port I/O. instead of userspace reading %edx to query the port number and setting %eax to indicate the result, userspace reads a port number struct field and writes an I/O result struct field. Only the kernel accesses registers.

I don't know whether that model makes sense or not for s390, but please consider it.

--
error compiling committee.c: too many arguments to function





reply via email to

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