From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH RFC v12 03/21] Remove an unnecessary assert from vmx_update_debug_state Date: Mon, 16 Sep 2013 14:09:08 -0700 Message-ID: <20130916140908.061d5484@mantra.us.oracle.com> References: <1379089521-25720-1-git-send-email-george.dunlap@eu.citrix.com> <1379089521-25720-4-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379089521-25720-4-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Keir Fraser , Tim Deegan , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 13 Sep 2013 17:25:03 +0100 George Dunlap wrote: > As far as I can tell, there's nothing here that requires v to be > current. vmx_update_exception_bitmap() is updated in other situations > where v!=current. > > Removing this allows the PVH code to call this during vmcs > construction in a later patch, making the code more robust by removing > duplicate code. > > Signed-off-by: George Dunlap > CC: Mukesh Rathor > CC: Jan Beulich > CC: Tim Deegan > CC: Keir Fraser > --- > xen/arch/x86/hvm/vmx/vmx.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c > index 8ed7026..f02e47a 100644 > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -1041,8 +1041,6 @@ void vmx_update_debug_state(struct vcpu *v) > { > unsigned long mask; > > - ASSERT(v == current); > - > mask = 1u << TRAP_int3; > if ( !cpu_has_monitor_trap_flag ) > mask |= 1u << TRAP_debug; vmx_update_exception_bitmap() writes EXCEPTION_BITMAP of current vmcs, ie of current vcpu. If v != current, you'd be writing the bitmap of wrong vcpu. If the assertion is removed, then the function would need to vmx enter... mukesh