From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber de Oliveira Costa Subject: [PATCH] Fix HV to properly copy runstate info Date: Fri, 20 Oct 2006 16:23:08 -0300 Message-ID: <20061020192308.GA8453@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, Keir.Fraser@cl.cam.ac.uk List-Id: xen-devel@lists.xenproject.org --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Keir, I guess this patch does the right thing regarding the copy of the runstate_memory_area without breaking the ABI. Thanks, -- Glauber de Oliveira Costa Red Hat Inc. "Free as in Freedom" --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="hotplug-stat.patch" --- xen-unstable/xen/arch/x86/domain.c.old 2006-10-04 01:39:48.000000000 -0300 +++ xen-unstable/xen/arch/x86/domain.c 2006-10-20 15:08:46.000000000 -0300 @@ -376,6 +376,7 @@ arch_do_vcpu_op( case VCPUOP_register_runstate_memory_area: { struct vcpu_register_runstate_memory_area area; + struct vcpu_runstate_info runstate; rc = -EFAULT; if ( copy_from_guest(&area, arg, 1) ) @@ -387,9 +388,9 @@ arch_do_vcpu_op( rc = 0; v->runstate_guest = area.addr.v; - if ( v == current ) - __copy_to_user(v->runstate_guest, &v->runstate, - sizeof(v->runstate)); + vcpu_runstate_get(v,&runstate); + __copy_to_user(v->runstate_guest, &runstate, + sizeof(runstate)); break; } --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --rwEMma7ioTxnRzrJ--