From: "Jan Beulich" Subject: Re: Fwd: Xen-4.1.6.1 backport for XSA156 Date: Mon, 23 Nov 2015 00:51:40 -0700 Message-ID: <5652D39C02000078000B7AB3@prv-mh.provo.novell.com> References: <564F0603.2080708@canonical.com> <564F363B.3010802@canonical.com> <564F518602000078000B7496@prv-mh.provo.novell.com> <564F45DE.1010504@canonical.com> <564F470B.2030908@canonical.com> <564F5E5502000078000B7548@prv-mh.provo.novell.com> <564F533A.9050303@canonical.com> <5652D04702000078000B7AA8@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a0luf-00089g-1E for xen-devel@lists.xenproject.org; Mon, 23 Nov 2015 07:51:49 +0000 In-Reply-To: <5652D04702000078000B7AA8@prv-mh.provo.novell.com> 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: Stefan Bader Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 23.11.15 at 08:37, wrote: > Actually there's no problem with ICEBP - just like INTnn it isn't itself > interceptable (and the injection of vector 0x01 from the x86 > emulator path can't fully distinguish between ICEBP and INT $1 in > these old versions anyway). So what you have should be good > enough, albeit I think I'll code it slightly differently (keeping the fall- > through in place). Like this: @@ -1364,7 +1358,6 @@ void vmx_inject_hw_exception(int trap, i switch ( trap ) { case TRAP_debug: - type = X86_EVENTTYPE_SW_EXCEPTION; if ( guest_cpu_user_regs()->eflags & X86_EFLAGS_TF ) { __restore_debug_registers(curr); @@ -1379,9 +1372,11 @@ void vmx_inject_hw_exception(int trap, i domain_pause_for_debugger(); return; } - - type = X86_EVENTTYPE_SW_EXCEPTION; - __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 1); /* int3 */ + if ( trap == TRAP_int3 ) + { + type = X86_EVENTTYPE_SW_EXCEPTION; + __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 1); + } } if ( unlikely(intr_info & INTR_INFO_VALID_MASK) && Jan