From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWeH7-0006m0-VM for qemu-devel@nongnu.org; Thu, 08 Nov 2012 21:24:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWeH6-0000wC-IX for qemu-devel@nongnu.org; Thu, 08 Nov 2012 21:24:53 -0500 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:50710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWeH6-0000tf-3z for qemu-devel@nongnu.org; Thu, 08 Nov 2012 21:24:52 -0500 Date: Fri, 9 Nov 2012 11:57:39 +1100 From: David Gibson Message-ID: <20121109005739.GG23553@truffula.fritz.box> References: <20121108044522.GU23553@truffula.fritz.box> <87a9us1bpq.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a9us1bpq.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] RFC: Partial workaround for buggy guest virtio-balloon driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Thu, Nov 08, 2012 at 07:11:13AM -0600, Anthony Liguori wrote: > David Gibson writes: > > > Linux kernel commits 1a87228f5f1d316002c7c161316f5524592be766 > > "virtio_balloon: Fix endian bug" and > > 3ccc9372ed0fab33d20f10be3c1efd5776ff5913 "virtio_balloon: fix handling > > of PAGE_SIZE != 4k" fixed two serious bugs in their (guest side) > > handling of the virtio balloon. In practice, these bugs only affected > > powerpc guests, which is big-endian and frequently configured for 64k > > base page size. Attempting to use the balloon with the buggy guest > > would usually result in an immediate guest crash. > > You should create a new feature VIRTIO_BALLOON_F_ENDIAN_SAFE, > advertise it in the host, and add a guest kernel patch to ack it in > newer kernels. > > Older kernels won't ack this feature which gives you a safe way to to > disable the driver on a big endian host. Well, yes, we should have done this at the time we made the bugfixes. Unfortunately, we didn't, so now we are where we are. > You won't get support for 3.4 kernels but it's much nicer to handle it > this way. Since 3.4 and 3.5 kernels will be around in distros for some time now, that is not a trivial drawback with adding a feature now. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson