From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v7][RFC][PATCH 01/13] introduce XENMEM_reserved_device_memory_map Date: Thu, 30 Oct 2014 10:53:39 +0800 Message-ID: <5451A833.5030308@intel.com> References: <1414136077-18599-1-git-send-email-tiejun.chen@intel.com> <1414136077-18599-2-git-send-email-tiejun.chen@intel.com> <544E4A1F.9000804@linaro.org> <544F0107.7070008@intel.com> <544F7FC80200007800042BD8@mail.emea.novell.com> <54503770.1060700@intel.com> <5450B934020000780004301C@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5450B934020000780004301C@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: kevin.tian@intel.com, Julien Grall , tim@xen.org, xen-devel@lists.xen.org, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org On 2014/10/29 16:53, Jan Beulich wrote: >>>> On 29.10.14 at 01:40, wrote: >> On 2014/10/28 18:36, Jan Beulich wrote: >>>>>> On 28.10.14 at 03:35, wrote: >>>> On 2014/10/27 21:35, Julien Grall wrote: >>>>> Hi, >>>>> >>>>> On 10/24/2014 08:34 AM, Tiejun Chen wrote: >>>>>> diff --git a/xen/common/memory.c b/xen/common/memory.c >>>>>> index cc36e39..51a32a8 100644 >>>>>> --- a/xen/common/memory.c >>>>>> +++ b/xen/common/memory.c >>>>>> @@ -692,6 +692,32 @@ out: >>>>>> return rc; >>>>>> } >>>>>> >>>>>> +struct get_reserved_device_memory { >>>>>> + struct xen_mem_reserved_device_memory_map map; >>>>>> + unsigned int used_entries; >>>>>> +}; >>>>>> + >>>>>> +static int get_reserved_device_memory(xen_pfn_t start, >>>>>> + xen_ulong_t nr, void *ctxt) >>>>> >>>>> This function is only used when HAS_PASSTHROUGH is defined. You have to >>>>> protected by an #ifdef HAS_PASSTHROUGH. >>>>> >>>> >>>> I guess you mean we need to do this, >>>> >>>> diff --git a/xen/common/memory.c b/xen/common/memory.c >>>> index 1449c10..2177c56 100644 >>>> --- a/xen/common/memory.c >>>> +++ b/xen/common/memory.c >>>> @@ -692,6 +692,7 @@ out: >>>> return rc; >>>> } >>>> >>>> +#ifdef HAS_PASSTHROUGH >>>> struct get_reserved_device_memory { >>>> struct xen_reserved_device_memory_map map; >>>> unsigned int used_entries; >>>> @@ -717,6 +718,7 @@ static int get_reserved_device_memory(xen_pfn_t start, >>>> >>>> return 0; >>>> } >>>> +#endif >>>> >>>> long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) >>>> { >>>> >>>> Jan, >>>> >>>> With this above change, is the following working for you? >>> >>> I already fixed this in my version (which I view to be the canonical >>> one). >>> >> >> Are you point that attached patch? Are you sure? Here I pick some code >> fragments from your latest patch, > > No, that fixup was in response to Julien's comment, which I think > was given after I had forwarded you my version. In any event, So could you send me the latest? I'd like to replace it in my tree. Thanks Tiejun > what's going to get applied is what I have here unless you find a > need to do substantial changes to it. > > Jan > > >