From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Pester Subject: VMCALL to KVM userspace? Date: Tue, 13 Aug 2013 16:33:49 +0200 Message-ID: <520A43CD.1040809@tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit To: kvm-devel Return-path: Received: from mailout2.zih.tu-dresden.de ([141.30.67.73]:40612 "EHLO mailout2.zih.tu-dresden.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757127Ab3HMPCW (ORCPT ); Tue, 13 Aug 2013 11:02:22 -0400 Received: from mail.zih.tu-dresden.de ([141.76.14.4]) by mailout2.zih.tu-dresden.de with esmtp (Exim 4.63) (envelope-from ) id 1V9FfS-0001mZ-74 for kvm@vger.kernel.org; Tue, 13 Aug 2013 16:33:50 +0200 Received: from [141.76.49.55] by server-50.mailclusterdns.zih.tu-dresden.de with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (envelope-from ) id 1V9FfS-0000E9-5Z for kvm@vger.kernel.org; Tue, 13 Aug 2013 16:33:50 +0200 Sender: kvm-owner@vger.kernel.org List-ID: Hi, for a uni project I'm trying to write a userspace for KVM that can run ELF binaries without a full blown OS in the guest. The idea is to handle any syscalls made by the binary running inside the guest in the userspace of the host. In the simplest case you could forward them to the host Linux kernel. In any case, I've gotten pretty far, setting up IDTs, the VCPU, Page Tables and whatnot, but right now I'm stuck. I setup my syscall handler to do a VMCALL, which according to the Intel manual is supposed to return control to the host. However this seems to be handled by KVM without an exit into userspace? If this is correct, is there any way to make a call to the host VMM, that will be transfered to userspace by KVM? Thanks Florian