From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 12:47:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D01316F; Tue, 30 Dec 2014 12:47:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6927064116; Tue, 30 Dec 2014 12:47:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBUCljF8013395; Tue, 30 Dec 2014 12:47:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBUClja7013394; Tue, 30 Dec 2014 12:47:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201412301247.sBUClja7013394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 Dec 2014 12:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276409 - head/sys/dev/virtio/mmio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2014 12:47:45 -0000 Author: andrew Date: Tue Dec 30 12:47:44 2014 New Revision: 276409 URL: https://svnweb.freebsd.org/changeset/base/276409 Log: Set the page size in the virtio-mmio driver. Some backends, e.g QEMU, assume a 1 byte page size until told otherwise. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/virtio/mmio/virtio_mmio.c Modified: head/sys/dev/virtio/mmio/virtio_mmio.c ============================================================================== --- head/sys/dev/virtio/mmio/virtio_mmio.c Tue Dec 30 10:30:12 2014 (r276408) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Tue Dec 30 12:47:44 2014 (r276409) @@ -506,6 +506,8 @@ vtmmio_alloc_virtqueues(device_t dev, in if (sc->vtmmio_vqs == NULL) return (ENOMEM); + vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_PAGE_SIZE, 1 << PAGE_SHIFT); + for (idx = 0; idx < nvqs; idx++) { vqx = &sc->vtmmio_vqs[idx]; info = &vq_info[idx];