From mboxrd@z Thu Jan 1 00:00:00 1970 From: Attilio Rao Subject: Re: [PATCH v2 1/2] XEN, X86: Improve semantic support for pagetable_reserve PVOPS Date: Wed, 15 Aug 2012 19:50:06 +0100 Message-ID: <502BEF5E.1080105@citrix.com> References: <1344947062-4796-1-git-send-email-attilio.rao@citrix.com> <1344947062-4796-2-git-send-email-attilio.rao@citrix.com> <502BD943.8030701@citrix.com> <1345056190.12434.34.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1345056190.12434.34.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" , Konrad Rzeszutek Wilk , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 15/08/12 19:43, Ian Campbell wrote: > On Wed, 2012-08-15 at 18:46 +0100, Stefano Stabellini wrote: > >> On Wed, 15 Aug 2012, Attilio Rao wrote: >> >>> On 15/08/12 18:25, Stefano Stabellini wrote: >>> >>>> On Tue, 14 Aug 2012, Attilio Rao wrote: >>>> >>>> >>>>> - Allow xen_mapping_pagetable_reserve() to handle a start different from >>>>> pgt_buf_start, but still bigger than it. >>>>> - Add checks to xen_mapping_pagetable_reserve() and native_pagetable_reserve() >>>>> for verifying start and end are contained in the range >>>>> [pgt_buf_start, pgt_buf_top]. >>>>> - In xen_mapping_pagetable_reserve(), change printk into pr_debug. >>>>> - In xen_mapping_pagetable_reserve(), print out diagnostic only if there is >>>>> an actual need to do that (or, in other words, if there are actually some >>>>> pages going to switch from RO to RW). >>>>> >>>>> Signed-off-by: Attilio Rao >>>>> --- >>>>> arch/x86/mm/init.c | 4 ++++ >>>>> arch/x86/xen/mmu.c | 22 ++++++++++++++++++++-- >>>>> 2 files changed, 24 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c >>>>> index e0e6990..c5849b6 100644 >>>>> --- a/arch/x86/mm/init.c >>>>> +++ b/arch/x86/mm/init.c >>>>> @@ -92,6 +92,10 @@ static void __init find_early_table_space(struct map_range *mr, unsigned long en >>>>> >>>>> void __init native_pagetable_reserve(u64 start, u64 end) >>>>> { >>>>> + if (start< PFN_PHYS(pgt_buf_start) || end> PFN_PHYS(pgt_buf_top)) >>>>> + panic("Invalid address range: [%llu - %llu] should be a subset of [%llu - %llu]\n" >>>>> >>>>> >>>> code style (you can check whether your patch breaks the code style with >>>> scripts/checkpatch.pl) >>>> >>>> >>> I actually did before to submit, it reported 0 errors/warning. >>> >> strange, that really looks like a line over 80 chars >> > Also there should be one space either side of the "<" and">" in the > conditional. > > I have no idea why they are reported like that, but in the original patch the space is fine. Attilio