~ubuntu-branches/ubuntu/trusty/slof/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/libvirtio/virtio.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2015-01-23 12:18:53 UTC
  • mfrom: (6.1.1 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20150123121853-or6a6rkrzor2peku
Tags: 20140630+dfsg-1ubuntu1~14.04
Backport wholesale to trusty to fix network boot issues (LP: #1374568)

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
 
163
163
{
164
164
        if (dev->type == VIRTIO_TYPE_PCI) {
165
 
                ci_write_32(dev->base+VIRTIOHDR_GUEST_FEATURES, features);
 
165
                ci_write_32(dev->base+VIRTIOHDR_GUEST_FEATURES, bswap_32(features));
 
166
        }
 
167
}
 
168
 
 
169
/**
 
170
 * Get host feature bits
 
171
 */
 
172
void virtio_get_host_features(struct virtio_device *dev, int *features)
 
173
 
 
174
{
 
175
        if (dev->type == VIRTIO_TYPE_PCI && features) {
 
176
                *features = bswap_32(ci_read_32(dev->base+VIRTIOHDR_DEVICE_FEATURES));
166
177
        }
167
178
}
168
179