From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Md5pR-0005g2-Rg for qemu-devel@nongnu.org; Mon, 17 Aug 2009 13:17:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Md5pM-0005e0-KW for qemu-devel@nongnu.org; Mon, 17 Aug 2009 13:17:04 -0400 Received: from [199.232.76.173] (port=60456 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Md5pM-0005dq-FE for qemu-devel@nongnu.org; Mon, 17 Aug 2009 13:17:00 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:38402) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Md5pM-0006Wh-3q for qemu-devel@nongnu.org; Mon, 17 Aug 2009 13:17:00 -0400 Received: by ewy6 with SMTP id 6so1480489ewy.34 for ; Mon, 17 Aug 2009 10:16:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4A899081.9010508@gnu.org> Date: Mon, 17 Aug 2009 19:16:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20090817144754.GA31553@1und1.de> <4A89730F.7090206@codemonkey.ws> <20090817154557.GB365@1und1.de> <4A8988DB.3040108@gnu.org> <20090817170017.GB1835@1und1.de> In-Reply-To: <20090817170017.GB1835@1und1.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] Re: [HACK] make vmmouse work with KVM List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Reimar_D=F6ffinger?= , qemu-devel On 08/17/2009 07:00 PM, Reimar Döffinger wrote: > On Mon, Aug 17, 2009 at 06:44:11PM +0200, Paolo Bonzini wrote: >> On 08/17/2009 05:45 PM, Reimar Döffinger wrote: >>> + cpu_synchronize_state(env, 0); >>> env->regs[R_EAX] = vmport_ioport_read(opaque, addr); >>> + cpu_synchronize_state(env, 1); >> >> This is not needed because the sync is done in vmport_ioport_read, isn't it? > > Well... The cpu_synchronize_state could be dropped you are right, but > here we write R_EAX so the cpu_synchronize_state(env, 1) is necessary. > It might be slightly cleaner to rename the vmport_ioport_read (any name > suggestions?) and add a wrapper for register_ioport_read that does the > cpu_synchronize_state (so it looks similar to vmport_ioport_write). Yes, that would look best and wouldn't have fooled me. Could vmport_ioport_trigger be a decent name? Paolo Paolo