Date: Wed, 22 Feb 2017 02:45:56 +0000 From: "decui_microsoft.com (Dexuan Cui)" <phabric-noreply@FreeBSD.org> To: freebsd-virtualization@freebsd.org Subject: [Differential] D9686: fix UEFI VM's bootup on Hyper-V (i.e. Hyper-V Generation-2 VM) Message-ID: <cabdd634ef87b067fddd3b4dc253d86c@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-uh6r5mtg6hczhprjdyvk-req@FreeBSD.org> References: <differential-rev-PHID-DREV-uh6r5mtg6hczhprjdyvk-req@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--b1_cabdd634ef87b067fddd3b4dc253d86c Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 ZGVjdWlfbWljcm9zb2Z0LmNvbSB1cGRhdGVkIHRoZSBzdW1tYXJ5IGZvciB0aGlzIHJldmlzaW9u LgpkZWN1aV9taWNyb3NvZnQuY29tIHVwZGF0ZWQgdGhpcyByZXZpc2lvbiB0byBEaWZmIDI1NTA1 LgpkZWN1aV9taWNyb3NvZnQuY29tIGFkZGVkIGEgY29tbWVudC4KCgogIEZpeGVkIHRoZSB0eXBv OiBhdmlhYmxlIC0+IGF2YWlsYWJsZS4KCkNIQU5HRVMgU0lOQ0UgTEFTVCBVUERBVEUKICBodHRw czovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDk2ODY/dnM9MjU0MTQmaWQ9MjU1MDUKClJFVklTSU9O IERFVEFJTAogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9EOTY4NgoKQUZGRUNURUQgRklM RVMKICBzeXMvYm9vdC9lZmkvbG9hZGVyL2NvcHkuYwoKRU1BSUwgUFJFRkVSRU5DRVMKICBodHRw czovL3Jldmlld3MuZnJlZWJzZC5vcmcvc2V0dGluZ3MvcGFuZWwvZW1haWxwcmVmZXJlbmNlcy8K ClRvOiBkZWN1aV9taWNyb3NvZnQuY29tLCBpbXAsIGpoYiwgd2lsbCwga2liLCBkZWxwaGlqLCBl bWFzdGUsIHNlcGhlcm9zYV9nbWFpbC5jb20sIGhvbnpoYW5fbWljcm9zb2Z0LmNvbSwgaG93YXJk MHN1X2dtYWlsLmNvbSwgbWFyY2VsCkNjOiBmcmVlYnNkLXZpcnR1YWxpemF0aW9uLWxpc3QK --b1_cabdd634ef87b067fddd3b4dc253d86c Content-Type: text/x-patch; charset=utf-8; name="D9686.25505.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D9686.25505.patch" ZGlmZiAtLWdpdCBhL3N5cy9ib290L2VmaS9sb2FkZXIvY29weS5jIGIvc3lzL2Jvb3QvZWZpL2xv YWRlci9jb3B5LmMKLS0tIGEvc3lzL2Jvb3QvZWZpL2xvYWRlci9jb3B5LmMKKysrIGIvc3lzL2Jv b3QvZWZpL2xvYWRlci9jb3B5LmMKQEAgLTM5LDEyICszOSw3MSBAQAogCiAjaW5jbHVkZSAibG9h ZGVyX2VmaS5oIgogCisjaWYgZGVmaW5lZChfX2kzODZfXykgfHwgZGVmaW5lZChfX2FtZDY0X18p CisKKyNkZWZpbmUgS0VSTkVMX1BIWVNJQ0FMX0JBU0UgKDIqMTAyNCoxMDI0KQorCitzdGF0aWMg dm9pZAorZWZpX3ZlcmlmeV9zdGFnaW5nX3NpemUodW5zaWduZWQgbG9uZyAqbnJfcGFnZXMpCit7 CisJVUlOVE4gc3o7CisJRUZJX01FTU9SWV9ERVNDUklQVE9SICptYXAsICpwOworCUVGSV9QSFlT SUNBTF9BRERSRVNTIHN0YXJ0LCBlbmQ7CisJVUlOVE4ga2V5LCBkc3o7CisJVUlOVDMyIGR2ZXI7 CisJRUZJX1NUQVRVUyBzdGF0dXM7CisJaW50IGksIG5kZXNjOworCXVuc2lnbmVkIGxvbmcgYXZh aWxhYmxlX3BhZ2VzOworCisJc3ogPSAwOworCXN0YXR1cyA9IEJTLT5HZXRNZW1vcnlNYXAoJnN6 LCAwLCAma2V5LCAmZHN6LCAmZHZlcik7CisJaWYgKHN0YXR1cyAhPSBFRklfQl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RlUGFnZXMoQWxsb2NhdGVNYXhBZGRyZXNzLCBFZmlMb2FkZXJEYXRhLAor CSAgICBucl9wYWdlcywgJnN0YWdpbmcpOworI2Vsc2UKIAlzdGF0dXMgPSBCUy0+QWxsb2NhdGVQ YWdlcyhBbGxvY2F0ZUFueVBhZ2VzLCBFZmlMb2FkZXJEYXRhLAotCSAgICBTVEFHRV9QQUdFUywg JnN0YWdpbmcpOworCSAgICBucl9wYWdlcywgJnN0YWdpbmcpOworI2VuZGlmCiAJaWYgKEVGSV9F UlJPUihzdGF0dXMpKSB7CiAJCXByaW50ZigiZmFpbGVkIHRvIGFsbG9jYXRlIHN0YWdpbmcgYXJl YTogJWx1XG4iLAogCQkgICAgRUZJX0VSUk9SX0NPREUoc3RhdHVzKSk7CiAJCXJldHVybiAoc3Rh dHVzKTsKIAl9Ci0Jc3RhZ2luZ19lbmQgPSBzdGFnaW5nICsgU1RBR0VfUEFHRVMgKiBFRklfUEFH RV9TSVpFOworCXN0YWdpbmdfZW5kID0gc3RhZ2luZyArIG5yX3BhZ2VzICogRUZJX1BBR0VfU0la RTsKIAogI2lmIGRlZmluZWQoX19hYXJjaDY0X18pIHx8IGRlZmluZWQoX19hcm1fXykKIAkvKgoK --b1_cabdd634ef87b067fddd3b4dc253d86c--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cabdd634ef87b067fddd3b4dc253d86c>