Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2348020pxa; Mon, 3 Aug 2020 14:00:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwARPWSCen8KaIIrwa+APZ0NGD++069fBL1v83L0OC5rx1k9sWkhVrji8Pf0HXJ2F3hDOYP X-Received: by 2002:a17:906:fc10:: with SMTP id ov16mr19111964ejb.171.1596488456658; Mon, 03 Aug 2020 14:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596488456; cv=none; d=google.com; s=arc-20160816; b=OKP2SleSJ2LihOf8uq4PHs7N/bW4WCjOaR+bkCf9+iswKf7GV1gi67G2NbW8OT/Gqt ixnIsP5+vj7eBZODshpkS9MnrjWfIprk6PnmyLqk2qgas9O4VnNofo8kYOUJkCLRhhdn /eDFWZQxAwdToilwlu7rdfuiJvNjWfmcqNTPfRLXMHk+0LFfyYIyWHclRxYyrPrbrtvI C36Ah2BlR8L28RUyv5Vj45uEw9p7Y7JIRMeG2jLlA2r728ZfzsOt9PHhV/g2gRP3njEE hii+VqBf3Y9Q9HebeoP9XnIhkxDUE2tj9qBaHAePnFV9nfwqu/zpBHtcxkRemRFVJ1Sk L7zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Rgbr3S7Op26qakIXtpfCwbs62McqD9fRJN/CcHSJJtk=; b=oCW9zURs85FmlFZFZJnoej3KjxUg85y9fWBXMFLIHqeMueED2S+swcrQtu9SvG0v42 tMADIeHARsgwd5EtFbBtTOXf0tDrr0TmjSnB/dybZZ7sa0x/tQQXwULUmOqLJgbMIvvF nx/+zygEzDYarkHAr0KoWLhcDbgfaZZy5p8NXSlWyXOttB4Is+2BLSOQQC8k9XtRRiSy GfDuFXY5d1PEUYtOkmaaDRVBwEh4nRN4q7+Ij7VgbRvgAkahLf3toJt/C3A2h/gUWFL0 kzoxpTxI0RbUBuwhPEmY2zNdbNwPf8FO1wMG0fbMF+l8g8OsOUZSrfzpk1G5II1J0lQi 4lCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SGjhGlnM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb13si11470216edb.336.2020.08.03.14.00.34; Mon, 03 Aug 2020 14:00:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SGjhGlnM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729125AbgHCU7k (ORCPT + 99 others); Mon, 3 Aug 2020 16:59:40 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:30800 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729079AbgHCU7k (ORCPT ); Mon, 3 Aug 2020 16:59:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596488379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Rgbr3S7Op26qakIXtpfCwbs62McqD9fRJN/CcHSJJtk=; b=SGjhGlnMTrVPh3t08aRafnGuO1qx7F3luuYOuqwL5+OPIhcp49W/Q2040nLPKkE83d+R+a 2hRkCG26ab5q7Ifk/Wmm2nJprO4iYKX4CsUzySdEut4GQk04mVUXNPvKCnSBu+ZaAPjCSB qPMIcGSuvjljZv4r2GurwEZ5x+Nu650= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-dwJcWuqlOqyBpZB_fAgMvg-1; Mon, 03 Aug 2020 16:59:37 -0400 X-MC-Unique: dwJcWuqlOqyBpZB_fAgMvg-1 Received: by mail-qt1-f199.google.com with SMTP id r9so27755113qtp.7 for ; Mon, 03 Aug 2020 13:59:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Rgbr3S7Op26qakIXtpfCwbs62McqD9fRJN/CcHSJJtk=; b=J0U+kYJBI230S+PhTtNv6SrQEj7ck0kpNIWJAwUfTb57aReZEAFoQvNHzww4Ek8XZj IkY+3Aqk4bT+rV+Z8Fi0T3aGppnvH6RWcK1pds4+qtsyE3+xUwgElCiW5goTejnrI+Hx ozKmoqHCnxdDebjfa573VVczt0KZKjljFLekc1dTvXpw5BC8mxQisvQ1ITqSGH62bfGK MdawgqyOJierXh0FWUqBTxsLMYbzd/teuMQfWpsENTwJY3GVMBv37bPnctDHkIdJ9ERJ jNnw62CRj6Y6gKqKREHqobtFywaXnA1znf4+1+TQ62V18ASplmYTM3BFkwQ/bBt+mmYg XdNQ== X-Gm-Message-State: AOAM533K46K8idFkvLnysj8s/5LpGiA3m5qJwrY9FQeKlKbtHTo5OV9j GocNqNz+xfYQ+DS1zFafOp+v3bwHpstNo/RYwN8k2o0+AkAnQbkBUJGaZVyoFneHxoFRL+DHQHy VTbvwsA2bqPqTKQzryaiBnnB9 X-Received: by 2002:a37:e04:: with SMTP id 4mr17763984qko.269.1596488376482; Mon, 03 Aug 2020 13:59:36 -0700 (PDT) X-Received: by 2002:a37:e04:: with SMTP id 4mr17763967qko.269.1596488376274; Mon, 03 Aug 2020 13:59:36 -0700 (PDT) Received: from redhat.com (bzq-79-177-102-128.red.bezeqint.net. [79.177.102.128]) by smtp.gmail.com with ESMTPSA id x13sm21991885qts.23.2020.08.03.13.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 13:59:35 -0700 (PDT) Date: Mon, 3 Aug 2020 16:59:32 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, Jason Wang , David Hildenbrand Subject: [PATCH v2 13/24] virtio_mem: correct tags for config space fields Message-ID: <20200803205814.540410-14-mst@redhat.com> References: <20200803205814.540410-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803205814.540410-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since this is a modern-only device, tag config space fields as having little endian-ness. TODO: check other uses of __virtioXX types in this header, should probably be __leXX. Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_mem.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/virtio_mem.h b/include/uapi/linux/virtio_mem.h index a9ffe041843c..70e01c687d5e 100644 --- a/include/uapi/linux/virtio_mem.h +++ b/include/uapi/linux/virtio_mem.h @@ -185,27 +185,27 @@ struct virtio_mem_resp { struct virtio_mem_config { /* Block size and alignment. Cannot change. */ - __u64 block_size; + __le64 block_size; /* Valid with VIRTIO_MEM_F_ACPI_PXM. Cannot change. */ - __u16 node_id; + __le16 node_id; __u8 padding[6]; /* Start address of the memory region. Cannot change. */ - __u64 addr; + __le64 addr; /* Region size (maximum). Cannot change. */ - __u64 region_size; + __le64 region_size; /* * Currently usable region size. Can grow up to region_size. Can * shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL (in which case no config * update will be sent). */ - __u64 usable_region_size; + __le64 usable_region_size; /* * Currently used size. Changes due to plug/unplug requests, but no * config updates will be sent. */ - __u64 plugged_size; + __le64 plugged_size; /* Requested size. New plug requests cannot exceed it. Can change. */ - __u64 requested_size; + __le64 requested_size; }; #endif /* _LINUX_VIRTIO_MEM_H */ -- MST