void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)

{

    VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);

    uint32_t val = data;



    if (addr > (vdev->config_len - sizeof(val)))

        return;



    stl_p(vdev->config + addr, val);



    if (k->set_config) {

        k->set_config(vdev, vdev->config);

    }

}
