From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jui-Hao Chiang Subject: Re: Memory Sharing Date: Sun, 19 Jun 2011 19:34:59 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Lakshitha Harshan Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Hi, Harshan; The share() in mem_sharing.c doesn't check if the content two pages (handles) are the same. The function simply drop the 2nd one (client handle), and that's why you got all VMs crash except the domU which is used for getting the handles (shandles). You have to use memcmp or some other way in share() function to make sure they are actually the same. Bests, Jui-Hao On Thu, Jun 16, 2011 at 10:15 AM, Lakshitha Harshan wrote: > Hi,er > > I am playing with memory sharing functions (nominate & share), for my > research project. In my project, i get the GFNs of starting & ending > pages of kernel code segment using xc_translate_foreign_address and > then using a loop i nominate the memory pages of kernel code segment & > share them. > > Both nominate & share() functions returns 0, on most sharing requests > (almost 99%). > My problem is that after sharing the memory, all of the other domUs > except the domU which is used for getting the handles (shandles) for > sharing memory pages are frozen, if i start one VM after another and > try to share code pages after VMs have logged in. If i try to run the > same procedure on already started set of guest domains, the VMs will > be restarted (except the shandle domU). > > So what could be the reason for this? > I'm using Xen -4.1.1-rc3-pre. > > Thanks, > Harshan > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >