search for: virtio_pstore_hdr

Displaying 16 results from an estimated 16 matches for "virtio_pstore_hdr".

2016 Jul 19
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...Stefan Hajnoczi wrote: > On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote: > > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > + VirtIOPstore *s = VIRTIO_PSTORE(vdev); > > + VirtQueueElement *elem; > > + struct virtio_pstore_hdr *hdr; > > + ssize_t len; > > + > > + for (;;) { > > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > > + if (!elem) { > > + return; > > + } > > + > > + hdr = elem->out_sg[0].iov_base; > &...
2016 Jul 19
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...Stefan Hajnoczi wrote: > On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote: > > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > + VirtIOPstore *s = VIRTIO_PSTORE(vdev); > > + VirtQueueElement *elem; > > + struct virtio_pstore_hdr *hdr; > > + ssize_t len; > > + > > + for (;;) { > > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > > + if (!elem) { > > + return; > > + } > > + > > + hdr = elem->out_sg[0].iov_base; > &...
2016 Jul 18
3
[PATCH 2/3] qemu: Implement virtio-pstore device
..."hw/virtio/virtio.h" +#include "hw/virtio/virtio-bus.h" +#include "hw/virtio/virtio-access.h" +#include "hw/virtio/virtio-pstore.h" + + +static void virtio_pstore_to_filename(VirtIOPstore *s, char *buf, size_t sz, + struct virtio_pstore_hdr *hdr) +{ + const char *basename; + + switch (hdr->type) { + case VIRTIO_PSTORE_TYPE_DMESG: + basename = "dmesg"; + break; + default: + basename = "unknown"; + break; + } + + snprintf(buf, sz, "%s/%s-%llu%s", s->direct...
2016 Jul 18
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...gt; + > +#define VIRT_PSTORE_ORDER 2 > +#define VIRT_PSTORE_BUFSIZE (4096 << VIRT_PSTORE_ORDER) > + > +struct virtio_pstore { > + struct virtio_device *vdev; > + struct virtqueue *vq; > + struct pstore_info pstore; > + struct virtio_pstore_hdr hdr; > + size_t buflen; > + u64 id; > + > + /* Waiting for host to ack */ > + wait_queue_head_t acked; > +}; > + > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > +{ &gt...
2016 Jul 18
7
[RFC/PATCHSET 0/3] virtio-pstore: Implement virtio pstore device
...at the next boot) using pstore filesystem as usual. While this patchset only implements dumping kernel log buffer, it can be extended to have ftrace buffer and probably some more.. The patch 0001 implements virtio pstore driver. It has a single virt queue, pstore buffer and header structure. The virtio_pstore_hdr struct is to give information about the current pstore operation. The patch 0002 and 0003 implement virtio-pstore legacy PCI device on qemu-kvm and kvmtool respectively. I referenced virtio-baloon and virtio-rng implementations and I don't know whether kvmtool supports modern virtio 1.0+ spec...
2016 Jul 18
7
[RFC/PATCHSET 0/3] virtio-pstore: Implement virtio pstore device
...at the next boot) using pstore filesystem as usual. While this patchset only implements dumping kernel log buffer, it can be extended to have ftrace buffer and probably some more.. The patch 0001 implements virtio pstore driver. It has a single virt queue, pstore buffer and header structure. The virtio_pstore_hdr struct is to give information about the current pstore operation. The patch 0002 and 0003 implement virtio-pstore legacy PCI device on qemu-kvm and kvmtool respectively. I referenced virtio-baloon and virtio-rng implementations and I don't know whether kvmtool supports modern virtio 1.0+ spec...
2016 Jul 18
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...+#include "hw/virtio/virtio-bus.h" > +#include "hw/virtio/virtio-access.h" > +#include "hw/virtio/virtio-pstore.h" > + > + > +static void virtio_pstore_to_filename(VirtIOPstore *s, char *buf, size_t sz, > + struct virtio_pstore_hdr *hdr) > +{ > + const char *basename; > + > + switch (hdr->type) { Missing le16_to_cpu()? > + case VIRTIO_PSTORE_TYPE_DMESG: > + basename = "dmesg"; > + break; > + default: > + basename = "unknown"; > + br...
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...clude <uapi/linux/virtio_ids.h> +#include <uapi/linux/virtio_pstore.h> + +#define VIRT_PSTORE_ORDER 2 +#define VIRT_PSTORE_BUFSIZE (4096 << VIRT_PSTORE_ORDER) + +struct virtio_pstore { + struct virtio_device *vdev; + struct virtqueue *vq; + struct pstore_info pstore; + struct virtio_pstore_hdr hdr; + size_t buflen; + u64 id; + + /* Waiting for host to ack */ + wait_queue_head_t acked; +}; + +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) +{ + u16 ret; + + switch (type) { + case PSTORE_TYPE_DMESG: + ret = cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_T...
2016 Jul 18
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...> Cc: virtualization at lists.linux-foundation.org > > Signed-off-by: Namhyung Kim <namhyung at gmail.com> > > --- [SNIP] > > + > > +static void virtio_pstore_to_filename(VirtIOPstore *s, char *buf, size_t sz, > > + struct virtio_pstore_hdr *hdr) > > +{ > > + const char *basename; > > + > > + switch (hdr->type) { > > Missing le16_to_cpu()? > > > + case VIRTIO_PSTORE_TYPE_DMESG: > > + basename = "dmesg"; > > + break; > > + default: > &g...
2016 Jul 18
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...> Cc: virtualization at lists.linux-foundation.org > > Signed-off-by: Namhyung Kim <namhyung at gmail.com> > > --- [SNIP] > > + > > +static void virtio_pstore_to_filename(VirtIOPstore *s, char *buf, size_t sz, > > + struct virtio_pstore_hdr *hdr) > > +{ > > + const char *basename; > > + > > + switch (hdr->type) { > > Missing le16_to_cpu()? > > > + case VIRTIO_PSTORE_TYPE_DMESG: > > + basename = "dmesg"; > > + break; > > + default: > &g...
2016 Jul 20
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...t; On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote: > > > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > > > +{ > > > + VirtIOPstore *s = VIRTIO_PSTORE(vdev); > > > + VirtQueueElement *elem; > > > + struct virtio_pstore_hdr *hdr; > > > + ssize_t len; > > > + > > > + for (;;) { > > > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > > > + if (!elem) { > > > + return; > > > + } > > > + > > > +...
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...u64 *id, unsigned int part, int count, > > + bool compressed, size_t size, > > + struct pstore_info *psi) > > +{ > > + struct virtio_pstore *vps = psi->data; > > + struct virtio_pstore_hdr *hdr = &vps->hdr; > > + struct scatterlist sg[2]; > > + unsigned int flags = compressed ? VIRTIO_PSTORE_FL_COMPRESSED : 0; > > + > > + *id = vps->id++; > > + > > + hdr->cmd = cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_CMD_W...
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...u64 *id, unsigned int part, int count, > > + bool compressed, size_t size, > > + struct pstore_info *psi) > > +{ > > + struct virtio_pstore *vps = psi->data; > > + struct virtio_pstore_hdr *hdr = &vps->hdr; > > + struct scatterlist sg[2]; > > + unsigned int flags = compressed ? VIRTIO_PSTORE_FL_COMPRESSED : 0; > > + > > + *id = vps->id++; > > + > > + hdr->cmd = cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_CMD_W...
2016 Jul 18
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...d, unsigned int part, int count, >> > + bool compressed, size_t size, >> > + struct pstore_info *psi) >> > +{ >> > + struct virtio_pstore *vps = psi->data; >> > + struct virtio_pstore_hdr *hdr = &vps->hdr; >> > + struct scatterlist sg[2]; >> > + unsigned int flags = compressed ? VIRTIO_PSTORE_FL_COMPRESSED : 0; >> > + >> > + *id = vps->id++; >> > + >> > + hdr->cmd = cpu_to_virtio16(vps->v...
2016 Jul 19
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...count, > >> > + bool compressed, size_t size, > >> > + struct pstore_info *psi) > >> > +{ > >> > + struct virtio_pstore *vps = psi->data; > >> > + struct virtio_pstore_hdr *hdr = &vps->hdr; > >> > + struct scatterlist sg[2]; > >> > + unsigned int flags = compressed ? VIRTIO_PSTORE_FL_COMPRESSED : 0; > >> > + > >> > + *id = vps->id++; > >> > + > >> > + hdr->cmd...
2016 Jul 19
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...count, > >> > + bool compressed, size_t size, > >> > + struct pstore_info *psi) > >> > +{ > >> > + struct virtio_pstore *vps = psi->data; > >> > + struct virtio_pstore_hdr *hdr = &vps->hdr; > >> > + struct scatterlist sg[2]; > >> > + unsigned int flags = compressed ? VIRTIO_PSTORE_FL_COMPRESSED : 0; > >> > + > >> > + *id = vps->id++; > >> > + > >> > + hdr->cmd...