diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-03-12 01:47:04 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-04-06 13:04:03 +0200 |
commit | 0c2a486078ff28414209281b7d39197b89e0d81f (patch) | |
tree | 6f74447673286e25792ff3272319ffc4e1d6da32 /OvmfPkg | |
parent | 07af4eee931210bad04b98d37a35bd0f61ba6bd3 (diff) | |
download | edk2-platforms-0c2a486078ff28414209281b7d39197b89e0d81f.tar.xz |
OvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bits
VirtioBlkDxe only recognizes virtio-block feature bits that the device
offers non-negotiably. Nonetheless, in preparation for the following
patches, don't try to clear them even for simplicity.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c index daccc7a5d0..8257effac2 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -737,12 +737,11 @@ VirtioBlkInit ( //
- // step 5 -- Report understood features. There are no virtio-blk specific
- // features to negotiate in virtio-0.9.5, plus we do not want any of the
- // device-independent (known or unknown) VIRTIO_F_* capabilities (see
- // Appendix B).
+ // step 5 -- Report understood features.
//
- Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, 0);
+ Features &= VIRTIO_BLK_F_BLK_SIZE | VIRTIO_BLK_F_TOPOLOGY | VIRTIO_BLK_F_RO |
+ VIRTIO_BLK_F_FLUSH;
+ Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features);
if (EFI_ERROR (Status)) {
goto ReleaseQueue;
}
|