From: Mukesh Rathor Subject: PVH: iopl Date: Wed, 19 Sep 2012 12:29:07 -0700 Message-ID: <20120919122907.1e72704b@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Xen-devel@lists.xensource.com" , Ian Campbell , "stefano.stabellini@eu.citrix.com" List-Id: xen-devel@lists.xenproject.org I noticed anamoly in my code the way IOPL is set. For vcpu 0, its done via set_iopl.iopl = 1; rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl); in xen_start_kernel() in enlighten.c. But, for non boot vcpus, its done via eflags in cpu_initialize_context(): ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */ Since I am running in HVM container, IO ops cause vmexit. I can just check eflags at that point for guest IOPL. So I am thinking of just using eflags and not doing the hcall. It will also reduce the need for another field in the struct pv_vcpu for me. (JFYI: EXIT_REASON_IO_INSTRUCTION cause emulate_privileged_op() to be called). What do you guys think? thanks, mukesh