From patchwork Mon Jul 14 15:49:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 369676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 410E414011B for ; Tue, 15 Jul 2014 01:50:55 +1000 (EST) Received: from localhost ([::1]:58520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6iWj-0007KU-0u for incoming@patchwork.ozlabs.org; Mon, 14 Jul 2014 11:50:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6iVp-00061o-50 for qemu-devel@nongnu.org; Mon, 14 Jul 2014 11:50:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6iVg-0002sD-0L for qemu-devel@nongnu.org; Mon, 14 Jul 2014 11:49:56 -0400 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:64043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6iVf-0002s3-S7 for qemu-devel@nongnu.org; Mon, 14 Jul 2014 11:49:47 -0400 Received: by mail-qg0-f53.google.com with SMTP id q107so1405725qgd.40 for ; Mon, 14 Jul 2014 08:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=T+8raDep9cS7EISgQTXe4IboUaQ8KGjXwMtJCuQYCA4=; b=H2EUQbvyxzQWQdQcOMj4xIpGM9oVqu216Qv/4Mp1gAFHuw+oU7PJsmvoLqsfGsqcNM mRmv7wDMf7oZdwg+C2yg8hQ/6UK1RCO0umDsaw9Z5WqYH65gKQaFc2LZO1T06Bca/blp H/JIju1uNo0y85JbqSemY9BwSJyN4OmfeehX0OAztFBg5pQ+TpyUn2c+tgT3VS9BwjIn 6uldz/1NbSnhW9XuCp2vuZJcMHCxhcQTcIVZsDiZ7fweA26hNJAPajQ2pK4v7qSeq1YM pRRJuQmUqmWAKNNnhdQlY21u612EHm+oTY+nFK80uRdutnkG6FVeei4ZLekD8V8BzioF deUw== X-Received: by 10.224.13.4 with SMTP id z4mr23463309qaz.51.1405352987344; Mon, 14 Jul 2014 08:49:47 -0700 (PDT) Received: from yakj.usersys.redhat.com (net-37-116-204-163.cust.vodafonedsl.it. [37.116.204.163]) by mx.google.com with ESMTPSA id k2sm20975621qat.23.2014.07.14.08.49.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jul 2014 08:49:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 14 Jul 2014 17:49:27 +0200 Message-Id: <1405352968-3155-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405352968-3155-1-git-send-email-pbonzini@redhat.com> References: <1405352968-3155-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::235 Cc: David Gilbert Subject: [Qemu-devel] [PULL 4/5] virtio-scsi: fix with -M pc-i440fx-2.0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Right now starting a machine with virtio-scsi and a <= 2.0 machine type fails with: qemu-system-x86_64: -device virtio-scsi-pci: Property .any_layout not found This is because the any_layout bit was actually never set after virtio-scsi was changed to support arbitrary layout for virtio buffers. (This was just a cleanup and a preparation for virtio 1.0; no guest actually checks the bit, but the new request parsing algorithms are tested even with old guest). Reported-by: David Gilbert Reviewed-by: David Gilbert Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-scsi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index 0419ee4..188a2d9 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -178,6 +178,8 @@ typedef struct { DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128) #define DEFINE_VIRTIO_SCSI_FEATURES(_state, _feature_field) \ + DEFINE_PROP_BIT("any_layout", _state, _feature_field, \ + VIRTIO_F_ANY_LAYOUT, true), \ DEFINE_PROP_BIT("hotplug", _state, _feature_field, VIRTIO_SCSI_F_HOTPLUG, \ true), \ DEFINE_PROP_BIT("param_change", _state, _feature_field, \