From owner-freebsd-virtualization@freebsd.org Thu Feb 22 23:21:09 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ABF1F0D290 for ; Thu, 22 Feb 2018 23:21:09 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D31057ECE9 for ; Thu, 22 Feb 2018 23:21:08 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id C9E65686A for ; Thu, 22 Feb 2018 23:21:08 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id C9449107734; Thu, 22 Feb 2018 23:21:08 +0000 (UTC) Date: Thu, 22 Feb 2018 23:21:08 +0000 To: freebsd-virtualization@freebsd.org From: "fabian.freyer_physik.tu-berlin.de (Fabian Freyer)" Reply-to: D14473+333+002e492985d67ce8@reviews.freebsd.org Subject: [Differential] D14473: userboot: add callbacks to set unrestricted guest mode Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , X-Herald-Rules: <28>, <67> X-Phabricator-Projects: <#bhyve> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk Thread-Topic: PHID-DREV-z4kdgdlru2lrsvfkw4bo In-Reply-To: References: Thread-Index: OWY4MjZiMDdiMWRiNGU2MWQzZDM0N2I0N2FiIFqPUGQ= X-Phabricator-Stamps: actor(@fabian.freyer_physik.tu-berlin.de) application(Differential) author(@fabian.freyer_physik.tu-berlin.de) herald(H28) herald(H67) mention(@grehan) monogram(D14473) object-type(DREV) phid(PHID-DREV-z4kdgdlru2lrsvfkw4bo) reviewer(#bhyve) reviewer(@grehan) reviewer(@imp) revision-repository(rS) revision-status(needs-review) subscriber(#contributor_reviews_base) subscriber(@freebsd-virtualization-list) subscriber(@grehan) subscriber(@imp) tag(#bhyve) via(web) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_f3a7a6f87bbecfef897ce5c7ed3b209f" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2018 23:21:09 -0000 --b1_f3a7a6f87bbecfef897ce5c7ed3b209f Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 ZmFiaWFuLmZyZXllcl9waHlzaWsudHUtYmVybGluLmRlIHVwZGF0ZWQgdGhpcyByZXZpc2lvbiB0 byBEaWZmIDM5NjIyLgpmYWJpYW4uZnJleWVyX3BoeXNpay50dS1iZXJsaW4uZGUgYWRkZWQgYSBj b21tZW50LgoKCiAgYWRkcmVzc2VkIEBncmVoYW4ncyBjb21tZW50cyByZWdhcmRpbmcgc3R5bGUo OSkKClJFUE9TSVRPUlkKICByUyBGcmVlQlNEIHNyYyByZXBvc2l0b3J5CgpDSEFOR0VTIFNJTkNF IExBU1QgVVBEQVRFCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL0QxNDQ3Mz92cz0zOTYx OSZpZD0zOTYyMgoKUkVWSVNJT04gREVUQUlMCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3Jn L0QxNDQ3MwoKQUZGRUNURUQgRklMRVMKICBzdGFuZC91c2VyYm9vdC91c2VyYm9vdC5oCiAgdXNy LnNiaW4vYmh5dmVsb2FkL2JoeXZlbG9hZC5jCgpFTUFJTCBQUkVGRVJFTkNFUwogIGh0dHBzOi8v cmV2aWV3cy5mcmVlYnNkLm9yZy9zZXR0aW5ncy9wYW5lbC9lbWFpbHByZWZlcmVuY2VzLwoKVG86 IGZhYmlhbi5mcmV5ZXJfcGh5c2lrLnR1LWJlcmxpbi5kZSwgaW1wLCAjYmh5dmUsIGdyZWhhbgpD YzogZ3JlaGFuLCBpbXAsIGZyZWVic2QtdmlydHVhbGl6YXRpb24tbGlzdCwgI2NvbnRyaWJ1dG9y X3Jldmlld3NfYmFzZQo= --b1_f3a7a6f87bbecfef897ce5c7ed3b209f Content-Type: text/x-patch; charset=utf-8; name="D14473.39622.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D14473.39622.patch" ZGlmZiAtLWdpdCBhL3Vzci5zYmluL2JoeXZlbG9hZC9iaHl2ZWxvYWQuYyBiL3Vzci5zYmluL2Jo eXZlbG9hZC9iaHl2ZWxvYWQuYwotLS0gYS91c3Iuc2Jpbi9iaHl2ZWxvYWQvYmh5dmVsb2FkLmMK KysrIGIvdXNyLnNiaW4vYmh5dmVsb2FkL2JoeXZlbG9hZC5jCkBAIC01NjAsNiArNTYwLDMzIEBA CiAJcmV0dXJuICh2bV9zZXRfZGVzYyhjdHgsIHZjcHUsIHJlZywgYmFzZSwgbGltaXQsIGFjY2Vz cykpOwogfQogCitzdGF0aWMgaW50CitjYl92bV9nZXRfdW5yZXN0cmljdGVkX2d1ZXN0KHZvaWQq IGFyZywgaW50IHZjcHUsIGludCAqcmV0dmFsKQoreworCisJcmV0dXJuICh2bV9nZXRfY2FwYWJp bGl0eShjdHgsIHZjcHUsCisJICAgIFZNX0NBUF9VTlJFU1RSSUNURURfR1VFU1QsIHJldHZhbCk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