From: "Jan Beulich" Subject: Re: [PATCH] Remove a set operation for VCPU_KICK_SOFTIRQ when post interrupt to vm. Date: Thu, 17 Sep 2015 23:30:37 -0600 Message-ID: <55FBAF8D02000078000D8FB4@prv-mh.provo.novell.com> References: <1441637175-18070-1-git-send-email-john.liuqiming@huawei.com> <55ED9E00.2010105@huawei.com> <55EDBF4002000078000A07B1@prv-mh.provo.novell.com> <55EE5EF6.50406@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcoFw-0006iV-Ea for xen-devel@lists.xenproject.org; Fri, 18 Sep 2015 05:30:44 +0000 In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: hanweidong@huawei.com, john.liuqiming@huawei.com, yang.z.zhang@intel.com Cc: xen-devel@lists.xenproject.org, dario.faggioli@citrix.com, zw.zhang@huawei.com List-Id: xen-devel@lists.xenproject.org >>> "Zhang, Yang Z" 09/18/15 2:29 AM >>> >Zhang, Yang Z wrote on 2015-09-08: >I have a quick check on current code. I am curious that is current Xen > preemptive? > Also, when return from an interrupt handler, hypervisor didn't check > whether reschedule is needed if the interrupt is occurred in kernel context. >ENTRY(ret_from_intr) >GET_CURRENT(%rbx) >testb $3,UREGS_cs(%rsp) >jz restore_all_xen //call iret directly to restore previous context where interrupt occur if it is in kernel space. >If Xen isn't preemptive, the above case I mentioned should never happen since > the VCPU still run in the same PCPU. Am I right? I have to admit that I don't see the connection to preemptiveness: The reference above is to a code section with interrupts disabled. Jan