All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
@ 2015-07-09 11:01 Cornelia Huck
  2015-07-09 11:22 ` Christian Borntraeger
  2015-07-13  9:01 ` Cornelia Huck
  0 siblings, 2 replies; 6+ messages in thread
From: Cornelia Huck @ 2015-07-09 11:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cornelia Huck, kraxel, mst

64 bit props used 32 bit callbacks in two places, leading to broken
feature bits on virtio (example: got 0x31000000000006d4 which is
obviously bogus). Fix this.

Fixes: fdba6d96 ("qdev: add 64bit properties")
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/core/qdev-properties.c    | 2 +-
 include/hw/qdev-properties.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index e9e686f..04fd80a 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -130,7 +130,7 @@ PropertyInfo qdev_prop_bit = {
 
 static uint64_t qdev_get_prop_mask64(Property *prop)
 {
-    assert(prop->info == &qdev_prop_bit);
+    assert(prop->info == &qdev_prop_bit64);
     return 0x1ull << prop->bitnr;
 }
 
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 0cfff1c..77538a8 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -53,7 +53,7 @@ extern PropertyInfo qdev_prop_arraylen;
         }
 #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) {       \
         .name      = (_name),                                           \
-        .info      = &(qdev_prop_bit),                                  \
+        .info      = &(qdev_prop_bit64),                                \
         .bitnr    = (_bit),                                             \
         .offset    = offsetof(_state, _field)                           \
             + type_check(uint64_t, typeof_field(_state, _field)),       \
-- 
2.3.8

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
  2015-07-09 11:01 [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties Cornelia Huck
@ 2015-07-09 11:22 ` Christian Borntraeger
  2015-07-13  9:01 ` Cornelia Huck
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Borntraeger @ 2015-07-09 11:22 UTC (permalink / raw)
  To: Cornelia Huck, qemu-devel; +Cc: kraxel, mst

Am 09.07.2015 um 13:01 schrieb Cornelia Huck:
> 64 bit props used 32 bit callbacks in two places, leading to broken
> feature bits on virtio (example: got 0x31000000000006d4 which is
> obviously bogus). Fix this.
> 
> Fixes: fdba6d96 ("qdev: add 64bit properties")
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>

With that patch a pre-v1-patches save file loads and works. (Without this
patch the guest loads, but virtio is broken and all I/O hangs)

> ---
>  hw/core/qdev-properties.c    | 2 +-
>  include/hw/qdev-properties.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index e9e686f..04fd80a 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -130,7 +130,7 @@ PropertyInfo qdev_prop_bit = {
> 
>  static uint64_t qdev_get_prop_mask64(Property *prop)
>  {
> -    assert(prop->info == &qdev_prop_bit);
> +    assert(prop->info == &qdev_prop_bit64);
>      return 0x1ull << prop->bitnr;
>  }
> 
> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 0cfff1c..77538a8 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -53,7 +53,7 @@ extern PropertyInfo qdev_prop_arraylen;
>          }
>  #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) {       \
>          .name      = (_name),                                           \
> -        .info      = &(qdev_prop_bit),                                  \
> +        .info      = &(qdev_prop_bit64),                                \
>          .bitnr    = (_bit),                                             \
>          .offset    = offsetof(_state, _field)                           \
>              + type_check(uint64_t, typeof_field(_state, _field)),       \
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
  2015-07-09 11:01 [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties Cornelia Huck
  2015-07-09 11:22 ` Christian Borntraeger
@ 2015-07-13  9:01 ` Cornelia Huck
  2015-07-13 10:18   ` Paolo Bonzini
  1 sibling, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2015-07-13  9:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel, mst

On Thu,  9 Jul 2015 13:01:14 +0200
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:

> 64 bit props used 32 bit callbacks in two places, leading to broken
> feature bits on virtio (example: got 0x31000000000006d4 which is
> obviously bogus). Fix this.
> 
> Fixes: fdba6d96 ("qdev: add 64bit properties")
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> ---
>  hw/core/qdev-properties.c    | 2 +-
>  include/hw/qdev-properties.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Ping? I think this should go into 2.4-rc1.

> 
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index e9e686f..04fd80a 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -130,7 +130,7 @@ PropertyInfo qdev_prop_bit = {
> 
>  static uint64_t qdev_get_prop_mask64(Property *prop)
>  {
> -    assert(prop->info == &qdev_prop_bit);
> +    assert(prop->info == &qdev_prop_bit64);
>      return 0x1ull << prop->bitnr;
>  }
> 
> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 0cfff1c..77538a8 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -53,7 +53,7 @@ extern PropertyInfo qdev_prop_arraylen;
>          }
>  #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) {       \
>          .name      = (_name),                                           \
> -        .info      = &(qdev_prop_bit),                                  \
> +        .info      = &(qdev_prop_bit64),                                \
>          .bitnr    = (_bit),                                             \
>          .offset    = offsetof(_state, _field)                           \
>              + type_check(uint64_t, typeof_field(_state, _field)),       \

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
  2015-07-13  9:01 ` Cornelia Huck
@ 2015-07-13 10:18   ` Paolo Bonzini
  2015-07-13 11:23     ` Michael S. Tsirkin
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-07-13 10:18 UTC (permalink / raw)
  To: Cornelia Huck, qemu-devel; +Cc: kraxel, mst



On 13/07/2015 11:01, Cornelia Huck wrote:
> On Thu,  9 Jul 2015 13:01:14 +0200
> Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> 
>> 64 bit props used 32 bit callbacks in two places, leading to broken
>> feature bits on virtio (example: got 0x31000000000006d4 which is
>> obviously bogus). Fix this.
>>
>> Fixes: fdba6d96 ("qdev: add 64bit properties")
>> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>> ---
>>  hw/core/qdev-properties.c    | 2 +-
>>  include/hw/qdev-properties.h | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Ping? I think this should go into 2.4-rc1.

I'll queue it.

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
  2015-07-13 10:18   ` Paolo Bonzini
@ 2015-07-13 11:23     ` Michael S. Tsirkin
  2015-07-13 11:24       ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2015-07-13 11:23 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Cornelia Huck, qemu-devel, kraxel

On Mon, Jul 13, 2015 at 12:18:31PM +0200, Paolo Bonzini wrote:
> 
> 
> On 13/07/2015 11:01, Cornelia Huck wrote:
> > On Thu,  9 Jul 2015 13:01:14 +0200
> > Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> > 
> >> 64 bit props used 32 bit callbacks in two places, leading to broken
> >> feature bits on virtio (example: got 0x31000000000006d4 which is
> >> obviously bogus). Fix this.
> >>
> >> Fixes: fdba6d96 ("qdev: add 64bit properties")
> >> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> >> ---
> >>  hw/core/qdev-properties.c    | 2 +-
> >>  include/hw/qdev-properties.h | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > Ping? I think this should go into 2.4-rc1.
> 
> I'll queue it.
> 
> Paolo

No need, I already have it queued. Want to send an ack?

-- 
MST

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties
  2015-07-13 11:23     ` Michael S. Tsirkin
@ 2015-07-13 11:24       ` Paolo Bonzini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2015-07-13 11:24 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Cornelia Huck, qemu-devel, kraxel



On 13/07/2015 13:23, Michael S. Tsirkin wrote:
> On Mon, Jul 13, 2015 at 12:18:31PM +0200, Paolo Bonzini wrote:
>>
>>
>> On 13/07/2015 11:01, Cornelia Huck wrote:
>>> On Thu,  9 Jul 2015 13:01:14 +0200
>>> Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
>>>
>>>> 64 bit props used 32 bit callbacks in two places, leading to broken
>>>> feature bits on virtio (example: got 0x31000000000006d4 which is
>>>> obviously bogus). Fix this.
>>>>
>>>> Fixes: fdba6d96 ("qdev: add 64bit properties")
>>>> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>>>> ---
>>>>  hw/core/qdev-properties.c    | 2 +-
>>>>  include/hw/qdev-properties.h | 2 +-
>>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> Ping? I think this should go into 2.4-rc1.
>>
>> I'll queue it.
>>
>> Paolo
> 
> No need, I already have it queued. Want to send an ack?

Sure,

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-13 11:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 11:01 [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties Cornelia Huck
2015-07-09 11:22 ` Christian Borntraeger
2015-07-13  9:01 ` Cornelia Huck
2015-07-13 10:18   ` Paolo Bonzini
2015-07-13 11:23     ` Michael S. Tsirkin
2015-07-13 11:24       ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.