]> git.proxmox.com Git - qemu.git/commitdiff
qdev: fix thinko leading to guest crashes
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Jan 2010 19:16:59 +0000 (21:16 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 12 Jan 2010 19:24:52 +0000 (13:24 -0600)
Without this fix, guest crashes with drive=virtio.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev-properties.c

index 9e123ae8aa9341baaa8dccffd2277c516a6d6fa8..277ff9e78092f6ebefe7786394b54054934f1177 100644 (file)
@@ -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;
 }