From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD9ud-0001Yj-Eg for qemu-devel@nongnu.org; Thu, 09 Jul 2015 07:22:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZD9uZ-0000pI-B1 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 07:22:43 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:55194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD9uZ-0000os-2I for qemu-devel@nongnu.org; Thu, 09 Jul 2015 07:22:39 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Jul 2015 12:22:38 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 456311B08072 for ; Thu, 9 Jul 2015 12:23:47 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t69BMZos38076488 for ; Thu, 9 Jul 2015 11:22:35 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t69BMZXt023712 for ; Thu, 9 Jul 2015 05:22:35 -0600 Message-ID: <559E597A.7000400@de.ibm.com> Date: Thu, 09 Jul 2015 13:22:34 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1436439674-51226-1-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1436439674-51226-1-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: kraxel@redhat.com, mst@redhat.com 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 Tested-by: Christian Borntraeger 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)), \ >