From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbQep-000737-66 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 06:06:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbQel-00089m-3n for qemu-devel@nongnu.org; Mon, 14 Sep 2015 06:06:43 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:38300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbQek-00088l-Tw for qemu-devel@nongnu.org; Mon, 14 Sep 2015 06:06:39 -0400 Received: by wiclk2 with SMTP id lk2so125932495wic.1 for ; Mon, 14 Sep 2015 03:06:38 -0700 (PDT) Sender: Paolo Bonzini References: <1441905361-31967-21-git-send-email-stefano.stabellini@eu.citrix.com> From: Paolo Bonzini Message-ID: <55F69ADF.40404@redhat.com> Date: Mon, 14 Sep 2015 12:01:03 +0200 MIME-Version: 1.0 In-Reply-To: <1441905361-31967-21-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , peter.maydell@linaro.org Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org On 10/09/2015 19:15, Stefano Stabellini wrote: > + > + switch (reg->size) { > + case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, (uint8_t *)&val); A bit ugly, and it relies on the host being little endian. > + break; > + case 2: rc = xen_host_pci_get_word(&s->real_device, offset, (uint16_t *)&val); Same here. > + break; > + case 4: rc = xen_host_pci_get_long(&s->real_device, offset, &val); > + break; > + default: assert(1); This should be assert(0) or, better, abort(). Paolo