From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes Date: Sun, 11 Sep 2011 10:11:16 +0300 Message-ID: <4E6C5F14.1030407@redhat.com> References: <625BA99ED14B2D499DC4E29D8138F15063045B0C0C@shsmsx502.ccr.corp.intel.com> <4E5B68DA.1090208@siemens.com> <4E5B70F8.30307@redhat.com> <4E5B7206.5070603@siemens.com> <4E5B73CC.5080800@redhat.com> <4E5B9A3B.2020009@siemens.com> <4E5B9EC0.2010808@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , "Tian, Kevin" , "kvm@vger.kernel.org" , "Nakajima, Jun" , "Dong, Eddie" , Marcelo Tosatti To: ya su Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49098 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099Ab1IKHLY (ORCPT ); Sun, 11 Sep 2011 03:11:24 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/10/2011 11:41 AM, ya su wrote: > 0x80637b85: testl $0x1000, 0xfffe0300 > 0x80637b8f: jne 0x80637b85 > 0x80637b91: mov %ecx, 0xfffe0300 > 0x80637b97: testl $0x1000, 0xfffe0300 > 0x80637ba1: jne 0x80637b97 > > I wonder why testl operation will also cause a ICR write, from the > asm code, there should only issue one IPI, but from trace-cmd, it > issued 3 IPI, is there something wrong? It's a bug in test insn emulation, coincidentally I wrote a patch to fix it yesterday, not imagining that it actually happens in practice. > Is it also possible to optimize ICR write emulation, from the > result, winxp vm will produce a lot of ICR writes > Unfortunately not. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.