From: "Richard W.M. Jones" <rjones@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: libvir-list@redhat.com, Michal Privoznik <mprivozn@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 0/1] vmx: Fix <genid/> mapping
Date: Wed, 29 Sep 2021 11:34:01 +0100 [thread overview]
Message-ID: <20210929103400.GJ3361@redhat.com> (raw)
In-Reply-To: <YVQ7my3BHi1On/JK@redhat.com>
On Wed, Sep 29, 2021 at 11:10:35AM +0100, Daniel P. Berrangé wrote:
> On Wed, Sep 29, 2021 at 10:57:19AM +0100, Richard W.M. Jones wrote:
> > Looking at the qemu code the problem IMHO is:
> >
> > https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/docs/specs/vmgenid.txt#L189
> > https://gitlab.com/qemu-project/qemu/-/blob/6b54a31bf7b403672a798b6443b1930ae6c74dea/hw/acpi/vmgenid.c#L37
> >
> > This byte swapping makes no sense to me. How do we know that the
> > guest is little endian? What will this code do for BE guests? I
> > think qemu would be better off treating the "GUID" as a list of bytes
> > and writing that exactly into the guest memory.
>
> This is an artifact of the HyperV only caring about x86 and thus leaving
> endianness unspecified in the spec for GenID. QEMU docs say
>
>
> Endian-ness Considerations:
> ---------------------------
>
> Although not specified in Microsoft's document, it is assumed that the
> device is expected to use little-endian format.
>
> All GUID passed in via command line or monitor are treated as big-endian.
> GUID values displayed via monitor are shown in big-endian format.
>
>
> So by extension if libvirt is passing the value from its XML straight
> to QEMU, then libvirt has effectively defined that the XML is storing
> it big-endian too.
>
> This could be where the confusion with VMX config is coming into play,
> though the byte re-ordering in v2v seems more complex than just an
> endianess-fiddle ?
qemu's qemu_uuid_bswap function only swaps some of the fields.
I think even more that applying qemu_uuid_bswap to these (not really)
"UUIDs" is a nonsense.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
next prev parent reply other threads:[~2021-09-29 10:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1632900578.git.mprivozn@redhat.com>
2021-09-29 9:20 ` [PATCH 0/1] vmx: Fix <genid/> mapping Richard W.M. Jones
2021-09-29 9:33 ` Daniel P. Berrangé
2021-09-29 9:46 ` Richard W.M. Jones
2021-09-29 10:07 ` Daniel P. Berrangé
2021-09-29 10:24 ` Richard W.M. Jones
2021-09-29 10:24 ` Richard W.M. Jones
2021-09-29 9:57 ` Richard W.M. Jones
2021-09-29 10:10 ` Daniel P. Berrangé
2021-09-29 10:34 ` Richard W.M. Jones [this message]
2021-09-30 7:33 ` Richard W.M. Jones
2021-09-30 8:35 ` Laszlo Ersek
2021-09-30 8:47 ` Daniel P. Berrangé
2021-09-30 9:16 ` Richard W.M. Jones
2021-10-04 9:59 ` Richard W.M. Jones
2021-10-04 14:50 ` Laszlo Ersek
2021-10-04 14:59 ` Richard W.M. Jones
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=20210929103400.GJ3361@redhat.com \
--to=rjones@redhat.com \
--cc=berrange@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.