From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web12.3640.1608153601436957133 for ; Wed, 16 Dec 2020 13:20:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Do55IwDC; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608153600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B1jgT8WGbdCbrRa24GYt4jZ+XK+NEQQ/2XVm0qXf+R0=; b=Do55IwDCsPllsLEt+ZXM9ktuKokquBWLLt2oI8TqVLiH5HDWfEHzNkZKSXOCuky6A0Cu3W rAITIikcY2+0qFp5vkRYScyUHFVX0phULHpY0e5FluMwmy93x5zpozPdN7fggaIFXg7bEw HbJXlrGWffS7axI5khUOGWCIWJW8zxY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-hSteD7UxM0m-d7JfW_IzFw-1; Wed, 16 Dec 2020 16:19:57 -0500 X-MC-Unique: hSteD7UxM0m-d7JfW_IzFw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 56C8F800D53; Wed, 16 Dec 2020 21:19:56 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-152.ams2.redhat.com [10.36.114.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92458106D5AC; Wed, 16 Dec 2020 21:19:51 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io, virtio-fs@redhat.com, lersek@redhat.com Cc: Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2 PATCH 04/48] OvmfPkg/VirtioFsDxe: implement virtio device (un)initialization Date: Wed, 16 Dec 2020 22:10:41 +0100 Message-Id: <20201216211125.19496-5-lersek@redhat.com> In-Reply-To: <20201216211125.19496-1-lersek@redhat.com> References: <20201216211125.19496-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 QWRkIHRoZSBWaXJ0aW9Gc0luaXQoKSwgVmlydGlvRnNVbmluaXQoKSwgYW5kIFZpcnRpb0ZzRXhp dEJvb3QoKQpmdW5jdGlvbnMuCgpJbiBWaXJ0aW9Gc0luaXQoKToKCi0gVmVyaWZ5IHRoZSBob3N0 LXNpZGUgY29uZmlnIG9mIHRoZSB2aXJ0aW8tZnMgZGV2aWNlLgoKLSBTYXZlIHRoZSBmaWxlc3lz dGVtIGxhYmVsICgidGFnIikgZm9yIGxhdGVyLCBmcm9tIHRoZSBjb25maWd1cmF0aW9uIGFyZWEK ICBvZiB0aGUgdmlydGlvLWZzIGRldmljZS4KCi0gU2F2ZSB0aGUgdmlydGlvIHF1ZXVlIHNpemUg Zm9yIGxhdGVyIGFzIHdlbGwuCgotIFNldCB1cCB0aGUgdmlydGlvIHJpbmcgZm9yIHNlbmRpbmcg cmVxdWVzdHMuCgpJbiBWaXJ0aW9Gc1VuaW5pdCgpOgoKLSBSZXNldCB0aGUgZGV2aWNlLgoKLSBU ZWFyIGRvd24gdGhlIHZpcnRpbyByaW5nLgoKSW4gVmlydGlvRnNFeGl0Qm9v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B0b3JuIGRv d24gaW4gdmFyaW91cyBmdW5jdGlvbnMNCiAgIC8vIGF0IHZhcmlvdXMgY2FsbCBkZXB0aHMuIFRo ZSB0YWJsZSB0byB0aGUgcmlnaHQgc2hvdWxkIG1ha2UgaXQgZWFzaWVyIHRvDQogICAvLyB0cmFj ayB0aGVtLg0KICAgLy8NCiAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQg ICAgICAgICBpbml0IGZ1bmN0aW9uICAgICAgIGluaXQgZGVwdGgNCiAgIC8vICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0gICAtLS0tLS0tLS0tLS0tLS0tLS0gIC0tLS0t LS0tLS0NCiAgIFVJTlQ2NCAgICAgICAgICAgICAgICAgICAgICAgICAgU2lnbmF0dXJlOyAvLyBE cml2ZXJCaW5kaW5nU3RhcnQgIDANCiAgIFZJUlRJT19ERVZJQ0VfUFJPVE9DT0wgICAgICAgICAg KlZpcnRpbzsgICAvLyBEcml2ZXJCaW5kaW5nU3RhcnQgIDANCisgIFZJUlRJT19GU19MQUJFTCAg ICAgICAgICAgICAgICAgTGFiZWw7ICAgICAvLyBWaXJ0aW9Gc0luaXQgICAgICAgIDENCisgIFVJ TlQxNiAgICAgICAgICAgICAgICAgICAgICAgICAgUXVldWVTaXplOyAvLyBWaXJ0aW9Gc0luaXQg ICAgICAgIDENCisgIFZSSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgUmluZzsgICAgICAv LyBWaXJ0aW9SaW5nSW5pdCAgICAgIDINCisgIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKlJpbmdNYXA7ICAvLyBWaXJ0aW9SaW5nTWFwICAgICAgIDINCisgIEVGSV9FVkVOVCAgICAg ICAgICAgICAgICAgICAgICAgRXhpdEJvb3Q7ICAvLyBEcml2ZXJCaW5kaW5nU3RhcnQgIDANCiAg IEVGSV9TSU1QTEVfRklMRV9TWVNURU1fUFJPVE9DT0wgU2ltc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IFN0 YXR1cyA9IFZpcnRpby0+UmVhZERldmljZSAoDQorICAgICAgICAgICAgICAgICAgICAgICBWaXJ0 aW8sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhpcw0KKyAgICAgICAgICAg ICAgICAgICAgICAgT0ZGU0VUX09GIChWSVJUSU9fRlNfQ09ORklHLCBUYWdbSWR4XSksIC8vIEZp ZWxkT2Zmc2V0DQorICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgQ29uZmlnLT5UYWdbSWR4 XSwgICAgICAgICAgICAgICAgLy8gRmllbGRTaXplDQorICAgICAgICAgICAgICAgICAgICAgICBz aXplb2YgQ29uZmlnLT5UYWdbSWR4XSwgICAgICAgICAgICAgICAgLy8gQnVmZmVyU2l6ZQ0KKyAg ICAgICAgICAgICAgICAgICAgICAgJkNvbmZpZy0+VGFnW0lkeF0gICAgICAgICAgICAgICAgICAg ICAgIC8vIEJ1ZmZlcg0KKyAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgICAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIHJldHVybiBTdGF0dXM7DQorICAgIH0NCisgIH0NCisN CisgIFN0YXR1cyA9IFZpcnRpby0+UmVhZERldmljZSAoDQorICAgICAgICAgICAgICAgICAgICAg VmlydGlvLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGlzDQorICAg ICAgICAgICAgICAgICAgICAgT0ZGU0VUX09GIChWSVJUSU9fRlNfQ09ORklHLCBOdW1SZXFRdWV1 ZXMpLCAvLyBGaWVsZE9mZnNldA0KKyAgICAgICAgICAgICAgICAgICAgIHNpemVvZiBDb25maWct Pk51bVJlcVF1ZXVlcywgICAgICAgICAgICAgICAgLy8gRmllbGRTaXplDQorICAgICAgICAgICAg ICAgICAgICAgc2l6ZW9mIENvbmZpZy0+TnVtUmVxUXVldWVzLCAgICAgICAgICAgICAgICAvLyBC dWZmZXJTaXplDQorICAgICAgICAgICAgICAgICAgICAgJkNvbmZpZy0+TnVtUmVxUXVldWVzICAg ICAgICAgICAgICAgICAgICAgICAvLyBCdWZmZXINCisgICAgICAgICAgICAgICAgICAgICApOw0K KyAgcmV0dXJuIFN0YXR1czsNCit9DQorDQorLyoqDQorICBDb25maWd1cmUgdGhlIFZpcnRpbyBG aWxlc3lzdGVtIGRldmljZSB1bmRlcmx5aW5nIFZpcnRpb0ZzLg0KKw0KKyAgQHBhcmFtW2luLG91 dF0gVmlydGlvRnMgIFRoZSBWSVJUSU9fRlMgb2JqZWN0IGZvciB3aGljaCBWaXJ0aW8gY29tbXVu aWNhdGlvbg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3VsZCBiZSBzZXQgdXAuIE9u IGlucHV0LCB0aGUgY2FsbGVyIGlzDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9u c2libGUgZm9yIFZpcnRpb0ZzLT5WaXJ0aW8gaGF2aW5nIGJlZW4NCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBpbml0aWFsaXplZC4gT24gb3V0cHV0LCBzeW5jaHJvbm91cyBWaXJ0aW8NCisg ICAgICAgICAgICAgICAgICAgICAgICAgICBGaWxlc3lzdGVtIGNvbW1hbmRzIChwcmltaXRpdmVz KSBtYXkgYmUgc3VibWl0dGVkIHRvDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGRl dmljZS4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICBWaXJ0aW8gbWFjaGluZXJ5IGhh cyBiZWVuIHNldCB1cC4NCisNCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICBUaGUgaG9zdC1z aWRlIGNvbmZpZ3VyYXRpb24gb2YgdGhlIFZpcnRpbyBGaWxlc3lzdGVtDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgaXMgbm90IHN1cHBvcnRlZCBieSB0aGlzIGRyaXZlci4NCisNCisgIEBy ZXR1cm4gICAgICAgICAgICAgICAgICBFcn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