void virtqueue_map_sg(struct iovec *sg, hwaddr *addr,
    size_t num_sg, int is_write)
{
    unsigned int i;
    hwaddr len;
    for (i = 0; i < num_sg; i++) {
        len = sg[i].iov_len;
        sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
        if (sg[i].iov_base == NULL || len != sg[i].iov_len) {
            error_report("virtio: trying to map MMIO memory");
void virtqueue_map_sg(struct iovec *sg, hwaddr *addr,
    size_t num_sg, int is_write)
{
    unsigned int i;
    hwaddr len;
    for (i = 0; i < num_sg; i++) {
        len = sg[i].iov_len;
        sg[i].iov_base = cpu_physical_memory_map(addr[i], &len, is_write);
        if (sg[i].iov_base == NULL || len != sg[i].iov_len) {
            error_report("virtio: trying to map MMIO memory");
void FUNC_0(struct iovec *VAR_0, hwaddr *VAR_1,
    size_t VAR_2, int VAR_3)
{
    unsigned int VAR_4;
    hwaddr len;
    for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) {
        len = VAR_0[VAR_4].iov_len;
        VAR_0[VAR_4].iov_base = cpu_physical_memory_map(VAR_1[VAR_4], &len, VAR_3);
        if (VAR_0[VAR_4].iov_base == NULL || len != VAR_0[VAR_4].iov_len) {
            error_report("virtio: trying to map MMIO memory");
void FUNC_0(struct iovec *VAR_0, hwaddr *VAR_1,
size_t VAR_2, int VAR_3)
{ unsigned int VAR_4; hwaddr len; for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) { len = VAR_0[VAR_4].iov_len; VAR_0[VAR_4].iov_base = cpu_physical_memory_map(VAR_1[VAR_4], &len, VAR_3); if (VAR_0[VAR_4].iov_base == NULL || len != VAR_0[VAR_4].iov_len) { error_report("virtio: trying to map MMIO memory");