search for: bdrv

Displaying 15 results from an estimated 15 matches for "bdrv".

Did you mean: _drv
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...block_int.h | 1 + hw/scsi-disk.c | 610 ++++++++++++++++++++++++++++++-------------------------- hw/scsi-disk.h | 3 + 5 files changed, 346 insertions(+), 286 deletions(-) diff --git a/block.c b/block.c index 33f3d65..06f92c4 100644 --- a/block.c +++ b/block.c @@ -930,6 +930,21 @@ int bdrv_is_sg(BlockDriverState *bs) return bs->sg; } +void bdrv_set_sg(BlockDriverState *bs, int set) +{ + bs->sg = set; +} + +int bdrv_get_tcq(BlockDriverState *bs) +{ + return bs->tcq; +} + +void bdrv_set_tcq(BlockDriverState *bs, int set) +{ + bs->tcq = set; +} + int bdrv_e...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...block_int.h | 1 + hw/scsi-disk.c | 610 ++++++++++++++++++++++++++++++-------------------------- hw/scsi-disk.h | 3 + 5 files changed, 346 insertions(+), 286 deletions(-) diff --git a/block.c b/block.c index 33f3d65..06f92c4 100644 --- a/block.c +++ b/block.c @@ -930,6 +930,21 @@ int bdrv_is_sg(BlockDriverState *bs) return bs->sg; } +void bdrv_set_sg(BlockDriverState *bs, int set) +{ + bs->sg = set; +} + +int bdrv_get_tcq(BlockDriverState *bs) +{ + return bs->tcq; +} + +void bdrv_set_tcq(BlockDriverState *bs, int set) +{ + bs->tcq = set; +} + int bdrv_e...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...e_count) { - if (dir) - cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV; - else - cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV; - } else { - cmd->hdr.dxfer_direction = SG_DXFER_NONE; - } - cmd->hdr.sbp = cmd->sense; - cmd->hdr.mx_sb_len = cmd->sense_len; + if (bdrv_is_sg(cmd->lun->bdrv)) { + memset(&cmd->hdr, 0, sizeof(struct sg_io_hdr)); + cmd->hdr.interface_id = 'S'; + cmd->hdr.cmd_len = cdb_len; + cmd->hdr.cmdp = cdb; + cmd->hdr.iovec_count = cmd->sge_count; + cmd->hdr.dxferp = cmd->iov; + for (n = 0; n < cmd-&g...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...e_count) { - if (dir) - cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV; - else - cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV; - } else { - cmd->hdr.dxfer_direction = SG_DXFER_NONE; - } - cmd->hdr.sbp = cmd->sense; - cmd->hdr.mx_sb_len = cmd->sense_len; + if (bdrv_is_sg(cmd->lun->bdrv)) { + memset(&cmd->hdr, 0, sizeof(struct sg_io_hdr)); + cmd->hdr.interface_id = 'S'; + cmd->hdr.cmd_len = cdb_len; + cmd->hdr.cmdp = cdb; + cmd->hdr.iovec_count = cmd->sge_count; + cmd->hdr.dxferp = cmd->iov; + for (n = 0; n < cmd-&g...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...fine MEGASAS_IO_SENSE_BUFF_ADDR_LO_OFFSET 0x18 +#define MEGASAS_IO_SENSE_BUFF_ADDR_HI_OFFSET 0x1C +#define MEGASAS_IO_START_LBA_LO_OFFSET 0x20 +#define MEGASAS_IO_START_LBA_HI_OFFSET 0x24 +#define MEGASAS_IO_SGL_OFFSET 0x28 + +struct megasas_lun_t { + SCSIDevice *sdev; + BlockDriverState *bdrv; + BlockDriverAIOCB *aiocb; +}; + +struct megasas_cmd_t { + int index; + + uint32_t context; + target_phys_addr_t pa; + uint16_t flags; + uint8_t sge_count; + uint32_t sge_size; + uint8_t *sense; + uint8_t sense_len; + struct iovec iov[MEGASAS_MAX_SGE]; + QEMUIOVect...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...fine MEGASAS_IO_SENSE_BUFF_ADDR_LO_OFFSET 0x18 +#define MEGASAS_IO_SENSE_BUFF_ADDR_HI_OFFSET 0x1C +#define MEGASAS_IO_START_LBA_LO_OFFSET 0x20 +#define MEGASAS_IO_START_LBA_HI_OFFSET 0x24 +#define MEGASAS_IO_SGL_OFFSET 0x28 + +struct megasas_lun_t { + SCSIDevice *sdev; + BlockDriverState *bdrv; + BlockDriverAIOCB *aiocb; +}; + +struct megasas_cmd_t { + int index; + + uint32_t context; + target_phys_addr_t pa; + uint16_t flags; + uint8_t sge_count; + uint32_t sge_size; + uint8_t *sense; + uint8_t sense_len; + struct iovec iov[MEGASAS_MAX_SGE]; + QEMUIOVect...
2011 Jun 24
9
[PATCH] xen_disk: cope with missing xenstore "params" node
...''); if (h != NULL) { blkdev->fileproto = blkdev->params; @@ -672,11 +674,15 @@ static int blk_init(struct XenDevice *xendev) /* setup via xenbus -> create new block driver instance */ xen_be_printf(&blkdev->xendev, 2, "create new bdrv (xenbus setup)\n"); blkdev->bs = bdrv_new(blkdev->dev); - if (bdrv_open(blkdev->bs, blkdev->filename, qflags, - bdrv_find_whitelisted_format(blkdev->fileproto)) != 0) { - bdrv_delete(blkdev->bs); - return -1; +...
2011 Jun 27
1
[PATCH v3] xen_disk: cope with missing xenstore "params" node
...t;dev == NULL) { - return -1; + goto out_error; } /* read-only ? */ @@ -672,10 +674,15 @@ static int blk_init(struct XenDevice *xendev) /* setup via xenbus -> create new block driver instance */ xen_be_printf(&blkdev->xendev, 2, "create new bdrv (xenbus setup)\n"); blkdev->bs = bdrv_new(blkdev->dev); - if (bdrv_open(blkdev->bs, blkdev->filename, qflags, - bdrv_find_whitelisted_format(blkdev->fileproto)) != 0) { - bdrv_delete(blkdev->bs); - return -1; +...
2013 Apr 05
0
[PATCHv2 1/2] Xen PV backend (for qemu-upstream-4.2-testing): Move call to bdrv_new from blk_init to blk_connect
This commit delays the point at which bdrv_new (and hence blk_open on the underlying device) is called from blk_init to blk_connect. This ensures that in an inbound live migrate, the block device is not opened until it has been closed at the other end. This is in preparation for supporting devices with open/close consistency without using O...
2011 Jun 24
2
[PATCH v2] xen_disk: cope with missing xenstore "params" node
...t;dev == NULL) { - return -1; + goto out_error; } /* read-only ? */ @@ -672,10 +674,15 @@ static int blk_init(struct XenDevice *xendev) /* setup via xenbus -> create new block driver instance */ xen_be_printf(&blkdev->xendev, 2, "create new bdrv (xenbus setup)\n"); blkdev->bs = bdrv_new(blkdev->dev); - if (bdrv_open(blkdev->bs, blkdev->filename, qflags, - bdrv_find_whitelisted_format(blkdev->fileproto)) != 0) { - bdrv_delete(blkdev->bs); - return -1; +...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...a_ram_size, } } } + + /* Add virtio block devices */ + if (pci_enabled) { + int index; + int unit_id = 0; + + while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { + virtio_blk_init(pci_bus, 0x5002, 0x2258, + drives_table[index].bdrv); + unit_id++; + } + } } static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size, diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index ce1a1f3..95471f3 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -147,4 +147,8 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); void...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...a_ram_size, } } } + + /* Add virtio block devices */ + if (pci_enabled) { + int index; + int unit_id = 0; + + while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { + virtio_blk_init(pci_bus, 0x5002, 0x2258, + drives_table[index].bdrv); + unit_id++; + } + } } static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size, diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index ce1a1f3..95471f3 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -147,4 +147,8 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); void...
2008 Sep 10
2
Bug#490409: xen-3: diff for NMU version 3.2.1-2.1
...he xenstore + backend `type' field. This `type' field typically comes from + the front of the drive mapping string in ioemu. The + supported cases are: + xm config file string `type' image format qemu driver + phy:[/dev/]<device> phy raw image bdrv_raw + file:<filename> file raw image bdrv_raw + tap:aio:<filename> tap raw image bdrv_raw + tap:qcow:<image> tap not raw autoprobe + tap:<cow-fmt>:<image> tap named format bdrv_<...
2012 Nov 13
4
[PATCH] qemu-stubdom: prevent useless medium change
...f --git a/xenstore.c b/xenstore.c index 1857160..d3a4588 100644 --- a/xenstore.c +++ b/xenstore.c @@ -614,6 +614,12 @@ void xenstore_parse_domain_config(int hvm_domid) if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path, e_danger[i]) == -1) continue; if (bdrv_open2(bs, danger_buf, BDRV_O_CACHE_WB /* snapshot and write-back */, &bdrv_raw) == 0) { + if (pasprintf(&buf, "%s/params", bpath) == -1) + continue; + free(params); + params = xs_read(xsh, XBT_NULL, buf, &len); + if (params == NULL) +...
2012 Apr 24
21
no console when using xl toolstack xen 4.1.2
Hello! I was asking for help on the Freenode channel, and I was pointed here. I have a situation where, using xl, I can create a functional PV domU, with or without pv-grub, but I cannot access the console. Firing up xend and using xm works without trouble. Since xend and company is being deprecated, I would like to transition to using the xl toolstack. The system is an Arch Linux system