qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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, armbru@redhat.com, acatan@amazon.com,
	lersek@redhat.com
Subject: Re: [PATCH 0/1] vmx: Fix <genid/> mapping
Date: Mon, 4 Oct 2021 10:59:12 +0100	[thread overview]
Message-ID: <20211004095912.GP7596@redhat.com> (raw)
In-Reply-To: <20210930091620.GX3361@redhat.com>

It turns out that changing the qemu implementation is painful,
particularly if we wish to maintain backwards compatibility of the
command line and live migration.

Instead I opted to document comprehensively what all the
different hypervisors do:

  https://github.com/libguestfs/virt-v2v/blob/master/docs/vm-generation-id-across-hypervisors.txt

On Thu, Sep 30, 2021 at 10:16:20AM +0100, Richard W.M. Jones wrote:
> I was going to suggest something like:
> 
>   <genid type="guid">aa-bb-cc..</genid>
> or
>   <genid type="binary">aabbcc..</genid>

After thinking about this some more, the real implementation on
Windows guest and host is two 64 bit little-endian integers[1].  How
about implementing this exactly the same way as Hyper-V (and VMware):

  <genid type="pair">
    <low>0x8877665544332211</low>
    <high>0x00ffeeddccbbaa99</high>
  </genid>

This would have to be mapped to the following qemu command line:

  qemu -device vmgenid,guid=44332211-6655-8877-99aa-bbccddeeff00

which would unmangle to the following in guest physical memory:

  11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 00

The equivalent back-compat option would be:

  <genid type="qemu">44332211-6655-8877-99aa-bbccddeeff00</genid>

Rich.

[1] No one has ever thought what to do about big-endian guests.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/



  reply	other threads:[~2021-10-04 10:20 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
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 [this message]
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=20211004095912.GP7596@redhat.com \
    --to=rjones@redhat.com \
    --cc=acatan@amazon.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=lersek@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 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).