From patchwork Tue Jan 12 19:16:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 42743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CEE3DB6EF3 for ; Wed, 13 Jan 2010 06:23:11 +1100 (EST) Received: from localhost ([127.0.0.1]:60819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUmJq-0006cY-AM for incoming@patchwork.ozlabs.org; Tue, 12 Jan 2010 14:22:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUmHh-00068t-O2 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 14:20:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUmHd-00066A-06 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 14:20:09 -0500 Received: from [199.232.76.173] (port=35277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUmHc-000666-QG for qemu-devel@nongnu.org; Tue, 12 Jan 2010 14:20:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45808) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUmHc-0006VS-7z for qemu-devel@nongnu.org; Tue, 12 Jan 2010 14:20:04 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0CJJsiY027513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Jan 2010 14:19:55 -0500 Received: from redhat.com (dhcp-0-94.tlv.redhat.com [10.35.0.94]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o0CJJqFO025829; Tue, 12 Jan 2010 14:19:53 -0500 Date: Tue, 12 Jan 2010 21:16:59 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org, Anthony Liguori , hch@lst.de, kraxel@redhat.com Message-ID: <20100112191659.GA3258@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] qdev: fix thinko leading to guest crashes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Without this fix, guest crashes with drive=virtio. Signed-off-by: Michael S. Tsirkin --- Anthony, could you please apply this patch quickly? It's an obvious one and it fixes guest crashes. Also, sorry about missing this in my testing. hw/qdev-properties.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 9e123ae..277ff9e 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -20,7 +20,7 @@ static void bit_prop_set(DeviceState *dev, Property *props, bool val) uint32_t *p = qdev_get_prop_ptr(dev, props); uint32_t mask = qdev_get_prop_mask(props); if (val) - *p |= ~mask; + *p |= mask; else *p &= ~mask; }