From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] virtio-balloon: do not attempt to release more than available pages Date: Mon, 10 Mar 2008 19:52:46 -0500 Message-ID: <47D5D7DE.5010906@codemonkey.ws> References: <20080305162832.GA11563@dmt> <200803060939.49302.rusty@rustcorp.com.au> <20080308190638.GA18152@dmt> <200803111126.55421.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060009030900090006000408" Cc: Marcelo Tosatti , kvm-devel To: Rusty Russell Return-path: In-Reply-To: <200803111126.55421.rusty@rustcorp.com.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------060009030900090006000408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Rusty Russell wrote: > On Sunday 09 March 2008 06:06:38 Marcelo Tosatti wrote: > >> But making the driver robust against it seems sensate. I agree that >> zeroing num_pages is hackish. What do you suggest? >> > > OK, after more discussion on IRC, this seems like the correct thing to do. > > 1) Allow more than 2G of pages. It doesn't cost us much to break the 8TB > barrier. This is an ABI change, so best to do this now. > I don't think there's a compelling need to break the ABI. If we truly ever needed to break the 8TB barrier, we could simply introduce another ballooning device. virtio_pci relies on PFNs fitting into a 32-bit value so breaking the 8TB barrier here doesn't given it to us for free anyway. Plus, we've released an external drivers package. Breaking the ABI at this stage is going to cause user confusion. Sure, the ABI isn't stable until 2.6.25 ships but I do think we should have a more compelling reason to do it if we truly have to. > 2) Handle the case where we get nonsense from the host, which causes us to > wrap around. > Here's my neither compiled nor tested version which should fix this problem without breaking the ABI. Regards, Anthony Liguori --------------060009030900090006000408 Content-Type: application/mbox; name="virtio:balloon_signage.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="virtio:balloon_signage.patch" ZGlmZiAtLWdpdCBhL2RyaXZlcnMvdmlydGlvL3ZpcnRpb19iYWxsb29uLmMgYi9kcml2ZXJz L3ZpcnRpby92aXJ0aW9fYmFsbG9vbi5jCmluZGV4IGM4YTQzMzIuLmYxZDcxYzQgMTAwNjQ0 Ci0tLSBhL2RyaXZlcnMvdmlydGlvL3ZpcnRpb19iYWxsb29uLmMKKysrIGIvZHJpdmVycy92 aXJ0aW8vdmlydGlvX2JhbGxvb24uYwpAQCAtMTUyLDcgKzE1Miw3IEBAIHN0YXRpYyB2b2lk IHZpcnRiYWxsb29uX2NoYW5nZWQoc3RydWN0IHZpcnRpb19kZXZpY2UgKnZkZXYpCiAJd2Fr ZV91cCgmdmItPmNvbmZpZ19jaGFuZ2UpOwogfQogCi1zdGF0aWMgaW5saW5lIGludCB0b3dh cmRzX3RhcmdldChzdHJ1Y3QgdmlydGlvX2JhbGxvb24gKnZiKQorc3RhdGljIGlubGluZSBp bnQ2NF90IHRvd2FyZHNfdGFyZ2V0KHN0cnVjdCB2aXJ0aW9fYmFsbG9vbiAqdmIpCiB7CiAJ dTMyIHY7CiAJX192aXJ0aW9fY29uZmlnX3ZhbCh2Yi0+dmRldiwKQEAgLTE3Niw3ICsxNzYs NyBAQCBzdGF0aWMgaW50IGJhbGxvb24odm9pZCAqX3ZiYWxsb29uKQogCiAJc2V0X2ZyZWV6 YWJsZSgpOwogCXdoaWxlICgha3RocmVhZF9zaG91bGRfc3RvcCgpKSB7Ci0JCWludCBkaWZm OworCQlpbnQ2NF90IGRpZmY7CiAKIAkJdHJ5X3RvX2ZyZWV6ZSgpOwogCQl3YWl0X2V2ZW50 X2ludGVycnVwdGlibGUodmItPmNvbmZpZ19jaGFuZ2UsCg== --------------060009030900090006000408 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --------------060009030900090006000408 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------060009030900090006000408--