From patchwork Fri Apr 4 14:30:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 27839 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5C08820490 for ; Fri, 4 Apr 2014 14:32:54 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id w62sf3009726wes.8 for ; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:in-reply-to:message-id :references:user-agent:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=PmHlSOnC1e55X6i9lpSrY1190lD8GSNtzyAW8WNH444=; b=JXgqO5VYhE5EI27WtEIkW9PE/Ui9pqwGrIrRiwb30uIJlf2XXo653A1v/wUEgfQCe7 /z+V6VwjADNGPVI5X1l62WhlXZ4obgBRMaaK0aUgw4IVBMa17p1dPEv/riGVAB4G1XEk HgBskv9BZnp0QSQqNLqpQ+pHDFHns6G+0EjMgrMKO+2LrLgxlBCSEhBw1HyKzE+Jo6LI gKJwGdzidDocGR7tEntfEJOqpkHr3M7iKBeCWgPQ35aBS4RZKLMqB/69vG7CdwTREfFH 2c81sK0RzNa08tjOCWY8+DTQL+D24aE04Xy1SZSzVwSnCtNyRcLjZyhO1hfLGmGCepx8 6GYg== X-Gm-Message-State: ALoCoQkce0FJAEUbmLF2D+6NEPZ0xeuVcVZjGt9YPy2LbhE1ZGAI4yCb66qhNblPX7bJ+DU+WL+I X-Received: by 10.180.78.101 with SMTP id a5mr427872wix.7.1396621973277; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.133 with SMTP id v5ls1014191qgv.23.gmail; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr8598998vcx.4.1396621973147; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id sc7si1803037vdc.13.2014.04.04.07.32.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 07:32:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so1542135veb.1 for ; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) X-Received: by 10.221.40.10 with SMTP id to10mr1883746vcb.22.1396621973031; Fri, 04 Apr 2014 07:32:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp118868vcv; Fri, 4 Apr 2014 07:32:52 -0700 (PDT) X-Received: by 10.229.96.199 with SMTP id i7mr10369405qcn.20.1396621971561; Fri, 04 Apr 2014 07:32:51 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id e30si3567731qge.136.2014.04.04.07.32.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 04 Apr 2014 07:32:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WW58q-0001yN-5C; Fri, 04 Apr 2014 14:30:48 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WW58o-0001yI-Lj for xen-devel@lists.xenproject.org; Fri, 04 Apr 2014 14:30:46 +0000 Received: from [193.109.254.147:9090] by server-6.bemta-14.messagelabs.com id 81/E8-13066-512CE335; Fri, 04 Apr 2014 14:30:45 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1396621843!6317628!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5725 invoked from network); 4 Apr 2014 14:30:45 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Apr 2014 14:30:45 -0000 X-IronPort-AV: E=Sophos;i="4.97,795,1389744000"; d="scan'208";a="118029597" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 04 Apr 2014 14:30:43 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Fri, 4 Apr 2014 10:30:42 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WW58k-0001vF-CG; Fri, 04 Apr 2014 15:30:42 +0100 Date: Fri, 4 Apr 2014 15:30:38 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Jan Beulich In-Reply-To: <53394AE90200007800003AD0@nat28.tlf.novell.com> Message-ID: References: <533583C5020000780000367B@nat28.tlf.novell.com> <533584D60200007800003697@nat28.tlf.novell.com> <533586CD02000078000036E6@nat28.tlf.novell.com> <1396013811.8670.49.camel@kazak.uk.xensource.com> <5335988F0200007800003782@nat28.tlf.novell.com> <1396018356.8670.75.camel@kazak.uk.xensource.com> <53359E7A02000078000037C8@nat28.tlf.novell.com> <53394AE90200007800003AD0@nat28.tlf.novell.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: anthony.perard@citrix.com, Ian Campbell , Ian Jackson , xen-devel , Stefano Stabellini Subject: Re: [Xen-devel] [PATCH v2 4/4] x86: fix pinned cache attribute handling X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Mon, 31 Mar 2014, Jan Beulich wrote: > >>> On 28.03.14 at 19:00, wrote: > > I miss some context here. > > What is the issue with xc_domain_pin_memory_cacheattr_range and how does > > it affect QEMU (that uses the xc_domain_pin_memory_cacheattr variety)? > > The issue is that the hypervisor (and hence libxc) interface expect the > passed range to be inclusive, yet the ending page number all the qemus > pass is one past the intended range. Thanks for the clear explanation. Is this patch what you are looking for? diff --git a/xen-all.c b/xen-all.c index ba34739..027e7a8 100644 --- a/xen-all.c +++ b/xen-all.c @@ -323,7 +323,7 @@ go_physmap: xc_domain_pin_memory_cacheattr(xen_xc, xen_domid, start_addr >> TARGET_PAGE_BITS, - (start_addr + size) >> TARGET_PAGE_BITS, + (start_addr + size - 1) >> TARGET_PAGE_BITS, XEN_DOMCTL_MEM_CACHEATTR_WB); snprintf(path, sizeof(path),