Lines Matching refs:vdev

47 	struct virtio_device *vdev;
425 dev_dbg(&vm->vdev->dev, "adding memory block: %lu\n", mb_id);
448 dev_dbg(&vm->vdev->dev, "removing memory block: %lu\n", mb_id);
469 dev_dbg(&vm->vdev->dev, "offlining and removing memory block: %lu\n",
492 if (virtio_has_feature(vm->vdev, VIRTIO_MEM_F_ACPI_PXM))
531 dev_warn_ratelimited(&vm->vdev->dev,
861 return virtio16_to_cpu(vm->vdev, vm->resp.type);
869 .type = cpu_to_virtio16(vm->vdev, VIRTIO_MEM_REQ_PLUG),
870 .u.plug.addr = cpu_to_virtio64(vm->vdev, addr),
871 .u.plug.nb_blocks = cpu_to_virtio16(vm->vdev, nb_vm_blocks),
897 .type = cpu_to_virtio16(vm->vdev, VIRTIO_MEM_REQ_UNPLUG),
898 .u.unplug.addr = cpu_to_virtio64(vm->vdev, addr),
899 .u.unplug.nb_blocks = cpu_to_virtio16(vm->vdev, nb_vm_blocks),
921 .type = cpu_to_virtio16(vm->vdev, VIRTIO_MEM_REQ_UNPLUG_ALL),
950 dev_dbg(&vm->vdev->dev, "plugging memory block: %lu : %i - %i\n", mb_id,
971 dev_dbg(&vm->vdev->dev, "unplugging memory block: %lu : %i - %i\n",
1113 dev_err(&vm->vdev->dev,
1504 virtio_cread_le(vm->vdev, struct virtio_mem_config, plugged_size,
1510 virtio_cread_le(vm->vdev, struct virtio_mem_config,
1517 virtio_cread_le(vm->vdev, struct virtio_mem_config, requested_size,
1520 dev_info(&vm->vdev->dev, "plugged size: 0x%llx", vm->plugged_size);
1521 dev_info(&vm->vdev->dev, "requested size: 0x%llx", vm->requested_size);
1594 dev_err(&vm->vdev->dev,
1613 struct virtio_mem *vm = vq->vdev->priv;
1622 vq = virtio_find_single_vq(vm->vdev, virtio_mem_handle_response,
1636 if (!vm->vdev->config->get) {
1637 dev_err(&vm->vdev->dev, "config access disabled\n");
1646 dev_warn(&vm->vdev->dev, "disabled in kdump kernel\n");
1651 virtio_cread_le(vm->vdev, struct virtio_mem_config, plugged_size,
1653 virtio_cread_le(vm->vdev, struct virtio_mem_config, block_size,
1655 virtio_cread_le(vm->vdev, struct virtio_mem_config, node_id,
1658 virtio_cread_le(vm->vdev, struct virtio_mem_config, addr, &vm->addr);
1659 virtio_cread_le(vm->vdev, struct virtio_mem_config, region_size,
1667 dev_err(&vm->vdev->dev,
1674 dev_warn(&vm->vdev->dev,
1677 dev_warn(&vm->vdev->dev,
1680 dev_warn(&vm->vdev->dev,
1702 dev_info(&vm->vdev->dev, "start address: 0x%llx", vm->addr);
1703 dev_info(&vm->vdev->dev, "region size: 0x%llx", vm->region_size);
1704 dev_info(&vm->vdev->dev, "device block size: 0x%llx",
1706 dev_info(&vm->vdev->dev, "memory block size: 0x%lx",
1708 dev_info(&vm->vdev->dev, "subblock size: 0x%llx",
1711 dev_info(&vm->vdev->dev, "nid: %d", vm->nid);
1722 const char *name = kstrdup(dev_name(&vm->vdev->dev), GFP_KERNEL);
1731 dev_warn(&vm->vdev->dev, "could not reserve device region\n");
1732 dev_info(&vm->vdev->dev,
1756 static int virtio_mem_probe(struct virtio_device *vdev)
1764 vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL);
1769 vm->vdev = vdev;
1800 dev_info(&vm->vdev->dev, "unplugging all memory is required\n");
1812 virtio_device_ready(vdev);
1824 vdev->config->del_vqs(vdev);
1827 vdev->priv = NULL;
1832 static void virtio_mem_remove(struct virtio_device *vdev)
1834 struct virtio_mem *vm = vdev->priv;
1881 dev_warn(&vdev->dev, "device still has system memory added\n");
1892 vdev->config->reset(vdev);
1893 vdev->config->del_vqs(vdev);
1896 vdev->priv = NULL;
1899 static void virtio_mem_config_changed(struct virtio_device *vdev)
1901 struct virtio_mem *vm = vdev->priv;
1908 static int virtio_mem_freeze(struct virtio_device *vdev)
1914 dev_err(&vdev->dev, "save/restore not supported.\n");
1918 static int virtio_mem_restore(struct virtio_device *vdev)