search for: is_writ

Displaying 20 results from an estimated 83 matches for "is_writ".

Did you mean: is_write
2012 Aug 02
0
[PATCH 3/3] ALPHA: implement and use rdwr_bytes
...insertions(+), 11 deletions(-) diff --git a/core/fs/diskio.c b/core/fs/diskio.c index 6683816..7e58d6f 100644 --- a/core/fs/diskio.c +++ b/core/fs/diskio.c @@ -265,6 +265,80 @@ static int edd_rdwr_sectors(struct disk *disk, void *buf, return done; } +#define rdwr_sectors0(buf, lba, count, is_write) \ + disk->rdwr_sectors(disk, buf, lba, count, is_write) +/* + * Read a range of bytes + */ +int rdwr_bytes(struct disk *disk, void *buf, + bytes_t lba, size_t count, bool is_write) +{ + int done, res; + unsigned mask, before, len; + unsigned shift = disk->sector_shift; + +...
2012 Jul 23
2
[PATCH V2] qemu-xen-traditionnal, Fix dirty logging during migration.
...TARGET_PAGE_BITS) - - (addr >> TARGET_PAGE_BITS)); return qemu_map_cache(addr, 1); } @@ -835,6 +831,6 @@ void *cpu_physical_memory_map(target_phys_addr_t addr, void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, int is_write, target_phys_addr_t access_len) { - qemu_invalidate_entry(buffer); + qemu_invalidate_entry(buffer, access_len, is_write); cpu_notify_map_clients(); } diff --git a/qemu-xen.h b/qemu-xen.h index d50c89f..54159bf 100644 --- a/qemu-xen.h +++ b/qemu-xen.h @@ -28,7 +28,7 @@ extern int vga_r...
2011 Jun 17
3
[LLVMdev] LLVM-based address sanity checker
...or whatever reason we can not use SIGILL. Default (use ud2): 402ed5: 48 89 d8 mov %rbx,%rax << move the address to rax 402ed8: 0f 0b ud2a << crash 402eda: 52 push %rdx << encode is_write and size in the opcode (note: with a good disassembler and some work we can leave just ud2 or equivalent) -mllvm -asan-use-call 402ed5: 48 89 df mov %rbx,%rdi << address is the paremeter to __asan_report_error_2 402ed8: e8 53 69 00 00 callq 40983...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...ct kvm *kvm, struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + + vmmio->hdr.interrupt_state |= VIRTIO_MMIO_INT_CONFIG; + kvm__irq_trigger(vmmio->kvm, vmmio->irq); + + return 0; +} + +static void virtio_mmio_device_specific(u64 addr, u8 *data, u32 len, + u8 is_write, struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vdev->ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = vdev->ops->get_config(vmmio-...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...ct kvm *kvm, struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + + vmmio->hdr.interrupt_state |= VIRTIO_MMIO_INT_CONFIG; + kvm__irq_trigger(vmmio->kvm, vmmio->irq); + + return 0; +} + +static void virtio_mmio_device_specific(u64 addr, u8 *data, u32 len, + u8 is_write, struct virtio_device *vdev) +{ + struct virtio_mmio *vmmio = vdev->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vdev->ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = vdev->ops->get_config(vmmio-...
2019 Oct 04
1
Re: [nbdkit PATCH 2/5] retry: Check size before transactions
...lters/retry/retry.c > @@ -148,6 +148,17 @@ struct retry_data { > int delay; /* Seconds to wait before retrying. */ > }; > > +static bool > +valid_range (struct nbdkit_next_ops *next_ops, void *nxdata, > + uint32_t count, uint64_t offset, bool is_write, int *err) > +{ > + if ((int64_t) offset + count > next_ops->get_size (nxdata)) { > + *err = is_write ? ENOSPC : EIO; > + return false; > + } > + return true; > +} > + > static bool > do_retry (struct retry_handle *h, > struct retry_data...
2014 Jul 10
3
[LLVMdev] Proposal: ASan debugging API
...gn) reported, returns the pc, bp, sp, // address, access type, access type and bug description, and the return // value of the function is 1. If no error occurred yet, returns 0. int __asan_get_report_data(void **pc, void **bp, void **sp, void **addr, int *is_write, size_t *access_size, char **bug_description); // Address/memory type from ASan's point of view. typedef enum { __ADDRESS_TYPE_UNKNOWN, __ADDRESS_TYPE_SHADOW_LOW, __ADDRESS_TYPE_SHADOW_GAP, __ADDRESS_TYPE_SHADOW_HIGH, __ADDR...
2011 Jun 21
0
[LLVMdev] LLVM-based address sanity checker
...SIGILL. > > Default (use ud2): > 402ed5: 48 89 d8 mov %rbx,%rax << move the > address to rax > 402ed8: 0f 0b ud2a << crash > 402eda: 52 push %rdx << encode > is_write and size in the opcode > (note: with a good disassembler and some work we can leave just ud2 or > equivalent) > > -mllvm -asan-use-call > 402ed5: 48 89 df mov %rbx,%rdi << address is the > paremeter to __asan_report_error_2 > 402ed8: e8...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...ruct kvm *kvm, struct virtio_trans *vtrans) +{ + struct virtio_mmio *vmmio = vtrans->virtio; + + vmmio->hdr.interrupt_state |= VIRTIO_MMIO_INT_CONFIG; + kvm__irq_trigger(vmmio->kvm, vmmio->irq); + + return 0; +} + +static void virtio_mmio__device_specific(u64 addr, u8 *data, u32 len, u8 is_write, + struct virtio_trans *vtrans) +{ + struct virtio_mmio *vmmio = vtrans->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vtrans->virtio_ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = + vtrans->virt...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...ruct kvm *kvm, struct virtio_trans *vtrans) +{ + struct virtio_mmio *vmmio = vtrans->virtio; + + vmmio->hdr.interrupt_state |= VIRTIO_MMIO_INT_CONFIG; + kvm__irq_trigger(vmmio->kvm, vmmio->irq); + + return 0; +} + +static void virtio_mmio__device_specific(u64 addr, u8 *data, u32 len, u8 is_write, + struct virtio_trans *vtrans) +{ + struct virtio_mmio *vmmio = vtrans->virtio; + u32 i; + + for (i = 0; i < len; i++) { + if (is_write) + vtrans->virtio_ops->set_config(vmmio->kvm, vmmio->dev, + *(u8 *)data + i, addr + i); + else + data[i] = + vtrans->virt...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...nt32_t tag, - uint8_t *buf, int lun) +static int scsi_check_cdb_len(uint8_t *cdb, uint32_t *datalen, uint64_t *lba) { - SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); - uint64_t nb_sectors; - uint64_t lba; - uint32_t len; - int cmdlen; - int is_write; - uint8_t command; - uint8_t *outbuf; - SCSIRequest *r; + int cmdlen = 0; - command = buf[0]; - r = scsi_find_request(s, tag); - if (r) { - BADF("Tag 0x%x already in use\n", tag); - scsi_cancel_io(d, tag); - } - /* ??? Tags are not unique for d...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...nt32_t tag, - uint8_t *buf, int lun) +static int scsi_check_cdb_len(uint8_t *cdb, uint32_t *datalen, uint64_t *lba) { - SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); - uint64_t nb_sectors; - uint64_t lba; - uint32_t len; - int cmdlen; - int is_write; - uint8_t command; - uint8_t *outbuf; - SCSIRequest *r; + int cmdlen = 0; - command = buf[0]; - r = scsi_find_request(s, tag); - if (r) { - BADF("Tag 0x%x already in use\n", tag); - scsi_cancel_io(d, tag); - } - /* ??? Tags are not unique for d...
2019 Oct 04
0
[nbdkit PATCH 2/5] retry: Check size before transactions
...-- a/filters/retry/retry.c +++ b/filters/retry/retry.c @@ -148,6 +148,17 @@ struct retry_data { int delay; /* Seconds to wait before retrying. */ }; +static bool +valid_range (struct nbdkit_next_ops *next_ops, void *nxdata, + uint32_t count, uint64_t offset, bool is_write, int *err) +{ + if ((int64_t) offset + count > next_ops->get_size (nxdata)) { + *err = is_write ? ENOSPC : EIO; + return false; + } + return true; +} + static bool do_retry (struct retry_handle *h, struct retry_data *data, @@ -204,6 +215,8 @@ retry_pread (struct nbdkit_...
2019 Mar 25
1
[RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted
On Sat, Mar 23, 2019 at 05:01:35PM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 21, 2019 at 09:05:04PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin <mst at redhat.com> writes: [snip] > > >> > Is there any justification to doing that beyond someone putting > > >> > out slow code in the past? > > >> > > >> The
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2013 Nov 25
0
QEMU dies on any attempt to load a Linux kernel module when using a 9P rootfs
...ial stdio -fsdev > local,id=root,path=/mnt/test,security_model=none -device > virtio-9p-pci,fsdev=root,mount_tag=/dev/root > > Here is a backtrace of QEMU itself that I obtained using gdb: > > Breakpoint 1, virtqueue_map_sg (sg=0x7f695b797b98, addr=0x7f695b793b98, > num_sg=3, is_write=1) at > /usr/src/debug/app-emulation/qemu-9999/qemu-9999/hw/virtio/virtio.c:434 > 434 error_report("virtio: trying to map MMIO memory"); > (gdb) bt > #0 virtqueue_map_sg (sg=0x7f695b797b98, addr=0x7f695b793b98, num_sg=3, > is_write=1) at > /usr/src/debu...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...ng *vring) } -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num;...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...ng *vring) } -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num;...
2014 Nov 25
0
[PATCH RFC v2 07/12] dataplane: allow virtio-1 devices
...ring *vring, VirtQueueElement *elem, > +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, > struct vring_desc *desc) > { > unsigned *num; > struct iovec *iov; > hwaddr *addr; > MemoryRegion *mr; > + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; > + uint32_t len = virtio_tswap32(vdev, desc->len); > + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); > > - if (desc->flags & VRING_DESC_F_WRITE) { > + if (is_write) { > n...
2014 Dec 11
0
[PATCH RFC v6 08/20] dataplane: allow virtio-1 devices
...ng *vring) } -static int get_desc(Vring *vring, VirtQueueElement *elem, +static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem, struct vring_desc *desc) { unsigned *num; struct iovec *iov; hwaddr *addr; MemoryRegion *mr; + int is_write = virtio_tswap16(vdev, desc->flags) & VRING_DESC_F_WRITE; + uint32_t len = virtio_tswap32(vdev, desc->len); + uint64_t desc_addr = virtio_tswap64(vdev, desc->addr); - if (desc->flags & VRING_DESC_F_WRITE) { + if (is_write) { num = &elem->in_num;...