Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754413Ab2JJRik (ORCPT ); Wed, 10 Oct 2012 13:38:40 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:56058 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864Ab2JJRii (ORCPT ); Wed, 10 Oct 2012 13:38:38 -0400 MIME-Version: 1.0 In-Reply-To: References: <1349827115-16600-1-git-send-email-yinghai@kernel.org> <1349827115-16600-7-git-send-email-yinghai@kernel.org> Date: Wed, 10 Oct 2012 10:38:36 -0700 X-Google-Sender-Auth: djJ0_d3zVTGwFNl3zZp8NQoackE Message-ID: Subject: Re: [PATCH 6/7] x86, mm: setup page table from top-down From: Yinghai Lu To: Stefano Stabellini Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jacob Shin , Tejun Heo , "linux-kernel@vger.kernel.org" Content-Type: multipart/mixed; boundary=000e0cd1e0cea7dd6004cbb7ec84 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5813 Lines: 90 --000e0cd1e0cea7dd6004cbb7ec84 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Oct 10, 2012 at 10:26 AM, Stefano Stabellini wrote: > On Wed, 10 Oct 2012, Yinghai Lu wrote: > > It doesn't matter whether they come from BRK or other memory: Xen > assumes that all the pagetable pages come from > pgt_buf_start-pgt_buf_top, so if you are going to use another range you > need to tell Xen about it. > > Alternatively, you can follow Peter's suggestion and replace the current > hooks with a new one with a more precise and well defined semantic. > Something along the lines of "this pagetable page is about to be hooked > into the live pagetable". Xen would use the hook to mark it RO. attached patch on top of this patch will fix the problem? --000e0cd1e0cea7dd6004cbb7ec84 Content-Type: application/octet-stream; name="fix_xen.patch" Content-Disposition: attachment; filename="fix_xen.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h84q24o60 LS0tCiBhcmNoL3g4Ni9pbmNsdWRlL2FzbS94ODZfaW5pdC5oIHwgICAgMiArLQogYXJjaC94ODYv a2VybmVsL3g4Nl9pbml0LmMgICAgICB8ICAgIDMgKystCiBhcmNoL3g4Ni9tbS9pbml0XzMyLmMg ICAgICAgICAgIHwgICAgMSArCiBhcmNoL3g4Ni9tbS9pbml0XzY0LmMgICAgICAgICAgIHwgICAg MSArCiBhcmNoL3g4Ni94ZW4vbW11LmMgICAgICAgICAgICAgIHwgICAxNSArKystLS0tLS0tLS0t LS0KIDUgZmlsZXMgY2hhbmdlZCwgOCBpbnNlcnRpb25zKCspLCAxNCBkZWxldGlvbnMoLSkKCklu ZGV4OiBsaW51eC0yLjYvYXJjaC94ODYvaW5jbHVkZS9hc20veDg2X2luaXQuaAo9PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 Ci0tLSBsaW51eC0yLjYub3JpZy9hcmNoL3g4Ni9pbmNsdWRlL2FzbS94ODZfaW5pdC5oCisrKyBs aW51eC0yLjYvYXJjaC94ODYvaW5jbHVkZS9hc20veDg2X2luaXQuaApAQCAtNzYsNyArNzYsNyBA QCBzdHJ1Y3QgeDg2X2luaXRfb2VtIHsKICAqIGluaXRfbWVtb3J5X21hcHBpbmcgYW5kIHRoZSBj b21taXQgdGhhdCBhZGRlZCBpdC4KICAqLwogc3RydWN0IHg4Nl9pbml0X21hcHBpbmcgewotCXZv aWQgKCpwYWdldGFibGVfcmVzZXJ2ZSkodTY0IHN0YXJ0LCB1NjQgZW5kKTsKKwl2b2lkICgqbWFy a19wYWdlX3JvKSh1NjQgYWRkcik7CiB9OwogCiAvKioKSW5kZXg6IGxpbnV4LTIuNi9hcmNoL3g4 Ni9rZXJuZWwveDg2X2luaXQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC0yLjYub3JpZy9hcmNoL3g4 Ni9rZXJ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XRhYmxlX2luaXQgPSB4ZW5fcGFnZXRhYmxlX2luaXQ7CiAJcHZf bW11X29wcyA9IHhlbl9tbXVfb3BzOwogCkluZGV4OiBsaW51eC0yLjYvYXJjaC94ODYvbW0vaW5p dF8zMi5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT0KLS0tIGxpbnV4LTIuNi5vcmlnL2FyY2gveDg2L21tL2luaXRfMzIu YworKysgbGludXgtMi42L2FyY2gveDg2L21tL2luaXRfMzIuYwpAQCAtNzgsNiArNzgsNyBAQCBz dGF0aWMgX19pbml0IHZvaWQgKmFsbG9jX2xvd19wYWdlKHZvaWQpCiAJfSBlbHNlCiAJCXBmbiA9 IHBndF9idWZfZW5kKys7CiAKKwl4ODZfaW5pdC5tYXBwaW5nLm1hcmtfcGFnZV9ybyhwZm4gPDwg UEFHRV9TSElGVCk7CiAJYWRyID0gX192YShwZm4gKiBQQUdFX1NJWkUpOwogCWNsZWFyX3BhZ2Uo YWRyKTsKIAlyZXR1cm4gYWRyOwpJbmRleDogbGludXgtMi42L2FyY2gveDg2L21tL2luaXRfNjQu Ywo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09Ci0tLSBsaW51eC0yLjYub3JpZy9hcmNoL3g4Ni9tbS9pbml0XzY0LmMKKysr IGxpbnV4LTIuNi9hcmNoL3g4Ni9tbS9pbml0XzY0LmMKQEAgLTM0MCw2ICszNDAsNyBAQCBzdGF0 aWMgX19yZWYgdm9pZCAqYWxsb2NfbG93X3BhZ2UodW5zaWduCiAJfSBlbHNlCiAJCXBmbiA9IHBn dF9idWZfZW5kKys7CiAKKwl4ODZfaW5pdC5tYXBwaW5nLm1hcmtfcGFnZV9ybyhwZm4gPDwgUEFH RV9TSElGVCk7CiAJYWRyID0gZWFybHlfbWVtcmVtYXAocGZuICogUEFHRV9TSVpFLCBQQUdFX1NJ WkUpOwogCWNsZWFyX3BhZ2UoYWRyKTsKIAkqcGh5cyAgPSBwZm4gKiBQQUdFX1NJWkU7Cg== --000e0cd1e0cea7dd6004cbb7ec84-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/