Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201AbbBVDOQ (ORCPT ); Sat, 21 Feb 2015 22:14:16 -0500 Received: from mail-ig0-f171.google.com ([209.85.213.171]:47621 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbbBVDOP (ORCPT ); Sat, 21 Feb 2015 22:14:15 -0500 MIME-Version: 1.0 Date: Sat, 21 Feb 2015 19:14:13 -0800 X-Google-Sender-Auth: X7cnfVIhG8v3wZhZZWL4DzI8pq8 Message-ID: Subject: [PATCH v2] x86, boot: Enable ident_mapping for kasl above 4G on 64bit From: Yinghai Lu To: Baoquan He Cc: "H. Peter Anvin" , Linux Kernel Mailing List Content-Type: multipart/mixed; boundary=047d7b4145342182d2050fa4ae87 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 12367 Lines: 176 --047d7b4145342182d2050fa4ae87 Content-Type: text/plain; charset=UTF-8 On Sat, Feb 21, 2015 at 12:00 PM, Yinghai Lu wrote: > > Please use attached one to instead of the #PF handler in boot stage. > It works when hard-code to move output above 4G. Please check v2 instead. Thanks Yinghai --047d7b4145342182d2050fa4ae87 Content-Type: text/x-patch; charset=US-ASCII; name="misc_fill_pgt_v2.patch" Content-Disposition: attachment; filename="misc_fill_pgt_v2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i6fv231h1 RnJvbTogWWluZ2hhaSBMdSA8eWluZ2hhaUBrZXJuZWwub3JnPgpTdWJqZWN0OiBbUEFUQ0ggdjJd IHg4NiwgYm9vdDogRW5hYmxlIGlkZW50X21hcHBpbmcgZm9yIGthc2wgYWJvdmUgNEcgb24gNjRi aXQKCnNwbGl0IGtlcm5lbF9pZGVudF9tYXBwaW5nX2luaXQoKSBhbmQgY2FsbCB0aGF0IGluIGJv b3Q6OmRlY29tcHJlc3Nfa2VybmVsCnN0YWdlLiBpdCB3aWxsIGNvdmVyIG5ldyByYW5nZSB0aGF0 IGlzIGFib3ZlIDRHLgoKLXYyOiBmaXggb25lIHR5cG8sIHVzZSByb3VuZF91cC9yb3VuZF9kb3du IGFuZCB1c2UgTUFDUk8gZm9yIHNpemUuCgpTaWduZWQtb2ZmLWJ5OiBZaW5naGFpIEx1IDx5aW5n aGFpQGtlcm5lbC5vcmc+CgotLS0KIGFyY2gveDg2L2Jvb3QvY29tcHJlc3NlZC9taXNjLmMgICAg IHwgICAxMCArKysrCiBhcmNoL3g4Ni9ib290L2NvbXByZXNzZWQvbWlzY19wZ3QuYyB8ICAgNjEg KysrKysrKysrKysrKysrKysrKysrKysrKysrKysKIGFyY2gveDg2L2luY2x1ZGUvYXNtL3BhZ2Uu aCAgICAgICAgIHwgICAgNSArKwogYXJjaC94ODYvbW0vaWRlbnRfbWFwLmMgICAgICAgICAgICAg fCAgIDc0ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKwogYXJjaC94ODYvbW0v aW5pdF82NC5jICAgICAgICAgICAgICAgfCAgIDc0IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLQogNSBmaWxlcyBjaGFuZ2VkLCAxNTEgaW5zZXJ0aW9ucygrKSwgNzMgZGVsZXRp b25zKC0pCgpJbmRleDogbGludXgtMi42L2FyY2gveDg2L2Jvb3QvY29tcHJlc3NlZC9taXNjLmMK PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PQotLS0gbGludXgtMi42Lm9yaWcvYXJjaC94ODYvYm9vdC9jb21wcmVzc2VkL21p c2MuYworKysgbGludXgtMi42L2FyY2gveDg2L2Jvb3QvY29tcHJlc3NlZC9taXNjLmMKQEAgLTks NiArOSwxMSBAQAogICogSGlnaCBsb2FkZWQgc3R1ZmYgYnkgSGFucyBMZXJtZW4gJiBXZXJuZXIg QWxtZXNiZXJnZXIsIEZlYi4gMTk5NgogICovCiAKKyNp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QlzZXRfcGdkKHBnZCwgX19wZ2QoX19wYShwdWQpIHwgX0tFUk5QR19UQUJMRSkpOwot CX0KLQotCXJldHVybiAwOwotfQorI2luY2x1ZGUgImlkZW50X21hcC5jIgogCiBzdGF0aWMgaW50 IF9faW5pdCBwYXJzZV9kaXJlY3RfZ2JwYWdlc19vZmYoY2hhciAqYXJnKQogewo= --047d7b4145342182d2050fa4ae87-- -- 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/