From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 09 Oct 2019 23:22:37 -0000 Received: from aserp2120.oracle.com ([141.146.126.78]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iILHv-0003t0-6R for speck@linutronix.de; Thu, 10 Oct 2019 01:22:36 +0200 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x99NKbO5116317 for ; Wed, 9 Oct 2019 23:22:29 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2vek4qqq75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 09 Oct 2019 23:22:28 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x99NKHae033374 for ; Wed, 9 Oct 2019 23:20:28 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2vh5cbs78x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 09 Oct 2019 23:20:23 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x99NK3nP027082 for ; Wed, 9 Oct 2019 23:20:03 GMT From: Kanth Ghatraju Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: [MODERATED] Re: [PATCH v5 6/8] NX 6 Date: Wed, 9 Oct 2019 19:20:03 -0400 References: <1561989149-17323-1-git-send-email-pbonzini@redhat.com> <1561989149-17323-7-git-send-email-pbonzini@redhat.com> <973c85efc96c05cba9ddfc2f5bf53c9482801924.camel@decadent.org.uk> <4d3beab5-4021-832d-5c40-a0f657d55631@redhat.com> In-Reply-To: <4d3beab5-4021-832d-5c40-a0f657d55631@redhat.com> Message-Id: <64FBE75C-9532-4412-AF72-EBA4BE034A40@oracle.com> Content-Type: multipart/signed; boundary="Apple-Mail=_FFA20231-90B3-4A7E-8438-DE591E2E9453"; protocol="application/pgp-signature"; micalg="pgp-sha256" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156) --Apple-Mail=_FFA20231-90B3-4A7E-8438-DE591E2E9453 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Paolo, Thanks for the list. I have a version of back port working all the way = to 4.1 and my set of back ports is pretty close to what you have. Is the = code ready for back ports or are you planning some more changes? In some = of the previous mails, you alluded to =E2=80=9Cminor changes=E2=80=9D. = Can you please share the plan. Thanks. -kanth > On Oct 9, 2019, at 7:08 PM, speck for Paolo Bonzini = wrote: >=20 > On 10/10/19 00:42, speck for Ben Hutchings wrote: >>=20 >> I've started trying to backport the NX patches to stable branches, = and >> I think I can take them back as far as 4.9. >>=20 >> However, kvm_mmu_zap_all() is a relatively new addition and looks = hard >> to backport. I intend to make the nx_huge_pages parameter read-only >> (0444 permissions) and delete this "if (new_val !=3D old_val)" block. >> Does that seem reasonable? >=20 > Just replace it with kvm_mmu_invalidate_zap_all_pages (which will be = in > v6, because we have since brought it back from the dead). >=20 > You also have to backport commit 833b45de69a6 ("kvm: x86, powerpc: do > not allow clearing largepages debugfs entry", 2019-09-30) and make the > new statistic 0444 as well. This is the only other change in v6 for = now. >=20 > This is the list of prerequisites I had prepared, it should go back to = 4.3 or so: >=20 > 17e4bce0ae63c7e03f3c7fa8d80890e7af3d4971 kvm: x86: mmu: fix ubsan = index-out-of-range warning > cd1872f028556dc0e8424e58413c0268c159383b kvm: x86: mmu: Make = force_pt_level bool > 5ed5c5c8fdbab889837c9223fc6f4bdaa830879c kvm: x86: mmu: Simplify = force_pt_level calculation code in FNAME(page_fault)() > fd136902187838bcae3a572f41cb703553dd63b8 kvm: x86: mmu: Move = mapping_level_dirty_bitmap() call in mapping_level() > d8aacf5df86a961923a2c9c547d341d64a9d9f5d kvm: x86: mmu: Remove = mapping_level_dirty_bitmap() > 5225fdf8c8bea4418f69875804584c89a27c170e kvm: x86: mmu: Eliminate an = extra memory slot search in mapping_level() > 018aabb56d6109c8f12397c24e59f67c58870ac1 kvm: x86: mmu: Encapsulate = the type of rmap-chain head in a new struct > ded5874946baa15b56b531f638f9c706266deb7b kvm: x86: mmu: Consolidate = quickly_check_mmio_pf() and is_mmio_page_fault() > 450869d6dbb72b370774fd4ee14c4f275bb08f98 kvm: x86: merge = handle_mmio_page_fault and handle_mmio_page_fault_common > e9ee956e311d3d0a1506995b98e8de0b30773e1a kvm: x86: mmu: Move = handle_mmio_page_fault() call to kvm_mmu_page_fault() > 92f94f1e9e509caa564353c516c904278999e350 kvm: mmu: rename = has_wrprotected_page to mmu_gfn_lpage_is_disallowed > 547ffaed871af7db8713972eaf630802cac47cb1 kvm: mmu: introduce = kvm_mmu_gfn_{allow, disallow}_lpage > 029499b477389f7d6486c8c759a8498bcfecf322 kvm: x86: mmu: Make = mmu_set_spte() return emulate value > 4700579241d2d587765a58dddd1b2a89902767c0 kvm: x86: mmu: Move = initialization of parent_ptes out from kvm_mmu_alloc_page() > 0e3d0648bd903ff6cda7499f9349a2ce612bccb4 kvm: x86: mmu: always set = accessed bit in shadow PTEs > 98bba238429e200521594ed30dd1edad7faa0081 kvm: x86: mmu: Move = parent_pte handling from kvm_mmu_get_page() to link_shadow_page() > bb11c6c96544737aede6a2eb92e5c6bc8b46534b kvm: x86: mmu: Remove unused = parameter parent_pte from kvm_mmu_get_page() > e08d26f0712532c79b5ba6200862eaf2036f8df6 kvm: x86: simplify = ept_misconfig > 9b8ebbdb74b5ad76b9dfd8b101af17839174b126 kvm: x86: extend usage of = RET_MMIO_PF_* constants > 42522d08cdba6d8be4247e4f0770f39f4708b71f KVM: MMU: drop vcpu param in = gpte_access > 0d9ce162cf46c99628cc5da9510b959c7976735b kvm: Convert kvm_lock to a = mutex > 7ee0e5b29d275ac299cdf8ef67e60bf1648c8c6a KVM: x86: MMU: Remove unused = parameter of __direct_map() > 43fdcda96e2550c6d1c46fb8a78801aa2f7276ed kvm: mmu: Do not release the = page inside mmu_set_spte() > 9de2b2120668d2874570b14105e49235097b70c2 KVM: x86: make FNAME(fetch) = and __direct_map more similar > d679b32611c0102ce33b9e1a4e4b94854ed1812a KVM: x86: remove now unneeded = hugepage gfn adjustment > 1e823556fd3af3635e174f570d0b85b4e72b2b1c KVM: x86: change = kvm_mmu_page_get_gfn BUG_ON to WARN_ON > bf9af89c4146978000eba9b0a1eb43540d893223 KVM: x86: add tracepoints = around __direct_map and FNAME(fetch) > 833b45de69a6016c4b0cebe6765d526a31a81580 kvm: x86, powerpc: do not = allow clearing largepages debugfs entry >=20 > None of the backports should be particularly tricky. >=20 > Thanks, >=20 > Paolo >=20 --Apple-Mail=_FFA20231-90B3-4A7E-8438-DE591E2E9453 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg8OoU+fZatIlEeG7RKoKlxvgTNUFAl2eayMACgkQRKoKlxvg TNVC8BAAn0b873CY+1WbUFbePvzewGuauz40MG7Se8yz4ZYeuRYwcPqkENsdzoN1 rpk/gke5LYDAxZMyZJwwFB9RZ51hT+N3uwlOGG+8roK3+EcQkA0/VvhXOhcxea4a PPlr2VY4hPIlvVOQ2FiBvA4iQscNLiqmNQFWOmcwyNR1EJXK7m9lvIeYeZaeLZBF oaFozwUVXF0fEJ/nOtgrITExFkOo8DIBW8wP80cTYUdlWitJQLYlzZyukXcBm/QO TfeE461+o31n73nDQtpv2xmmKLz0gVBQynbA8YYgpmCxlR0cLY4Hv7OsmUs+8vIr 4NePP2lIV1jDd3d2g0jOOgdunqcOCv/SS0QVZ/QnhxCyIolIMErozIU30NvQFTbz IGQrWoIoKu0HL8tlodlXY9SNKCuzwJg4S7h2m2vdGkvFbMve8OeeB8DbFMy0OvJX cBCsVyXOXhoI2nmjvQv2MGzc9u5OM43VSCu7R0MDvE8blTaGvefZ7kCV6iVGDWCH ST9/UpW607kSrsnOuphg65W61gGNQ/oic/ZUyIx03jyWGBkrC5NiUXYauwhM+Ybj dv4qViPZDMTbDCJ3dha9Qj6lP3E2k+WHxbLAPDjmqKYhURsnTrZWJug4/DWu91wg hgdWBHKiyawbY5Nc6jtpZI+tjefzx/hhWx9WkbLawMcVqIfKeh8= =L3+L -----END PGP SIGNATURE----- --Apple-Mail=_FFA20231-90B3-4A7E-8438-DE591E2E9453--