search for: target_phys_addr_t

Displaying 20 results from an estimated 85 matches for "target_phys_addr_t".

2012 Jul 23
2
[PATCH V2] qemu-xen-traditionnal, Fix dirty logging during migration.
...i386-dm/exec-dm.c | 6 +----- qemu-xen.h | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c index fdad42a..2bb44e0 100644 --- a/hw/xen_machine_fv.c +++ b/hw/xen_machine_fv.c @@ -174,7 +174,8 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, uint8_t lock) return last_address_vaddr + address_offset; } -void qemu_invalidate_entry(uint8_t *buffer) +void qemu_invalidate_entry(uint8_t *buffer, target_phys_addr_t access_len, + int was_written) { struct map_cache *entry = NULL, *pentry = NULL...
2006 Mar 24
2
[PATCH] qemu pcnet emulation fixes
...000000000 -0800 +++ tools/ioemu/hw/pcnet.h 2006-03-24 12:16:02.000000000 -0800 @@ -177,6 +177,26 @@ struct pcnet_RMD { } rmd3; }; +typedef struct PCNetState_st PCNetState; + +struct PCNetState_st { + PCIDevice dev; + NetDriverState *nd; + int mmio_io_addr, rap, isr, lnkst; + target_phys_addr_t rdra, tdra; + uint8_t prom[16]; + uint16_t csr[128]; + uint16_t bcr[32]; + uint64_t timer; + int recv_pos; + uint8_t tx_buffer[2048]; + uint8_t rx_buffer[2048]; + struct pcnet_TMD tmd; + struct pcnet_RMD crmd; + struct pcnet_RMD nrmd; + struct pcnet_RMD nnrmd; +}; +...
2012 Oct 08
21
[PATCH 00/14] Remove old_portio users for memory region PIO mapping
When running on PowerPC, we don''t have native PIO support. There are a few hacks around to enable PIO access on PowerPC nevertheless. The most typical one is the isa-mmio device. It takes MMIO requests and converts them to PIO requests on the (QEMU internal) PIO bus. This however is not how real hardware works and it limits us in the ability to spawn eventfd''s on PIO ports
2012 Mar 19
1
[PATCHv2] virtio-pci: add MMIO property
...ons(+), 2 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 28498ec..b061000 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -510,8 +510,58 @@ const MemoryRegionPortio virtio_portio[] = { PORTIO_END_OF_LIST() }; +static void virtio_pci_config_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) +{ + VirtIOPCIProxy *proxy = opaque; + virtio_pci_config_writeb(opaque, addr & proxy->bar0_mask, val); +} + +static void virtio_pci_config_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val) +{ + VirtIOPCIProxy *proxy = opaque; + virtio_pci_config...
2012 Mar 19
1
[PATCHv2] virtio-pci: add MMIO property
...ons(+), 2 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 28498ec..b061000 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -510,8 +510,58 @@ const MemoryRegionPortio virtio_portio[] = { PORTIO_END_OF_LIST() }; +static void virtio_pci_config_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) +{ + VirtIOPCIProxy *proxy = opaque; + virtio_pci_config_writeb(opaque, addr & proxy->bar0_mask, val); +} + +static void virtio_pci_config_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val) +{ + VirtIOPCIProxy *proxy = opaque; + virtio_pci_config...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...nclude <stdio.h> + +#include "qemu-kvm.h" + +#include "vhost_net.h" + +const char *vhost_net_device; + +static int vhost_virtqueue_init(struct vhost_dev *dev, + struct VirtIODevice *vdev, + struct vhost_virtqueue *vq, + struct VirtQueue *q, + unsigned idx) +{ + target_phys_addr_t s, l; + int r; + struct vhost_vring_addr addr = { + .index = idx, + }; + struct vhost_vring_file file = { + .index = idx, + }; + struct vhost_vring_state size = { + .index = idx, + }; + + size.num = q->vring.num; + r = ioctl(dev->control, VHOST_SET_VRING_NUM, &size); + if (r) + return...
2009 Jun 05
1
[PATCHv3 07/13] qemu: minimal MSI/MSI-X implementation for PC
...HIFT 12 +#define MSI_ADDR_DEST_ID_MASK 0x00ffff0 + +#define MSI_ADDR_BASE 0xfee00000 +#define MSI_ADDR_SIZE 0x100000 + typedef struct APICState { CPUState *cpu_env; uint32_t apicbase; @@ -712,11 +727,31 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr) return val; } +static void apic_send_msi(target_phys_addr_t addr, uint32 data) +{ + uint8_t dest = (addr & MSI_ADDR_DEST_ID_MASK) >> MSI_ADDR_DEST_ID_SHIFT; + uint8_t vector = (data & MSI_DATA_VECTOR_MASK) >> MSI_DATA_VECTOR_SHIFT; + uint8_t dest_mode = (a...
2009 Jun 05
1
[PATCHv3 07/13] qemu: minimal MSI/MSI-X implementation for PC
...HIFT 12 +#define MSI_ADDR_DEST_ID_MASK 0x00ffff0 + +#define MSI_ADDR_BASE 0xfee00000 +#define MSI_ADDR_SIZE 0x100000 + typedef struct APICState { CPUState *cpu_env; uint32_t apicbase; @@ -712,11 +727,31 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr) return val; } +static void apic_send_msi(target_phys_addr_t addr, uint32 data) +{ + uint8_t dest = (addr & MSI_ADDR_DEST_ID_MASK) >> MSI_ADDR_DEST_ID_SHIFT; + uint8_t vector = (data & MSI_DATA_VECTOR_MASK) >> MSI_DATA_VECTOR_SHIFT; + uint8_t dest_mode = (a...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...AS_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]; + QEMUIOVector qiov; + struct sg_io_hdr hdr; + + struct megasas_state_t *state; + struct megasas_lun_t *lun; +}; + +typedef struc...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...AS_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]; + QEMUIOVector qiov; + struct sg_io_hdr hdr; + + struct megasas_state_t *state; + struct megasas_lun_t *lun; +}; + +typedef struc...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...--------- hw/virtio.h | 10 +++++++- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...--------- hw/virtio.h | 10 +++++++- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...--------- hw/virtio.h | 10 +++++++- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...--------- hw/virtio.h | 10 +++++++- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 37c219c..d8c978a 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...--------- hw/virtio.h | 10 +++++++- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 8e665c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value...