From: Yacine HEBBAL Subject: [Question] Switching VCPU CPL from the hypervisor ? Date: Tue, 15 Dec 2015 16:20:04 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from plane.gmane.org ([80.91.229.3]:38759 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753773AbbLOQUQ (ORCPT ); Tue, 15 Dec 2015 11:20:16 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a8sKh-0006gg-EC for kvm@vger.kernel.org; Tue, 15 Dec 2015 17:20:11 +0100 Received: from machine107.orange-labs.com ([161.106.0.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Dec 2015 17:20:11 +0100 Received: from y_hebbal by machine107.orange-labs.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Dec 2015 17:20:11 +0100 Sender: kvm-owner@vger.kernel.org List-ID: Hi, I working on an application in which I control an arbitrary process to execute an a given code (injected code for example). I want the process I'm controlling to execute my code with root privilege. Is it possible to arbitrary switch vcpu cpl to 0 from the hypervisor level (process is in user mode) ? I'm aware that I can do this using some hacks and emulation or by controlling the process just after it enters or just before it quits kernel mode (but I need to wait and intercept these events). Is there a straightforward technique to switch vcpu cpl from the hypervisor level at demand ?