Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp582940imm; Tue, 5 Jun 2018 00:42:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJV67ocqJr2LLeQIggAezukbes7GmsoGC5qvPrEDPbym+/XbONJ3e2e3gd3XMrvfEUCE9nF X-Received: by 2002:a65:498e:: with SMTP id r14-v6mr19349511pgs.78.1528184543075; Tue, 05 Jun 2018 00:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528184543; cv=none; d=google.com; s=arc-20160816; b=o/l90oPMh6LndEEoJNKxPFEBWjgL44GEpw0jnYO9+nJKQnBt76Y0HdSjT8LDrNZwPj zInoRO/Gf4GOdPBjjYXrFiTCmrJctM+QVz9mHoRm0cHBYrKVYPq7WEOE+VcOtTF65XW8 2h17+2MYC7tXVOHS9Z470evpH3t1Qd/1nWVzuhsGCVHeDl0bs0LpAPCL8dpTJh9BGthw vKYoaXx+Pi5GRUu3F3H/apbuqbchW58Wiw8eyVWbyoQucBGyyQ7on3m0yX9axaTI6V2/ j0XrWe+5/mtXO99QgzL9yBrWPsO/tBsOyA7LQuS0V0vXHOTtUHfbv5Bc4pu/gx2lo/QK PphA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=m19SVlw9P8nCH5/EqJ1/1FwRRJPTWkbp4j6hAw9V1jI=; b=dll7D7vGF/+ZO0tt/BjWPrXA3otScwzhUX4nkj4EP5uG7ChpTWk7hpEP2YlYygoQOS maHvzx48gnZ0Ztu7rf2ju/l3l7xczCd9YdVrsBFIaEKMPDT6F+sYYCPU1hfS3i3J3Mto n0pk8BsPo/gJqlNpYacBdgiX3DTNalmosBgxfSPfnnhmpsM90h0mWLbFrb0g2myXngvu CEQD75qVIND/1Yl09QW94VROlSdo/9ZPE/IMZ7l7oDzPEF6Y9SzGQUa+Ds3qKSCHAEBV 8JKRBFbo5of8NDr/Fce5ke3GtCg1MTePuPU5hrk4FraZIEO7ATTHTA4uIJwQQSOJ0F4h Taow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si49378138plb.514.2018.06.05.00.42.08; Tue, 05 Jun 2018 00:42:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbeFEHlc (ORCPT + 99 others); Tue, 5 Jun 2018 03:41:32 -0400 Received: from mga11.intel.com ([192.55.52.93]:14303 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbeFEHlL (ORCPT ); Tue, 5 Jun 2018 03:41:11 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2018 00:41:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,478,1520924400"; d="scan'208";a="56617100" Received: from debian.sh.intel.com ([10.67.104.203]) by orsmga003.jf.intel.com with ESMTP; 05 Jun 2018 00:41:09 -0700 From: Tiwei Bie To: mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: wexu@redhat.com, jfreimann@redhat.com, tiwei.bie@intel.com Subject: [RFC v6 5/5] virtio_ring: enable packed ring Date: Tue, 5 Jun 2018 15:40:46 +0800 Message-Id: <20180605074046.20709-6-tiwei.bie@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180605074046.20709-1-tiwei.bie@intel.com> References: <20180605074046.20709-1-tiwei.bie@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Tiwei Bie --- drivers/s390/virtio/virtio_ccw.c | 8 ++++++++ drivers/virtio/virtio_ring.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c index 8f5c1d7f751a..ff5b85736d8d 100644 --- a/drivers/s390/virtio/virtio_ccw.c +++ b/drivers/s390/virtio/virtio_ccw.c @@ -765,6 +765,11 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev) return rc; } +static void ccw_transport_features(struct virtio_device *vdev) +{ + __virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED); +} + static int virtio_ccw_finalize_features(struct virtio_device *vdev) { struct virtio_ccw_device *vcdev = to_vc_device(vdev); @@ -791,6 +796,9 @@ static int virtio_ccw_finalize_features(struct virtio_device *vdev) /* Give virtio_ring a chance to accept features. */ vring_transport_features(vdev); + /* Give virtio_ccw a chance to accept features. */ + ccw_transport_features(vdev); + features->index = 0; features->features = cpu_to_le32((u32)vdev->features); /* Write the first half of the feature bits to the host. */ diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index aefd7ac40928..fe849fd8733b 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -1965,6 +1965,8 @@ void vring_transport_features(struct virtio_device *vdev) break; case VIRTIO_F_IOMMU_PLATFORM: break; + case VIRTIO_F_RING_PACKED: + break; default: /* We don't understand this bit. */ __virtio_clear_bit(vdev, i); -- 2.17.0