Displaying 20 results from an estimated 46 matches for "handle_output".
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...h device tear down */
+ }
+ break;
+ case VIRTIO_PCI_QUEUE_SEL:
+ if (val < VIRTIO_PCI_QUEUE_MAX)
+ vdev->queue_sel = val;
+ break;
+ case VIRTIO_PCI_QUEUE_NOTIFY:
+ if (val < VIRTIO_PCI_QUEUE_MAX && vdev->vq[val].vring.desc)
+ vdev->vq[val].handle_output(vdev, &vdev->vq[val]);
+ break;
+ case VIRTIO_PCI_STATUS:
+ vdev->status = val & 0xFF;
+ break;
+ }
+}
+
+static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
+{
+ VirtIODevice *vdev = to_virtio_device(opaque);
+ uint32_t ret = 0xFFFFFFFF;
+
+ addr -...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...h device tear down */
+ }
+ break;
+ case VIRTIO_PCI_QUEUE_SEL:
+ if (val < VIRTIO_PCI_QUEUE_MAX)
+ vdev->queue_sel = val;
+ break;
+ case VIRTIO_PCI_QUEUE_NOTIFY:
+ if (val < VIRTIO_PCI_QUEUE_MAX && vdev->vq[val].vring.desc)
+ vdev->vq[val].handle_output(vdev, &vdev->vq[val]);
+ break;
+ case VIRTIO_PCI_STATUS:
+ vdev->status = val & 0xFF;
+ break;
+ }
+}
+
+static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
+{
+ VirtIODevice *vdev = to_virtio_device(opaque);
+ uint32_t ret = 0xFFFFFFFF;
+
+ addr -...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...+};
+
+struct device
+{
+ struct device *next;
+ struct lguest_device_desc *desc;
+ void *mem;
+
+ /* Watch this fd if handle_input non-NULL. */
+ int fd;
+ bool (*handle_input)(int fd, struct device *me);
+
+ /* Watch DMA to this key if handle_input non-NULL. */
+ unsigned long watch_key;
+ u32 (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
+
+ /* Device-specific data. */
+ void *priv;
+};
+
+static int open_or_die(const char *name, int flags)
+{
+ int fd = open(name, flags);
+ if (fd < 0)
+ err(1, "Failed to open %s", name);
+ return fd;
+}...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...+};
+
+struct device
+{
+ struct device *next;
+ struct lguest_device_desc *desc;
+ void *mem;
+
+ /* Watch this fd if handle_input non-NULL. */
+ int fd;
+ bool (*handle_input)(int fd, struct device *me);
+
+ /* Watch DMA to this key if handle_input non-NULL. */
+ unsigned long watch_key;
+ u32 (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
+
+ /* Device-specific data. */
+ void *priv;
+};
+
+static int open_or_die(const char *name, int flags)
+{
+ int fd = open(name, flags);
+ if (fd < 0)
+ err(1, "Failed to open %s", name);
+ return fd;
+}...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...+struct device
+{
+ struct device *next;
+ struct lguest_device_desc *desc;
+ void *mem;
+
+ /* Watch this fd if handle_input non-NULL. */
+ int fd;
+ int (*handle_input)(int fd, struct device *me);
+
+ /* Watch DMA to this address if handle_input non-NULL. */
+ unsigned long watch_address;
+ u32 (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
+
+ /* Device-specific data. */
+ void *priv;
+};
+
+static char buf[1024];
+static struct iovec discard_iov = { .iov_base=buf, .iov_len=sizeof(buf) };
+static int zero_fd;
+
+/* LGUEST_GUEST_TOP defined in Makefile, j...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...+struct device
+{
+ struct device *next;
+ struct lguest_device_desc *desc;
+ void *mem;
+
+ /* Watch this fd if handle_input non-NULL. */
+ int fd;
+ int (*handle_input)(int fd, struct device *me);
+
+ /* Watch DMA to this address if handle_input non-NULL. */
+ unsigned long watch_address;
+ u32 (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
+
+ /* Device-specific data. */
+ void *priv;
+};
+
+static char buf[1024];
+static struct iovec discard_iov = { .iov_base=buf, .iov_len=sizeof(buf) };
+static int zero_fd;
+
+/* LGUEST_GUEST_TOP defined in Makefile, j...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...ng,
+ unsigned long *, const char *, unsigned long *,
+ unsigned long *);
+
#define PAGE_PRESENT 0x7 /* Present, RW, Execute */
#define NET_PEERNUM 1
@@ -63,8 +74,8 @@ struct device
/* Watch DMA to this address if handle_input non-NULL. */
unsigned long watch_address;
- u32 (*handle_output)(int fd, const struct iovec *iov,
- unsigned int num, struct device *me);
+ unsigned long (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
/* Device-specific data. */
void *priv;
@@ -78,7 +89,7 @@ static int zero_fd;
FIXME: vdso gets...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...ng,
+ unsigned long *, const char *, unsigned long *,
+ unsigned long *);
+
#define PAGE_PRESENT 0x7 /* Present, RW, Execute */
#define NET_PEERNUM 1
@@ -63,8 +74,8 @@ struct device
/* Watch DMA to this address if handle_input non-NULL. */
unsigned long watch_address;
- u32 (*handle_output)(int fd, const struct iovec *iov,
- unsigned int num, struct device *me);
+ unsigned long (*handle_output)(int fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
/* Device-specific data. */
void *priv;
@@ -78,7 +89,7 @@ static int zero_fd;
FIXME: vdso gets...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..fe9f793 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 May 25
0
[PATCH 09/11] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 02
0
[PATCHv2 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 05
0
[PATCHv3 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 May 25
0
[PATCH 09/11] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 02
0
[PATCHv2 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...
2009 Jun 05
0
[PATCHv3 09/13] qemu: virtio support for many interrupt vectors
...device(vdev, &virtio_pci_bindings, proxy);
}
diff --git a/hw/virtio.c b/hw/virtio.c
index 45a49fa..63ffcff 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -68,6 +68,7 @@ struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(...