Displaying 12 results from an estimated 12 matches for "qdev_prop_bit64".
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
...lude/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 070006c..81e5d0b 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -6,6 +6,7 @@
> /*** qdev-properties.c ***/
>
> extern PropertyInfo qdev_prop_bit;
> +extern PropertyInfo qdev_prop_bit64;
> extern PropertyInfo qdev_prop_bool;
> extern PropertyInfo qdev_prop_uint8;
> extern PropertyInfo qdev_prop_uint16;
> @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen;
> .defval = (bool)_defval, \
> }
>
> +#def...
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
...lude/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 070006c..81e5d0b 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -6,6 +6,7 @@
> /*** qdev-properties.c ***/
>
> extern PropertyInfo qdev_prop_bit;
> +extern PropertyInfo qdev_prop_bit64;
> extern PropertyInfo qdev_prop_bool;
> extern PropertyInfo qdev_prop_uint8;
> extern PropertyInfo qdev_prop_uint16;
> @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen;
> .defval = (bool)_defval, \
> }
>
> +#def...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...store the old 32 bits here, then store the new 32 bits
later? Should be able to get that compatible.
> > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \
> > + .name = (_name), \
> > + .info = &(qdev_prop_bit64), \
>
> No need for the paranthesis around qdev_prop_bit64 here?
Straight copy&paste :) I'd prefer to keep the same style for all
#defines here.
>
> > + .bitnr = (_bit), \
> > + .offset...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...store the old 32 bits here, then store the new 32 bits
later? Should be able to get that compatible.
> > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \
> > + .name = (_name), \
> > + .info = &(qdev_prop_bit64), \
>
> No need for the paranthesis around qdev_prop_bit64 here?
Straight copy&paste :) I'd prefer to keep the same style for all
#defines here.
>
> > + .bitnr = (_bit), \
> > + .offset...
2014 Dec 11
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...ndex 2e47f70..1b24818 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -125,6 +125,64 @@ PropertyInfo qdev_prop_bit = {
.set = prop_set_bit,
};
+/* Bit on a 64 bit value*/
+
+static uint64_t qdev_get_prop_mask64(Property *prop)
+{
+ assert(prop->info == &qdev_prop_bit64);
+ return 0x1ULL << prop->bitnr;
+}
+
+static void bit64_prop_set(DeviceState *dev, Property *props, bool val)
+{
+ uint64_t *p = qdev_get_prop_ptr(dev, props);
+ uint64_t mask = qdev_get_prop_mask64(props);
+ if (val) {
+ *p |= mask;
+ } else {
+ *p &= ~m...
2014 Dec 11
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...ndex 2e47f70..1b24818 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -125,6 +125,64 @@ PropertyInfo qdev_prop_bit = {
.set = prop_set_bit,
};
+/* Bit on a 64 bit value*/
+
+static uint64_t qdev_get_prop_mask64(Property *prop)
+{
+ assert(prop->info == &qdev_prop_bit64);
+ return 0x1ULL << prop->bitnr;
+}
+
+static void bit64_prop_set(DeviceState *dev, Property *props, bool val)
+{
+ uint64_t *p = qdev_get_prop_ptr(dev, props);
+ uint64_t mask = qdev_get_prop_mask64(props);
+ if (val) {
+ *p |= mask;
+ } else {
+ *p &= ~m...
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
If you see issues or are just curious, you can
turn the new feature off. For example:
-global virtio-net-pci.event_idx=on
-global virtio-blk-pci.event_idx=off
Also, it's possible to try both
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
If you see issues or are just curious, you can
turn the new feature off. For example:
-global virtio-net-pci.event_idx=on
-global virtio-blk-pci.event_idx=off
Also, it's possible to try both
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
I see nice performance improvements: e.g. from 12 to 18 Gbit/s host
to guest with netperf, but did not spend a lot of time testing
performance. I hope others will try this out and report.
Note: there
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
I see nice performance improvements: e.g. from 12 to 18 Gbit/s host
to guest with netperf, but did not spend a lot of time testing
performance. I hope others will try this out and report.
Note: there
2014 Dec 11
45
[PATCH RFC v6 00/20] qemu: towards virtio-1 host support
And yet another iteration of virtio-1 support in qemu, tested with the
latest virtio kernel patches. Find it at
git://github.com/cohuck/qemu virtio-1
Changes from v5:
- fixed stupid bug in "virtio: support more feature bits": we need to
define a proper prop backend for 64 bit wide handling...
- don't negotiate revision 1 unless VERSION_1 is offered
- use 64 bit wide features
2014 Dec 11
45
[PATCH RFC v6 00/20] qemu: towards virtio-1 host support
And yet another iteration of virtio-1 support in qemu, tested with the
latest virtio kernel patches. Find it at
git://github.com/cohuck/qemu virtio-1
Changes from v5:
- fixed stupid bug in "virtio: support more feature bits": we need to
define a proper prop backend for 64 bit wide handling...
- don't negotiate revision 1 unless VERSION_1 is offered
- use 64 bit wide features