search for: blockdriverst

Displaying 20 results from an estimated 23 matches for "blockdriverst".

Did you mean: blockdriver
2012 Aug 21
5
[PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive
...val) +{ + FILE *f; + char *tail = path + strlen(path); + + pstrcat(path, MAXPATHLEN, filename); + f = fopen(path, "r"); + if (!f) { + goto out; + } + + fscanf(f, "%u", val); + fclose(f); + +out: + *tail = 0; +} + +static void sg_get_queue_limits(BlockDriverState *bs, const char *filename) +{ + DIR *ffs; + struct dirent *d; + char path[MAXPATHLEN]; + + snprintf(path, MAXPATHLEN, + "/sys/class/scsi_generic/sg%s/device/block/", + filename + strlen("/dev/sg")); + + ffs = opendir(path); + if (!ffs...
2012 Aug 21
5
[PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive
...val) +{ + FILE *f; + char *tail = path + strlen(path); + + pstrcat(path, MAXPATHLEN, filename); + f = fopen(path, "r"); + if (!f) { + goto out; + } + + fscanf(f, "%u", val); + fclose(f); + +out: + *tail = 0; +} + +static void sg_get_queue_limits(BlockDriverState *bs, const char *filename) +{ + DIR *ffs; + struct dirent *d; + char path[MAXPATHLEN]; + + snprintf(path, MAXPATHLEN, + "/sys/class/scsi_generic/sg%s/device/block/", + filename + strlen("/dev/sg")); + + ffs = opendir(path); + if (!ffs...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
....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_enable_write_cache(Bl...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
....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_enable_write_cache(Bl...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...71f3 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 *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); +/* virtio-blk.h */ +void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, + BlockDriverState *bs); + #endif diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c new file mode 100644 index 0000000..0ae3592 --- /dev/null +++ b/qemu/hw/virtio-blk.c @@ -0,0 +1,163 @@ +/* + * Virtio Block Device + * + * Copyright IBM, Corp. 2007 + * + * Authors: + * Anthony Liguori <aliguori@us.ib...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 3/7] userspace virtio
...71f3 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 *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); +/* virtio-blk.h */ +void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, + BlockDriverState *bs); + #endif diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c new file mode 100644 index 0000000..0ae3592 --- /dev/null +++ b/qemu/hw/virtio-blk.c @@ -0,0 +1,163 @@ +/* + * Virtio Block Device + * + * Copyright IBM, Corp. 2007 + * + * Authors: + * Anthony Liguori <aliguori@us.ib...
2008 Sep 10
2
Bug#490409: xen-3: diff for NMU version 3.2.1-2.1
...+ len = sizeof(protocol) - 1; +--- a/tools/ioemu/xenstore.c Tue May 13 15:16:59 2008 +0100 ++++ b/tools/ioemu/xenstore.c Tue May 13 15:19:47 2008 +0100 +@@ -86,6 +86,7 @@ void xenstore_parse_domain_config(int do + int i, is_scsi, is_hdN = 0; + unsigned int len, num, hd_index; + BlockDriverState *bs; ++ BlockDriver *format; + + for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++) + media_filename[i] = NULL; +@@ -131,6 +132,8 @@ void xenstore_parse_domain_config(int do + } + + for (i = 0; i < num; i++) { ++ format = NULL; /* don't know what the forma...
2012 Feb 15
0
[PATCH] xen: detach the blkdev before bdrv_delete
We need to detach the blkdev from the BlockDriverState before calling bdrv_delete. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: Markus Armbruster <armbru@redhat.com> --- hw/xen_disk.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 68fa36a..bf06fc1...
2008 Jan 09
4
[PATCH/RFC 0/2] CPU hotplug virtio driver
I'm sending a first draft of my proposed cpu hotplug driver for kvm/virtio The first patch is the kernel module, while the second, the userspace pci device. The host boots with the maximum cpus it should ever use, through the -smp parameter. Due to real machine constraints (which qemu copies), i386 does not allow for any addition of cpus after boot, so this is the most general way. I do
2008 Jan 09
4
[PATCH/RFC 0/2] CPU hotplug virtio driver
I'm sending a first draft of my proposed cpu hotplug driver for kvm/virtio The first patch is the kernel module, while the second, the userspace pci device. The host boots with the maximum cpus it should ever use, through the -smp parameter. Due to real machine constraints (which qemu copies), i386 does not allow for any addition of cpus after boot, so this is the most general way. I do
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...o # virtio devices -VL_OBJS += virtio.o +VL_OBJS += virtio.o virtio-net.o ifeq ($(TARGET_BASE_ARCH), i386) # Hardware support diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index beb711c..ce1a1f3 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -142,4 +142,9 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); +/* virtio-net.c */ + +void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); + + #endif diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c index f8cbf1a..545901c 100644 --- a/qemu/hw/pci.c +++ b/qemu/hw/pci.c @...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...o # virtio devices -VL_OBJS += virtio.o +VL_OBJS += virtio.o virtio-net.o ifeq ($(TARGET_BASE_ARCH), i386) # Hardware support diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index beb711c..ce1a1f3 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -142,4 +142,9 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); +/* virtio-net.c */ + +void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); + + #endif diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c index f8cbf1a..545901c 100644 --- a/qemu/hw/pci.c +++ b/qemu/hw/pci.c @...
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...USE_HYPERCALL pci_hypercall_init(pci_bus); Index: kvm-userspace/qemu/hw/pc.h =================================================================== --- kvm-userspace.orig/qemu/hw/pc.h +++ kvm-userspace/qemu/hw/pc.h @@ -155,4 +155,7 @@ void *virtio_blk_init(PCIBus *bus, uint1 void extboot_init(BlockDriverState *bs, int cmd); +/* virtio-balloon.c */ +void *virtio_balloon_init(PCIBus *bus); + #endif Index: kvm-userspace/qemu/hw/virtio-balloon.c =================================================================== --- /dev/null +++ kvm-userspace/qemu/hw/virtio-balloon.c @@ -0,0 +1,103 @@ +#include &quot...
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...USE_HYPERCALL pci_hypercall_init(pci_bus); Index: kvm-userspace/qemu/hw/pc.h =================================================================== --- kvm-userspace.orig/qemu/hw/pc.h +++ kvm-userspace/qemu/hw/pc.h @@ -155,4 +155,7 @@ void *virtio_blk_init(PCIBus *bus, uint1 void extboot_init(BlockDriverState *bs, int cmd); +/* virtio-balloon.c */ +void *virtio_balloon_init(PCIBus *bus); + #endif Index: kvm-userspace/qemu/hw/virtio-balloon.c =================================================================== --- /dev/null +++ kvm-userspace/qemu/hw/virtio-balloon.c @@ -0,0 +1,103 @@ +#include &quot...
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a
2008 Mar 10
12
[RFC][PATCH] Use ioemu block drivers through blktap
When I submitted the qcow2 patch for blktap, suggestions came up that the qemu block drivers should be used also for blktap to eliminate the current code duplication in ioemu and blktap. The attached patch adds support for a tap:ioemu pseudo driver. Devices using this driver won''t use tapdisk (containing the code duplication) any more, but will connect to the qemu-dm of the domain. In
2009 Mar 02
0
[PATCH 4 of 13] DisplayState interface change
...xenfb->c.ds->surface->height = xenfb->height; + dpy_resize(xenfb->c.ds); xenfb->up_fullscreen = 1; } diff --git a/qemu-common.h b/qemu-common.h --- a/qemu-common.h +++ b/qemu-common.h @@ -131,6 +131,9 @@ typedef struct AudioState AudioState; typedef struct BlockDriverState BlockDriverState; typedef struct DisplayState DisplayState; +typedef struct DisplayChangeListener DisplayChangeListener; +typedef struct DisplaySurface DisplaySurface; +typedef struct PixelFormat PixelFormat; typedef struct TextConsole TextConsole; typedef TextConsole QEMUConsole; typedef st...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
..._OFFSET 0x14 +#define 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]; + Q...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
..._OFFSET 0x14 +#define 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]; + Q...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...loon)); + 8, sizeof(VirtIOBalloon), 0); if (s == NULL) return NULL; diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 51a8e22..7858a77 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -251,7 +251,8 @@ void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs) PCI_VENDOR_ID_REDHAT_QUMRANET, VIRTIO_ID_BLOCK, PCI_CLASS_STORAGE_OTHER, 0x00, - sizeof(struct virtio_blk_config), sizeof(VirtIOBlock...