search for: virtio_pstore_to_filenam

Displaying 20 results from an estimated 30 matches for "virtio_pstore_to_filenam".

2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
...; + ssize_t len; > > > + unsigned short type; > > > + int flags = O_WRONLY | O_CREAT; > > > + > > > + /* we already consume the req */ > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > + > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > + > > > + type = le16_to_cpu(req->type); > > > + > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > + flags |= O_TRUNC; > > > + } else if (type == VIRTIO_PSTORE_TYPE_CONSOLE) { > >...
2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
...; + ssize_t len; > > > + unsigned short type; > > > + int flags = O_WRONLY | O_CREAT; > > > + > > > + /* we already consume the req */ > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > + > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > + > > > + type = le16_to_cpu(req->type); > > > + > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > + flags |= O_TRUNC; > > > + } else if (type == VIRTIO_PSTORE_TYPE_CONSOLE) { > >...
2016 Jul 30
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...> > > > > + int flags = O_WRONLY | O_CREAT; > > > > > + > > > > > + /* we already consume the req */ > > > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > > > + > > > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > > > + > > > > > + type = le16_to_cpu(req->type); > > > > > + > > > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > > > + flags |= O_TRUNC; > > > > > +...
2016 Jul 30
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...> > > > > + int flags = O_WRONLY | O_CREAT; > > > > > + > > > > > + /* we already consume the req */ > > > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > > > + > > > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > > > + > > > > > + type = le16_to_cpu(req->type); > > > > > + > > > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > > > + flags |= O_TRUNC; > > > > > +...
2016 Jul 28
0
[PATCH 6/7] qemu: Implement virtio-pstore device
...quot;trace.h" > > + > > +#include "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_req *req) > > +{ > > + const char *basename; > > + unsigned long long id = 0; > > + unsigned int flags = le32_to_cpu(req->flags); > > + > > +...
2016 Jul 28
3
[PATCH 6/7] qemu: Implement virtio-pstore device
...quot;qapi-event.h" > +#include "trace.h" > + > +#include "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_req *req) > +{ > + const char *basename; > + unsigned long long id = 0; > + unsigned int flags = le32_to_cpu(req->flags); > + > + switch (le16_to_cpu(req->typ...
2016 Jul 28
3
[PATCH 6/7] qemu: Implement virtio-pstore device
...quot;qapi-event.h" > +#include "trace.h" > + > +#include "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_req *req) > +{ > + const char *basename; > + unsigned long long id = 0; > + unsigned int flags = le32_to_cpu(req->flags); > + > + switch (le16_to_cpu(req->typ...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...DEFAULT_FILE_MAX 5 > + > +/* the index should match to the type value */ > +static const char *virtio_pstore_file_prefix[] = { > + "unknown-", /* VIRTIO_PSTORE_TYPE_UNKNOWN */ > + "dmesg-", /* VIRTIO_PSTORE_TYPE_DMESG */ > +}; > + > +static char *virtio_pstore_to_filename(VirtIOPstore *s, > + struct virtio_pstore_req *req) > +{ > + const char *basename; > + unsigned long long id; > + unsigned int type = le16_to_cpu(req->type); > + unsigned int flags = le32_to_cpu(req->flags); > + > +...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...DEFAULT_FILE_MAX 5 > + > +/* the index should match to the type value */ > +static const char *virtio_pstore_file_prefix[] = { > + "unknown-", /* VIRTIO_PSTORE_TYPE_UNKNOWN */ > + "dmesg-", /* VIRTIO_PSTORE_TYPE_DMESG */ > +}; > + > +static char *virtio_pstore_to_filename(VirtIOPstore *s, > + struct virtio_pstore_req *req) > +{ > + const char *basename; > + unsigned long long id; > + unsigned int type = le16_to_cpu(req->type); > + unsigned int flags = le32_to_cpu(req->flags); > + > +...
2016 Jul 28
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...quot;qapi-event.h" > +#include "trace.h" > + > +#include "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_req *req) > +{ > + const char *basename; > + unsigned long long id = 0; > + unsigned int flags = le32_to_cpu(req->flags); > + > + switch (le16_to_cpu(req->typ...
2016 Jul 28
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...quot;qapi-event.h" > +#include "trace.h" > + > +#include "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_req *req) > +{ > + const char *basename; > + unsigned long long id = 0; > + unsigned int flags = le32_to_cpu(req->flags); > + > + switch (le16_to_cpu(req->typ...
2016 Jul 30
0
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...> Cc: Minchan Kim <minchan at kernel.org> > > Cc: kvm at vger.kernel.org > > Cc: qemu-devel at nongnu.org > > Cc: virtualization at lists.linux-foundation.org > > Signed-off-by: Namhyung Kim <namhyung at kernel.org> > > --- [SNIP] > > +static void virtio_pstore_to_filename(VirtIOPstore *s, char *buf, size_t sz, > > + struct virtio_pstore_req *req) > > +{ > > + const char *basename; > > + unsigned long long id = 0; > > + unsigned int flags = le32_to_cpu(req->flags); > > + > > +...
2016 Jul 18
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...quot;qapi-event.h" > +#include "trace.h" > + > +#include "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) { Missing le16_to_cpu()? > + case VIRTIO_PSTORE_TYPE_DMESG: > + basename = "dmesg&...
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...; +/* the index should match to the type value */ > > +static const char *virtio_pstore_file_prefix[] = { > > + "unknown-", /* VIRTIO_PSTORE_TYPE_UNKNOWN */ > > + "dmesg-", /* VIRTIO_PSTORE_TYPE_DMESG */ > > +}; > > + > > +static char *virtio_pstore_to_filename(VirtIOPstore *s, > > + struct virtio_pstore_req *req) > > +{ > > + const char *basename; > > + unsigned long long id; > > + unsigned int type = le16_to_cpu(req->type); > > + unsigned int flags = le32_to_cpu(re...
2016 Nov 10
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...me file, hardly what was wanted. > > > > > > > + "dmesg-", /* VIRTIO_PSTORE_TYPE_DMESG */ > > > > use named initializers for this instead of comments. > > Ok. > > > > > > +}; > > > + > > > +static char *virtio_pstore_to_filename(VirtIOPstore *s, > > > + struct virtio_pstore_req *req) > > > +{ > > > + const char *basename; > > > + unsigned long long id; > > > + unsigned int type = le16_to_cpu(req->type); > > > + unsig...
2016 Jul 27
0
[PATCH 6/7] qemu: Implement virtio-pstore device
...nclude "qapi/visitor.h" +#include "qapi-event.h" +#include "trace.h" + +#include "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_req *req) +{ + const char *basename; + unsigned long long id = 0; + unsigned int flags = le32_to_cpu(req->flags); + + switch (le16_to_cpu(req->type)) { + case VIRTIO_PSTORE_TYPE_...
2016 Jul 28
0
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...> + unsigned short type; > > > > + int flags = O_WRONLY | O_CREAT; > > > > + > > > > + /* we already consume the req */ > > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > > + > > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > > + > > > > + type = le16_to_cpu(req->type); > > > > + > > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > > + flags |= O_TRUNC; > > > > + } else if (type == VIRTIO_PST...
2016 Jul 18
3
[PATCH 2/3] qemu: Implement virtio-pstore device
...nclude "qapi/visitor.h" +#include "qapi-event.h" +#include "trace.h" + +#include "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 = &qu...
2016 Aug 01
0
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...+ int flags = O_WRONLY | O_CREAT; > > > > > > + > > > > > > + /* we already consume the req */ > > > > > > + iov_discard_front(&out_sg, &out_num, sizeof(*req)); > > > > > > + > > > > > > + virtio_pstore_to_filename(s, path, sizeof(path), req); > > > > > > + > > > > > > + type = le16_to_cpu(req->type); > > > > > > + > > > > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > > > > + flags |= O_TRUNC; >...
2016 Aug 20
7
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3)
Hello, This is another iteration of the virtio-pstore work. In this patchset I addressed most of feedbacks from previous version and drooped the support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic implementation * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests (Daniel) - drop support PSTORE_TYPE_CONSOLE for now