From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: Re: [PATCH] Add memory clobber to hypercalls (v2) Date: Fri, 27 Jun 2008 16:05:00 -0500 Message-ID: <1214600700.28837.8.camel@localhost.localdomain> References: <1214504729-16880-1-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti , Alexandre Oliva , Christian Borntraeger To: Anthony Liguori Return-path: Received: from e3.ny.us.ibm.com ([32.97.182.143]:37230 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753092AbYF0VFF (ORCPT ); Fri, 27 Jun 2008 17:05:05 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e3.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m5RL54gu002961 for ; Fri, 27 Jun 2008 17:05:04 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m5RL4xsY225878 for ; Fri, 27 Jun 2008 17:04:59 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m5RL4wgf021171 for ; Fri, 27 Jun 2008 17:04:59 -0400 In-Reply-To: <1214504729-16880-1-git-send-email-aliguori@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2008-06-26 at 13:25 -0500, Anthony Liguori wrote: > Hypercalls can modify arbitrary regions of memory. Make sure to indicate this > in the clobber list. This fixes a hang when using KVM_GUEST kernel built with > GCC 4.3.0. > > This was originally spotted and analyzed by Marcelo. > > Since v1, I've also added a "m" constraint for the inputs to the hypercall. > This was suggested by Christian since it's not entirely clear whether a memory > clobber will force the data to be in memory before the asm statement. In the > very least, it helps to be more conservative. > > Signed-off-by: Anthony Liguori Acked-by: Hollis Blanchard -- Hollis Blanchard IBM Linux Technology Center