diff mbox

[edk2,wave,3,05/15] OvmfPkg: VirtioRngDxe: clear all feature bits more explicitly

Message ID 1457960012-29481-6-git-send-email-lersek@redhat.com
State Superseded
Headers show

Commit Message

Laszlo Ersek March 14, 2016, 12:53 p.m. UTC
This too is in preparation for the following patches.

After this patch, all four drivers manage their feature bits with explicit
masking.

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>

---
 OvmfPkg/VirtioRngDxe/VirtioRng.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/VirtioRng.c
index 290bddeeecae..d916534aac63 100644
--- a/OvmfPkg/VirtioRngDxe/VirtioRng.c
+++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c
@@ -290,15 +290,16 @@  VirtioRngInit (
   }
 
   //
   // step 5 -- Report understood features and guest-tuneables. None are
   // currently defined for VirtioRng, and no generic features are needed by
   // this driver.
   //
-  Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, 0);
+  Features &= 0;
+  Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features);
   if (EFI_ERROR (Status)) {
     goto ReleaseQueue;
   }
 
   //
   // step 6 -- initialization complete
   //