From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] Linux-HVM, qemu, and xen-balloon.ko
Date: Mon, 15 Dec 2008 11:51:01 +0000 [thread overview]
Message-ID: <494644A5.3020305@eu.citrix.com> (raw)
In-Reply-To: <de76405a0812120924w2203e854tdda5ceee6216367b@mail.gmail.com>
George Dunlap wrote:
> 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.
There is a bug in qemu_map_cache: if address_index == last_address_index
we don't check that there is a valid_mapping for address_offset in the
bucket.
The following patch fixes it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
diff -r 0ea6bd53cfb6 hw/xen_machine_fv.c
--- a/hw/xen_machine_fv.c Thu Oct 23 10:26:02 2008 +0100
+++ b/hw/xen_machine_fv.c Mon Dec 15 11:43:52 2008 +0000
@@ -135,10 +135,11 @@
unsigned long address_index = phys_addr >> MCACHE_BUCKET_SHIFT;
unsigned long address_offset = phys_addr & (MCACHE_BUCKET_SIZE-1);
- if (address_index == last_address_index)
+ entry = &mapcache_entry[address_index % nr_buckets];
+
+ if (address_index == last_address_index &&
+ test_bit(address_offset>>XC_PAGE_SHIFT, entry->valid_mapping))
return last_address_vaddr + address_offset;
-
- entry = &mapcache_entry[address_index % nr_buckets];
if (entry->vaddr_base == NULL || entry->paddr_index != address_index ||
!test_bit(address_offset>>XC_PAGE_SHIFT, entry->valid_mapping))
prev parent reply other threads:[~2008-12-15 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-12 17:24 Linux-HVM, qemu, and xen-balloon.ko George Dunlap
2008-12-15 11:51 ` Stefano Stabellini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=494644A5.3020305@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.