From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAaip-0008IC-5w for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAail-00025H-5R for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:23:55 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:33114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAaik-00025D-U0 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:23:51 -0400 Received: by wiwl6 with SMTP id l6so190402160wiw.0 for ; Thu, 02 Jul 2015 02:23:50 -0700 (PDT) Date: Thu, 2 Jul 2015 10:23:45 +0100 From: Stefan Hajnoczi Message-ID: <20150702092345.GC20198@stefanha-thinkpad.redhat.com> References: <1435762232-15543-1-git-send-email-guangrong.xiao@linux.intel.com> <1435762232-15543-15-git-send-email-guangrong.xiao@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3siQDZowHQqNOShm" Content-Disposition: inline In-Reply-To: <1435762232-15543-15-git-send-email-guangrong.xiao@linux.intel.com> Subject: Re: [Qemu-devel] [PATCH 14/16] nvdimm: support NFIT_CMD_GET_CONFIG_SIZE function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xiao Guangrong Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, imammedo@redhat.com, pbonzini@redhat.com, rth@twiddle.net --3siQDZowHQqNOShm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 01, 2015 at 10:50:30PM +0800, Xiao Guangrong wrote: > +static uint32_t dsm_cmd_config_size(struct dsm_buffer *in, struct dsm_out *out) > +{ > + GSList *list = get_nvdimm_built_list(); > + PCNVDIMMDevice *nvdimm = get_nvdimm_device_by_handle(list, in->handle); > + uint32_t status = NFIT_STATUS_NON_EXISTING_MEM_DEV; > + > + if (!nvdimm) { > + goto exit; > + } > + > + status = NFIT_STATUS_SUCCESS; > + out->cmd_config_size.config_size = nvdimm->config_data_size; > + out->cmd_config_size.max_xfer = max_xfer_config_size(); cpu_to_*() missing? It should be possible to emulate NVDIMMs for a x86_64 guest on a big-endian host, for example. --3siQDZowHQqNOShm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVlQMhAAoJEJykq7OBq3PIFYEH/2k5c5AZixauCQycewDUiD0U FupxXIFPYAEinqpo5SDKym9whi3mFv7bSjOcn3zGuk7L1gwKa+c4iLVGb662WLrh zxtmMwyhmRU7k287rnH63/70Cl9YCernLMcJtrUqS4+EJfyCYgfNYcddgUZy5ZKi 6owiZ0HeSo+/hIHecy/BmOBjl54ZrJgibJfgM0JjU+Vt7fdfWb72l+NAMtPJf+rw Pax8GQMPV69+Y8rT6RXkTDg9UrTtfVoS0aZZ2JwTLcnpmy3q8g6MV44dj4aGLMSR 7HW2ceLZQgSpgBonDSA+DAih02TN5uJC2UFvfxmIhbzMMlEEFvBBFSb3YAjepR4= =REPV -----END PGP SIGNATURE----- --3siQDZowHQqNOShm--