From patchwork Tue Mar 6 12:22:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 144931 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2FBEFB6FA4 for ; Tue, 6 Mar 2012 23:22:58 +1100 (EST) Received: from localhost ([::1]:46849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4tPr-0005BW-To for incoming@patchwork.ozlabs.org; Tue, 06 Mar 2012 07:22:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4tPc-0004qa-G0 for qemu-devel@nongnu.org; Tue, 06 Mar 2012 07:22:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4tPW-0004bJ-7E for qemu-devel@nongnu.org; Tue, 06 Mar 2012 07:22:40 -0500 Received: from mail-tul01m020-f173.google.com ([209.85.214.173]:51194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4tPW-0004ZJ-08 for qemu-devel@nongnu.org; Tue, 06 Mar 2012 07:22:34 -0500 Received: by mail-tul01m020-f173.google.com with SMTP id up6so6817206obb.4 for ; Tue, 06 Mar 2012 04:22:33 -0800 (PST) Received-SPF: pass (google.com: domain of paolo.bonzini@gmail.com designates 10.182.159.41 as permitted sender) client-ip=10.182.159.41; Authentication-Results: mr.google.com; spf=pass (google.com: domain of paolo.bonzini@gmail.com designates 10.182.159.41 as permitted sender) smtp.mail=paolo.bonzini@gmail.com; dkim=pass header.i=paolo.bonzini@gmail.com Received: from mr.google.com ([10.182.159.41]) by 10.182.159.41 with SMTP id wz9mr6144262obb.69.1331036553330 (num_hops = 1); Tue, 06 Mar 2012 04:22:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=6uQRH3/9txCxaHara89/zM0cZdKYlDpFU69Jq72O0hU=; b=DqpMD/+s33OfjqLDVJvT7vGyey60s6ffMVPCp4tTXPwJyb3F3g5GqBRUFaOKoNvNKE hkC86tHJFU0DU6DNmmAOv6Hwgu8G5Qs+HVrI48yEXOL7VgfzKH7oyxJ1eko1Wvp7LAgL v/3lgyGSEy/eMPRXbAeTtqWMJ1uoSji2RfyJlbsc2khI4/MihE175Y/DI/rA2O4b0Fcs QO0DqyFdu3he/+nYclXYoGEOjVIlhkY3f77V22JVhOeDCGqAqF/ki5EoEK5tyJNvd9CI by7WLxy4+Sg0Ijg6N9/UPYQCa2NaOX+454+pHlgWBgrZzQS80VMeMaHewzFRwEA+VMY+ 7MYw== Received: by 10.182.159.41 with SMTP id wz9mr5447394obb.69.1331036553269; Tue, 06 Mar 2012 04:22:33 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id f2sm510095oef.6.2012.03.06.04.22.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Mar 2012 04:22:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2012 13:22:07 +0100 Message-Id: <1331036527-7651-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1331036527-7651-1-git-send-email-pbonzini@redhat.com> References: <1331036527-7651-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.173 Cc: amit.shah@redhat.com, uobergfe@redhat.com, owasserm@redhat.com, armbru@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH 3/3] virtio-blk: note optional features 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 The guest must already be prepared to see SG_IO support disappear from under its feet, for example if migration refers to a block device on the source and file-based storage on the destination; or more likely, if the source kernel allows (gasp) SG_IO on a partition and the destination does not. So, we can migrate safely even if the source had VIRTIO_BLK_F_SCSI and the destination does not. Signed-off-by: Paolo Bonzini --- hw/virtio-blk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index c95f8fc..9a4158a 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -542,7 +542,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) if (version_id != 2) return -EINVAL; - ret = virtio_load(&s->vdev, f, 0); + ret = virtio_load(&s->vdev, f, VIRTIO_BLK_F_SCSI); if (ret) { return ret; }