From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYZxw-0002vr-2Z for qemu-devel@nongnu.org; Mon, 29 Sep 2014 08:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYZxl-0000iE-F6 for qemu-devel@nongnu.org; Mon, 29 Sep 2014 08:22:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYZxk-0000hZ-QJ for qemu-devel@nongnu.org; Mon, 29 Sep 2014 08:21:57 -0400 Message-ID: <54294ECF.1040705@redhat.com> Date: Mon, 29 Sep 2014 14:21:35 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411757235-29128-1-git-send-email-dslutz@verizon.com> <1411757235-29128-2-git-send-email-dslutz@verizon.com> <54291463.1080205@suse.de> <54293E24.3080205@redhat.com> <54294832.9060001@suse.de> In-Reply-To: <54294832.9060001@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] xen-hvm.c: Add support for Xen access to vmport List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Don Slutz , qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Marcel Apfelbaum , "Michael S. Tsirkin" , Markus Armbruster , Anthony Liguori , =?windows-1252?Q?Andreas_F=E4rber?= , Stefano Stabellini Il 29/09/2014 13:53, Alexander Graf ha scritto: > > cpu_handle_ioreq() > { > ... > > if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) { > cpu->xen_vcpu_dirty = true; > synchronize_xen_to_env(xenptr, cpu); > } > > handle_ioreq(); > > if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) { > cpu->xen_vcpu_dirty = false; > synchronize_env_to_xen(xenptr, cpu); > } > > ... > } > > void xen_cpu_synchronize_state(CPUState *cpu) > { > assert(cpu->xen_vcpu_dirty); > } > > Then no changes to the vmport code would be necessary and this problems > where some code path wants to do direct access to registers > automatically tells us that things are broken. Yeah, that would be possible. You do not even need synchronize_state, it seems to me that it introduces more complication for little gain. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1/1] xen-hvm.c: Add support for Xen access to vmport Date: Mon, 29 Sep 2014 14:21:35 +0200 Message-ID: <54294ECF.1040705@redhat.com> References: <1411757235-29128-1-git-send-email-dslutz@verizon.com> <1411757235-29128-2-git-send-email-dslutz@verizon.com> <54291463.1080205@suse.de> <54293E24.3080205@redhat.com> <54294832.9060001@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54294832.9060001@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Alexander Graf , Don Slutz , qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Marcel Apfelbaum , "Michael S. Tsirkin" , Markus Armbruster , Anthony Liguori , =?windows-1252?Q?Andreas_F=E4rber?= , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Il 29/09/2014 13:53, Alexander Graf ha scritto: > > cpu_handle_ioreq() > { > ... > > if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) { > cpu->xen_vcpu_dirty = true; > synchronize_xen_to_env(xenptr, cpu); > } > > handle_ioreq(); > > if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) { > cpu->xen_vcpu_dirty = false; > synchronize_env_to_xen(xenptr, cpu); > } > > ... > } > > void xen_cpu_synchronize_state(CPUState *cpu) > { > assert(cpu->xen_vcpu_dirty); > } > > Then no changes to the vmport code would be necessary and this problems > where some code path wants to do direct access to registers > automatically tells us that things are broken. Yeah, that would be possible. You do not even need synchronize_state, it seems to me that it introduces more complication for little gain. Paolo