From mboxrd@z Thu Jan 1 00:00:00 1970 From: "George Dunlap" Subject: Linux-HVM, qemu, and xen-balloon.ko Date: Fri, 12 Dec 2008 17:24:32 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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" List-Id: xen-devel@lists.xenproject.org There seems to be some sort of a bug when qemu interacts with the balloon driver. Stefano is trying to repro it, but I thought I'd share it for people to look at. Host: + Debian 4.0 host installation + Vanilla -unstable xen dom0 kernel, hypervisor, and qemu-dm (all pulled this morning) + 4G of ram VM: + Debian 4.0 Linux HVM, 2.6.18-6-i686 package + unmodified_drivers/ modules compiled for xen-platform-pci, and xen-balloon + 512M of RAM assigned + Disk and network are still emulated, using qemu To repro: * Boot the VM * modprobe xen_balloon * In one VM shell: # while true ; do rm -f zero ; dd if=/dev/zero of=zero ; done * In another VM shell, use 'free' to see when the amount of free memory is near zero * In dom0: # xm mem-set debian-hvm 256 * In the VM shell, use 'free' to see when the amount of total memory reaches 256 (this may take awhile, as the guest OS has to write data out to disk.) * In dom0: # xm mem-set debian-hvm 512 qemu will crash shortly. When I install xen-vbd in the initrd, the problem goes away. So it seems almost certain that there's some mapping in qemu not getting flushed when the balloon driver hands pages back to Xen, so that when it asks Xen for pages again, and then tries to DMA into the same gpfn space, something gets lost in the translation. Any ideas? Peace, -George