From: Li Qiang <liq3ea@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>, "Li Qiang" <liq3ea@163.com>,
lvivier@redhat.com, "Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Qemu Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case
Date: Thu, 25 Apr 2019 16:29:39 +0800 [thread overview]
Message-ID: <CAKXe6SKvkJxauOPmBMS+CDPq9NS0qKpydkyOAuS7mHVrA8JVbQ@mail.gmail.com> (raw)
In-Reply-To: <20190425081519.n4leez6sz2wlvpla@sirius.home.kraxel.org>
Gerd Hoffmann <kraxel@redhat.com> 于2019年4月25日周四 下午4:15写道:
> On Wed, Apr 24, 2019 at 09:16:56AM +0800, Li Qiang wrote:
> > Thomas Huth <thuth@redhat.com> 于2019年4月24日周三 上午12:29写道:
> >
> > > Is this endianess-safe? Or do you need to byteswap reboot_timeout if
> the
> > > host and guest endianess does not match?
> >
> > Good question!
> >
> > IIUC, the qemu fw_cfg store the 'file' entry data just in byte stream.
>
> No. Integers are defined to be little endian. See fw_cfg_add_i64() for
> example, there is an explicit cpu_to_le64() call for that.
>
Yes, for the fw_cfg 'integer' entry it is stored as little endian.
But for the fw_cfg 'file' entry interpred as an integer, there is no
specify the endianess.
Thanks,
Li Qiang
> cheers,
> Gerd
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Li Qiang <liq3ea@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: lvivier@redhat.com, "Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Li Qiang" <liq3ea@163.com>,
"Qemu Developers" <qemu-devel@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case
Date: Thu, 25 Apr 2019 16:29:39 +0800 [thread overview]
Message-ID: <CAKXe6SKvkJxauOPmBMS+CDPq9NS0qKpydkyOAuS7mHVrA8JVbQ@mail.gmail.com> (raw)
Message-ID: <20190425082939.WGrqTeDsO8Z98Ah3JUFyq2p0RRZVoOW7LBnJyAFPcoQ@z> (raw)
In-Reply-To: <20190425081519.n4leez6sz2wlvpla@sirius.home.kraxel.org>
Gerd Hoffmann <kraxel@redhat.com> 于2019年4月25日周四 下午4:15写道:
> On Wed, Apr 24, 2019 at 09:16:56AM +0800, Li Qiang wrote:
> > Thomas Huth <thuth@redhat.com> 于2019年4月24日周三 上午12:29写道:
> >
> > > Is this endianess-safe? Or do you need to byteswap reboot_timeout if
> the
> > > host and guest endianess does not match?
> >
> > Good question!
> >
> > IIUC, the qemu fw_cfg store the 'file' entry data just in byte stream.
>
> No. Integers are defined to be little endian. See fw_cfg_add_i64() for
> example, there is an explicit cpu_to_le64() call for that.
>
Yes, for the fw_cfg 'integer' entry it is stored as little endian.
But for the fw_cfg 'file' entry interpred as an integer, there is no
specify the endianess.
Thanks,
Li Qiang
> cheers,
> Gerd
>
>
next prev parent reply other threads:[~2019-04-25 8:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 10:00 [Qemu-devel] [PATCH 0/4] fw_cfg_test refactor and add two test cases Li Qiang
2019-04-20 10:00 ` Li Qiang
2019-04-20 10:00 ` [Qemu-devel] [PATCH 1/4] tests: refactor fw_cfg_test Li Qiang
2019-04-20 10:00 ` Li Qiang
2019-04-23 16:25 ` Thomas Huth
2019-04-23 16:25 ` Thomas Huth
2019-04-20 10:00 ` [Qemu-devel] [PATCH 2/4] tests: fw_cfg: add a function to get the fw_cfg file Li Qiang
2019-04-20 10:00 ` Li Qiang
2019-04-23 16:26 ` Thomas Huth
2019-04-23 16:26 ` Thomas Huth
2019-04-20 10:00 ` [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case Li Qiang
2019-04-20 10:00 ` Li Qiang
2019-04-23 16:29 ` Thomas Huth
2019-04-23 16:29 ` Thomas Huth
2019-04-24 1:16 ` Li Qiang
2019-04-24 1:16 ` Li Qiang
2019-04-24 7:30 ` Thomas Huth
2019-04-24 7:30 ` Thomas Huth
2019-04-24 7:41 ` Li Qiang
2019-04-24 7:41 ` Li Qiang
2019-04-24 14:08 ` Li Qiang
2019-04-24 14:08 ` Li Qiang
2019-04-25 8:15 ` Gerd Hoffmann
2019-04-25 8:15 ` Gerd Hoffmann
2019-04-25 8:29 ` Li Qiang [this message]
2019-04-25 8:29 ` Li Qiang
2019-04-25 10:23 ` Philippe Mathieu-Daudé
2019-04-25 10:23 ` Philippe Mathieu-Daudé
2019-04-26 16:57 ` Laszlo Ersek
2019-04-26 16:57 ` Laszlo Ersek
2019-04-26 16:53 ` Laszlo Ersek
2019-04-26 16:53 ` Laszlo Ersek
2019-04-20 10:00 ` [Qemu-devel] [PATCH 4/4] tests: fw_cfg: add splash time " Li Qiang
2019-04-20 10:00 ` Li Qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKXe6SKvkJxauOPmBMS+CDPq9NS0qKpydkyOAuS7mHVrA8JVbQ@mail.gmail.com \
--to=liq3ea@gmail.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=liq3ea@163.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).