search for: to_virtio_typ

Displaying 20 results from an estimated 25 matches for "to_virtio_typ".

Did you mean: to_virtio_type
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ernel.org> > > This looks great to me! I'd love to use this in qemu. (Right now I go > through hoops to use the ramoops backend for testing.) > > Reviewed-by: Kees Cook <keescook at chromium.org> Thank you! > > Notes below... > [SNIP] > > +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_TYPE_DMESG); > > + br...
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ernel.org> > > This looks great to me! I'd love to use this in qemu. (Right now I go > through hoops to use the ramoops backend for testing.) > > Reviewed-by: Kees Cook <keescook at chromium.org> Thank you! > > Notes below... > [SNIP] > > +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_TYPE_DMESG); > > + br...
2016 Jul 18
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...I'd love to use this in qemu. (Right now I go >> through hoops to use the ramoops backend for testing.) >> >> Reviewed-by: Kees Cook <keescook at chromium.org> > > Thank you! > >> >> Notes below... >> > > [SNIP] >> > +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_TYPE_DMESG); >...
2016 Jul 19
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...50 PM, Namhyung Kim <namhyung at kernel.org> wrote: > > Hello, > > > > On Sun, Jul 17, 2016 at 10:12:26PM -0700, Kees Cook wrote: > >> On Sun, Jul 17, 2016 at 9:37 PM, Namhyung Kim <namhyung at kernel.org> wrote: > > [SNIP] > >> > +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, V...
2016 Jul 19
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...50 PM, Namhyung Kim <namhyung at kernel.org> wrote: > > Hello, > > > > On Sun, Jul 17, 2016 at 10:12:26PM -0700, Kees Cook wrote: > >> On Sun, Jul 17, 2016 at 9:37 PM, Namhyung Kim <namhyung at kernel.org> wrote: > > [SNIP] > >> > +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, V...
2016 Jul 18
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...RE_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_TYPE_DMESG); + break; + default: + ret = cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_TYPE_UNKNOWN); + break; + } + + return ret;...
2016 Nov 10
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } > + > +struct type_table { > + int pstore; > + u16 virtio; > +} type_table[] = { > + TYPE_TABLE_ENTRY(DMESG), > +}; > + > +#undef TYPE_TABLE_ENTRY let's avoid macros for now pls. In fact, I would just open-code this in to_virtio_type below. We can always change our minds later if lots of types are added. > + > + single emoty line pls > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > +{ > + unsigned int i; > + > + for (i = 0; i < ARRAY_SIZE(type_table); i++) { > +...
2016 Nov 10
2
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } > + > +struct type_table { > + int pstore; > + u16 virtio; > +} type_table[] = { > + TYPE_TABLE_ENTRY(DMESG), > +}; > + > +#undef TYPE_TABLE_ENTRY let's avoid macros for now pls. In fact, I would just open-code this in to_virtio_type below. We can always change our minds later if lots of types are added. > + > + single emoty line pls > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > +{ > + unsigned int i; > + > + for (i = 0; i < ARRAY_SIZE(type_table); i++) { > +...
2016 Aug 31
1
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ine TYPE_TABLE_ENTRY(_entry) \ > + { PSTORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } > + > +struct type_table { > + int pstore; > + u16 virtio; > +} type_table[] = { > + TYPE_TABLE_ENTRY(DMESG), > +}; > + > +#undef TYPE_TABLE_ENTRY > + > + > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > +{ > + unsigned int i; > + > + for (i = 0; i < ARRAY_SIZE(type_table); i++) { > + if (type == type_table[i].pstore) > + return cpu_to_virtio16(vps->vdev, type_table[i].virtio); Does this pass sparse checks? If yes I...
2016 Aug 31
1
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...ine TYPE_TABLE_ENTRY(_entry) \ > + { PSTORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } > + > +struct type_table { > + int pstore; > + u16 virtio; > +} type_table[] = { > + TYPE_TABLE_ENTRY(DMESG), > +}; > + > +#undef TYPE_TABLE_ENTRY > + > + > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > +{ > + unsigned int i; > + > + for (i = 0; i < ARRAY_SIZE(type_table); i++) { > + if (type == type_table[i].pstore) > + return cpu_to_virtio16(vps->vdev, type_table[i].virtio); Does this pass sparse checks? If yes I...
2016 Nov 15
4
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...nt pstore; > > > + u16 virtio; > > > +} type_table[] = { > > > + TYPE_TABLE_ENTRY(DMESG), > > > +}; > > > + > > > +#undef TYPE_TABLE_ENTRY > > > > let's avoid macros for now pls. In fact, I would just open-code this > > in to_virtio_type below. We can always change our minds later if > > lots of types are added. > > Yep. > > > > > > + > > > + > > > > single emoty line pls > > Ok. > > > > > > +static u16 to_virtio_type(struct virtio_pstore *vps, enum...
2016 Nov 15
4
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...nt pstore; > > > + u16 virtio; > > > +} type_table[] = { > > > + TYPE_TABLE_ENTRY(DMESG), > > > +}; > > > + > > > +#undef TYPE_TABLE_ENTRY > > > > let's avoid macros for now pls. In fact, I would just open-code this > > in to_virtio_type below. We can always change our minds later if > > lots of types are added. > > Yep. > > > > > > + > > > + > > > > single emoty line pls > > Ok. > > > > > > +static u16 to_virtio_type(struct virtio_pstore *vps, enum...
2016 Jul 18
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...+ 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_TYPE_DMESG); > + break; > + default: > +...
2016 Nov 15
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...> > +struct type_table { > > + int pstore; > > + u16 virtio; > > +} type_table[] = { > > + TYPE_TABLE_ENTRY(DMESG), > > +}; > > + > > +#undef TYPE_TABLE_ENTRY > > let's avoid macros for now pls. In fact, I would just open-code this > in to_virtio_type below. We can always change our minds later if > lots of types are added. Yep. > > > + > > + > > single emoty line pls Ok. > > > +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) > > +{ > > + unsigned int i; > &gt...
2016 Nov 15
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...gt;> + u16 virtio; >>>> +} type_table[] = { >>>> + TYPE_TABLE_ENTRY(DMESG), >>>> +}; >>>> + >>>> +#undef TYPE_TABLE_ENTRY >>> >>> let's avoid macros for now pls. In fact, I would just open-code this >>> in to_virtio_type below. We can always change our minds later if >>> lots of types are added. >> >> Yep. >> >>> >>>> + >>>> + >>> >>> single emoty line pls >> >> Ok. >> >>> >>>> +static u16 to_virtio...
2016 Aug 20
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...to ack */ + wait_queue_head_t acked; + int failed; +}; + +#define TYPE_TABLE_ENTRY(_entry) \ + { PSTORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } + +struct type_table { + int pstore; + u16 virtio; +} type_table[] = { + TYPE_TABLE_ENTRY(DMESG), +}; + +#undef TYPE_TABLE_ENTRY + + +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(type_table); i++) { + if (type == type_table[i].pstore) + return cpu_to_virtio16(vps->vdev, type_table[i].virtio); + } + + return cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_TYPE_UNKNO...
2016 Aug 31
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
...to ack */ + wait_queue_head_t acked; + int failed; +}; + +#define TYPE_TABLE_ENTRY(_entry) \ + { PSTORE_TYPE_##_entry, VIRTIO_PSTORE_TYPE_##_entry } + +struct type_table { + int pstore; + u16 virtio; +} type_table[] = { + TYPE_TABLE_ENTRY(DMESG), +}; + +#undef TYPE_TABLE_ENTRY + + +static u16 to_virtio_type(struct virtio_pstore *vps, enum pstore_type_id type) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(type_table); i++) { + if (type == type_table[i].pstore) + return cpu_to_virtio16(vps->vdev, type_table[i].virtio); + } + + return cpu_to_virtio16(vps->vdev, VIRTIO_PSTORE_TYPE_UNKNO...
2016 Aug 31
4
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v4)
Hello, This is another iteration of the virtio-pstore work. I've addressed all comments from Daniel Berrange on the qemu side. * changes in v4) - use qio_channel_file_new_path() (Daniel) - rename to delete_old_pstore_file (Daniel) - convert G_REMOVE_SOURCE to FALSE (Daniel) * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests
2016 Aug 31
4
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v4)
Hello, This is another iteration of the virtio-pstore work. I've addressed all comments from Daniel Berrange on the qemu side. * changes in v4) - use qio_channel_file_new_path() (Daniel) - rename to delete_old_pstore_file (Daniel) - convert G_REMOVE_SOURCE to FALSE (Daniel) * changes in v3) - use QIOChannel API (Stefan, Daniel) - add bound check for malcious guests
2016 Jul 18
7
[RFC/PATCHSET 0/3] virtio-pstore: Implement virtio pstore device
Hello, This patchset is a proof of concept of virtio-pstore idea [1]. It has some rough edges and I'm not familiar with this area, so please give me feedbacks and advices if I'm going to a wrong direction. It started from the fact that dumping ftrace buffer at kernel oops/panic takes too much time. Although there's a way to reduce the size of the original data, sometimes I want to