Skip to content

Commit

Permalink
virtio: maintain 'packed_ring' field in VirtIODevice
Browse files Browse the repository at this point in the history
The field is 'true' when 'packed ring' feature is negotiated.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
  • Loading branch information
ybendito authored and YanVugenfirer committed Dec 31, 2019
1 parent 986b0b7 commit 2b41e17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions VirtIO/VirtIOPCICommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ NTSTATUS virtio_set_features(VirtIODevice *vdev, u64 features)
NTSTATUS status;

vdev->event_suppression_enabled = virtio_is_feature_enabled(features, VIRTIO_RING_F_EVENT_IDX);
vdev->packed_ring = virtio_is_feature_enabled(features, VIRTIO_F_RING_PACKED);

status = vdev->device->set_features(vdev, features);
if (!NT_SUCCESS(status)) {
Expand Down
3 changes: 3 additions & 0 deletions VirtIO/virtio_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ struct virtio_device
// true if the VIRTIO_RING_F_EVENT_IDX feature flag has been negotiated
bool event_suppression_enabled;

// true if the VIRTIO_F_RING_PACKED feature flag has been negotiated
bool packed_ring;

// internal device operations, implemented separately for legacy and modern
const struct virtio_device_ops *device;

Expand Down

0 comments on commit 2b41e17

Please sign in to comment.