|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure |
Date: | Wed, 16 May 2012 14:36:00 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
On 05/15/2012 08:20 PM, Benjamin Herrenschmidt wrote:
On Tue, 2012-05-15 at 19:54 -0500, Anthony Liguori wrote:You certainly could do that but it may get a little weird dealing with the return path. You'd have to return something like -EWOULDBLOCK and make sure you handle that in the dispatch code appropriately.Hrm, our implementation of kvm_arch_handle_exit() always return "1" after a hypercall, forcing kvm_cpu_exec() to return back to the thread loop, so we should be ok to just set env->halted and return no ?
I meant, if you wanted to have a synchronous hypercall function to dispatch, and then later call "hypercall_finish()", you would need a way to return an error in the synchronous hypercall to identify that something else would eventually call "hypercall_finish()." The sync hypercall would need to return something like -EWOULDBLOC.
Setting env->halted=1 ought to be enough to delay returning to the guest although i'd have to go through the code to verify.
Regards, Anthony Liguori
Cheers, Ben.
[Prev in Thread] | Current Thread | [Next in Thread] |