Mailing List Archive

[PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address
# HG changeset patch
# User Paul Durrant <paul.durrant@citrix.com>
# Date 1323854952 0
# Node ID fded65be5d82461e87de54960db14ce8feb4625f
# Parent 03138a08366b895d79e143119d4c9c72833cdbcd
Re-name xenstore key used to save VM generation ID buffer address.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

diff -r 03138a08366b -r fded65be5d82 tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09 16:19:36 2011 +0000
+++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14 09:29:12 2011 +0000
@@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
if ( snprintf(addr, sizeof(addr), "0x%lx", virt_to_phys(buf))
>= sizeof(addr) )
return 0;
- xenstore_write("data/generation-id", addr);
+ xenstore_write("data/generation-id-address", addr);

gid = strtoll(xenstore_read("platform/generation-id", "0"), NULL, 0);
*(uint64_t *)buf = gid;

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address [ In reply to ]
On Wed, 2011-12-14 at 09:31 +0000, Paul Durrant wrote:
> # HG changeset patch
> # User Paul Durrant <paul.durrant@citrix.com>
> # Date 1323854952 0
> # Node ID fded65be5d82461e87de54960db14ce8feb4625f
> # Parent 03138a08366b895d79e143119d4c9c72833cdbcd
> Re-name xenstore key used to save VM generation ID buffer address.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
>
> diff -r 03138a08366b -r fded65be5d82 tools/firmware/hvmloader/acpi/build.c
> --- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09 16:19:36 2011 +0000
> +++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14 09:29:12 2011 +0000
> @@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
> if ( snprintf(addr, sizeof(addr), "0x%lx", virt_to_phys(buf))
> >= sizeof(addr) )
> return 0;
> - xenstore_write("data/generation-id", addr);
> + xenstore_write("data/generation-id-address", addr);

data/ seems like an odd home for this, isn't that the area where guests
can expect to store their own bits and bobs, agent stuff etc?

Although this key is going to be guest writeable (so hvmloader can write
it) it really ought to be off somewhere out of the way. We select the
bios with /local/domain/<domid>/hvmloader/bios so perhaps something
under there or /local/domain/<domid>/platform?

(/me adds "do archaeology and document valid/best-practice xenstore
paths to TODO list)

Ian.

>
> gid = strtoll(xenstore_read("platform/generation-id", "0"), NULL, 0);
> *(uint64_t *)buf = gid;
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address [ In reply to ]
> -----Original Message-----
> From: Ian Campbell
> Sent: 14 December 2011 10:12
> To: Paul Durrant
> Cc: xen-devel@lists.xensource.com
> Subject: Re: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key used to
> save VM generation ID buffer address
>
> On Wed, 2011-12-14 at 09:31 +0000, Paul Durrant wrote:
> #
> > Node ID fded65be5d82461e87de54960db14ce8feb4625f
> > # Parent 03138a08366b895d79e143119d4c9c72833cdbcd
> > Re-name xenstore key used to save VM generation ID buffer address.
> >
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> >
> > diff -r 03138a08366b -r fded65be5d82
> tools/firmware/hvmloader/acpi/build.c
> > --- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09 16:19:36
> 2011 +0000
> > +++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14 09:29:12
> 2011 +0000
> > @@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
> > if ( snprintf(addr, sizeof(addr), "0x%lx", virt_to_phys(buf))
> > >= sizeof(addr) )
> > return 0;
> > - xenstore_write("data/generation-id", addr);
> > + xenstore_write("data/generation-id-address", addr);
>
> data/ seems like an odd home for this, isn't that the area where
> guests can expect to store their own bits and bobs, agent stuff etc?
>

No what data is 'for' as such. It seemed like a reasonable place to put something created by the guest and for the tools' consumption. I could move it under hvmloader, but is that the right place? hvmloader/bios is *read* by hvmloader, not written by it.

Paul

> Although this key is going to be guest writeable (so hvmloader can
> write
> it) it really ought to be off somewhere out of the way. We select
> the bios with /local/domain/<domid>/hvmloader/bios so perhaps
> something under there or /local/domain/<domid>/platform?
>
> (/me adds "do archaeology and document valid/best-practice xenstore
> paths to TODO list)
>
> Ian.
>
> >
> > gid = strtoll(xenstore_read("platform/generation-id", "0"),
> NULL, 0);
> > *(uint64_t *)buf = gid;
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address [ In reply to ]
On Wed, 2011-12-14 at 11:17 +0000, Paul Durrant wrote:
>
> > -----Original Message-----
> > From: Ian Campbell
> > Sent: 14 December 2011 10:12
> > To: Paul Durrant
> > Cc: xen-devel@lists.xensource.com
> > Subject: Re: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key used to
> > save VM generation ID buffer address
> >
> > On Wed, 2011-12-14 at 09:31 +0000, Paul Durrant wrote:
> > #
> > > Node ID fded65be5d82461e87de54960db14ce8feb4625f
> > > # Parent 03138a08366b895d79e143119d4c9c72833cdbcd
> > > Re-name xenstore key used to save VM generation ID buffer address.
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > >
> > > diff -r 03138a08366b -r fded65be5d82
> > tools/firmware/hvmloader/acpi/build.c
> > > --- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09 16:19:36
> > 2011 +0000
> > > +++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14 09:29:12
> > 2011 +0000
> > > @@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
> > > if ( snprintf(addr, sizeof(addr), "0x%lx", virt_to_phys(buf))
> > > >= sizeof(addr) )
> > > return 0;
> > > - xenstore_write("data/generation-id", addr);
> > > + xenstore_write("data/generation-id-address", addr);
> >
> > data/ seems like an odd home for this, isn't that the area where
> > guests can expect to store their own bits and bobs, agent stuff etc?
> >
>
> No what data is 'for' as such. It seemed like a reasonable place to
> put something created by the guest and for the tools' consumption.

Although it runs in guest context hvmloader should really be considered
an extension of the tools and not part of the guest.

> I could move it under hvmloader, but is that the right place?
> hvmloader/bios is *read* by hvmloader, not written by it.

I think it's a good as anywhere else.

Ian.

>
> Paul
>
> > Although this key is going to be guest writeable (so hvmloader can
> > write
> > it) it really ought to be off somewhere out of the way. We select
> > the bios with /local/domain/<domid>/hvmloader/bios so perhaps
> > something under there or /local/domain/<domid>/platform?
> >
> > (/me adds "do archaeology and document valid/best-practice xenstore
> > paths to TODO list)
> >
> > Ian.
> >
> > >
> > > gid = strtoll(xenstore_read("platform/generation-id", "0"),
> > NULL, 0);
> > > *(uint64_t *)buf = gid;
> > >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.xensource.com
> > > http://lists.xensource.com/xen-devel
> >
>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address [ In reply to ]
> -----Original Message-----
> From: Ian Campbell
> Sent: 14 December 2011 11:39
> To: Paul Durrant
> Cc: xen-devel@lists.xensource.com
> Subject: RE: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key used to
> save VM generation ID buffer address
>
> On Wed, 2011-12-14 at 11:17 +0000, Paul Durrant wrote:
> >
> > > -----Original Message-----
> > > From: Ian Campbell
> > > Sent: 14 December 2011 10:12
> > > To: Paul Durrant
> > > Cc: xen-devel@lists.xensource.com
> > > Subject: Re: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key
> used to
> > > save VM generation ID buffer address
> > >
> > > On Wed, 2011-12-14 at 09:31 +0000, Paul Durrant wrote:
> > > > # HG changeset patch
> > > > # User Paul Durrant <paul.durrant@citrix.com> # Date
> 1323854952 0
> > > #
> > > > Node ID fded65be5d82461e87de54960db14ce8feb4625f
> > > > # Parent 03138a08366b895d79e143119d4c9c72833cdbcd
> > > > Re-name xenstore key used to save VM generation ID buffer
> address.
> > > >
> > > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > >
> > > > diff -r 03138a08366b -r fded65be5d82
> > > tools/firmware/hvmloader/acpi/build.c
> > > > --- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09
> 16:19:36
> > > 2011 +0000
> > > > +++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14
> 09:29:12
> > > 2011 +0000
> > > > @@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
> > > > if ( snprintf(addr, sizeof(addr), "0x%lx",
> virt_to_phys(buf))
> > > > >= sizeof(addr) )
> > > > return 0;
> > > > - xenstore_write("data/generation-id", addr);
> > > > + xenstore_write("data/generation-id-address", addr);
> > >
> > > data/ seems like an odd home for this, isn't that the area where
> > > guests can expect to store their own bits and bobs, agent stuff
> etc?
> > >
> >
> > No what data is 'for' as such. It seemed like a reasonable place
> to
> > put something created by the guest and for the tools' consumption.
>
> Although it runs in guest context hvmloader should really be
> considered an extension of the tools and not part of the guest.
>
> > I could move it under hvmloader, but is that the right place?
> > hvmloader/bios is *read* by hvmloader, not written by it.
>
> I think it's a good as anywhere else.
>

Ok, does that mean that we should create hmvloader as writable by the guest, or should we special-case the generation-id-address key?

Paul
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 1 of 2] Re-name xenstore key used to save VM generation ID buffer address [ In reply to ]
On Wed, 2011-12-14 at 11:49 +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: Ian Campbell
> > Sent: 14 December 2011 11:39
> > To: Paul Durrant
> > Cc: xen-devel@lists.xensource.com
> > Subject: RE: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key used to
> > save VM generation ID buffer address
> >
> > On Wed, 2011-12-14 at 11:17 +0000, Paul Durrant wrote:
> > >
> > > > -----Original Message-----
> > > > From: Ian Campbell
> > > > Sent: 14 December 2011 10:12
> > > > To: Paul Durrant
> > > > Cc: xen-devel@lists.xensource.com
> > > > Subject: Re: [Xen-devel] [PATCH 1 of 2] Re-name xenstore key
> > used to
> > > > save VM generation ID buffer address
> > > >
> > > > On Wed, 2011-12-14 at 09:31 +0000, Paul Durrant wrote:
> > > > > # HG changeset patch
> > > > > # User Paul Durrant <paul.durrant@citrix.com> # Date
> > 1323854952 0
> > > > #
> > > > > Node ID fded65be5d82461e87de54960db14ce8feb4625f
> > > > > # Parent 03138a08366b895d79e143119d4c9c72833cdbcd
> > > > > Re-name xenstore key used to save VM generation ID buffer
> > address.
> > > > >
> > > > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > > >
> > > > > diff -r 03138a08366b -r fded65be5d82
> > > > tools/firmware/hvmloader/acpi/build.c
> > > > > --- a/tools/firmware/hvmloader/acpi/build.c Fri Dec 09
> > 16:19:36
> > > > 2011 +0000
> > > > > +++ b/tools/firmware/hvmloader/acpi/build.c Wed Dec 14
> > 09:29:12
> > > > 2011 +0000
> > > > > @@ -309,7 +309,7 @@ unsigned long new_vm_gid(void)
> > > > > if ( snprintf(addr, sizeof(addr), "0x%lx",
> > virt_to_phys(buf))
> > > > > >= sizeof(addr) )
> > > > > return 0;
> > > > > - xenstore_write("data/generation-id", addr);
> > > > > + xenstore_write("data/generation-id-address", addr);
> > > >
> > > > data/ seems like an odd home for this, isn't that the area where
> > > > guests can expect to store their own bits and bobs, agent stuff
> > etc?
> > > >
> > >
> > > No what data is 'for' as such. It seemed like a reasonable place
> > to
> > > put something created by the guest and for the tools' consumption.
> >
> > Although it runs in guest context hvmloader should really be
> > considered an extension of the tools and not part of the guest.
> >
> > > I could move it under hvmloader, but is that the right place?
> > > hvmloader/bios is *read* by hvmloader, not written by it.
> >
> > I think it's a good as anywhere else.
> >
>
> Ok, does that mean that we should create hmvloader as writable by the
> guest, or should we special-case the generation-id-address key?

Just the specific key.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel