In order to close a race window for Xenstore live update when using
the new unique_id of domains, the migration stream needs to contain
this unique_id for each domain known by Xenstore.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V8:
- new patch
---
docs/designs/xenstore-migration.md | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/docs/designs/xenstore-migration.md b/docs/designs/xenstore-migration.md
index 082314bf72..fba691ee0d 100644
--- a/docs/designs/xenstore-migration.md
+++ b/docs/designs/xenstore-migration.md
@@ -156,7 +156,7 @@ the domain being migrated.
```
0 1 2 3 4 5 6 7 octet
+-------+-------+-------+-------+-------+-------+-------+-------+
-| conn-id | conn-type | |
+| conn-id | conn-type | uniq-id-off |
+-------------------------------+---------------+---------------+
| conn-spec
...
@@ -165,6 +165,9 @@ the domain being migrated.
+---------------+---------------+-------------------------------+
| data
...
++---------------------------------------------------------------+
+| unique-id |
++---------------------------------------------------------------+
```
@@ -178,6 +181,12 @@ the domain being migrated.
| | 0x0001: socket |
| | 0x0002 - 0xFFFF: reserved for future use |
| | |
+| `uniq-id-off` | The offset (in octets) of the `unique-id` |
+| | field from the start of the record body. |
+| | If 0, no `unique-id` field is present. |
+| | Only needed for `shared ring` connection in |
+| | live update streams. |
+| | |
| `conn-spec` | See below |
| | |
| `in-data-len` | The length (in octets) of any data read |
@@ -193,6 +202,9 @@ the domain being migrated.
| `data` | Pending data: first in-data-len octets of |
| | read data, then out-data-len octets of |
| | written data (any of both may be empty) |
+| | |
+| `unique-id` | Unique identifier of a domain |
+| | |
In case of live update the connection record for the connection via which
the live update command was issued will contain the response for the live
--
2.43.0
Hi Juergen, On 04/02/2025 11:34, Juergen Gross wrote: > In order to close a race window for Xenstore live update when using > the new unique_id of domains, the migration stream needs to contain > this unique_id for each domain known by Xenstore. > > Signed-off-by: Juergen Gross <jgross@suse.com> > --- > V8: > - new patch > --- > docs/designs/xenstore-migration.md | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/docs/designs/xenstore-migration.md b/docs/designs/xenstore-migration.md > index 082314bf72..fba691ee0d 100644 > --- a/docs/designs/xenstore-migration.md > +++ b/docs/designs/xenstore-migration.md > @@ -156,7 +156,7 @@ the domain being migrated. > ``` > 0 1 2 3 4 5 6 7 octet > +-------+-------+-------+-------+-------+-------+-------+-------+ > -| conn-id | conn-type | | > +| conn-id | conn-type | uniq-id-off | > +-------------------------------+---------------+---------------+ > | conn-spec> ... > @@ -165,6 +165,9 @@ the domain being migrated. > +---------------+---------------+-------------------------------+ > | data > ... > ++---------------------------------------------------------------+ > +| unique-id | > ++---------------------------------------------------------------+ > ``` > > > @@ -178,6 +181,12 @@ the domain being migrated. > | | 0x0001: socket | > | | 0x0002 - 0xFFFF: reserved for future use | > | | | > +| `uniq-id-off` | The offset (in octets) of the `unique-id` | > +| | field from the start of the record body. | > +| | If 0, no `unique-id` field is present. | > +| | Only needed for `shared ring` connection in | > +| | live update streams. | > +| | | Looking at the rest of the record, the unique ID would be past the in-data (length is 2-byte) and the out-data (length is 4-byte). So technically the offset would need 5-bytes. But here you are using 2-bytes. Can you explain why? Cheers, -- Julien Grall
On 11.03.25 10:43, Julien Grall wrote: > Hi Juergen, > > On 04/02/2025 11:34, Juergen Gross wrote: >> In order to close a race window for Xenstore live update when using >> the new unique_id of domains, the migration stream needs to contain >> this unique_id for each domain known by Xenstore. >> >> Signed-off-by: Juergen Gross <jgross@suse.com> >> --- >> V8: >> - new patch >> --- >> docs/designs/xenstore-migration.md | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/docs/designs/xenstore-migration.md b/docs/designs/xenstore- >> migration.md >> index 082314bf72..fba691ee0d 100644 >> --- a/docs/designs/xenstore-migration.md >> +++ b/docs/designs/xenstore-migration.md >> @@ -156,7 +156,7 @@ the domain being migrated. >> ``` >> 0 1 2 3 4 5 6 7 octet >> +-------+-------+-------+-------+-------+-------+-------+-------+ >> -| conn-id | conn-type | | >> +| conn-id | conn-type | uniq-id-off | >> +-------------------------------+---------------+---------------+ > > | conn-spec> ... >> @@ -165,6 +165,9 @@ the domain being migrated. >> +---------------+---------------+-------------------------------+ >> | data >> ... >> ++---------------------------------------------------------------+ >> +| unique-id | >> ++---------------------------------------------------------------+ >> ``` >> @@ -178,6 +181,12 @@ the domain being migrated. >> | | 0x0001: socket | >> | | 0x0002 - 0xFFFF: reserved for future use | >> | | | >> +| `uniq-id-off` | The offset (in octets) of the `unique-id` | >> +| | field from the start of the record body. | >> +| | If 0, no `unique-id` field is present. | >> +| | Only needed for `shared ring` connection in | >> +| | live update streams. | >> +| | | > > Looking at the rest of the record, the unique ID would be past the in-data > (length is 2-byte) and the out-data (length is 4-byte). So technically the > offset would need 5-bytes. But here you are using 2-bytes. Can you explain why? Good catch. I think I need to change this to be a flag indicating that the unique-id is present and located at the next 8-byte boundary after "data". Juergen
Hi, On 11/03/2025 09:58, Jürgen Groß wrote: > On 11.03.25 10:43, Julien Grall wrote: >> Hi Juergen, >> >> On 04/02/2025 11:34, Juergen Gross wrote: >>> In order to close a race window for Xenstore live update when using >>> the new unique_id of domains, the migration stream needs to contain >>> this unique_id for each domain known by Xenstore. >>> >>> Signed-off-by: Juergen Gross <jgross@suse.com> >>> --- >>> V8: >>> - new patch >>> --- >>> docs/designs/xenstore-migration.md | 14 +++++++++++++- >>> 1 file changed, 13 insertions(+), 1 deletion(-) >>> >>> diff --git a/docs/designs/xenstore-migration.md b/docs/designs/ >>> xenstore- migration.md >>> index 082314bf72..fba691ee0d 100644 >>> --- a/docs/designs/xenstore-migration.md >>> +++ b/docs/designs/xenstore-migration.md >>> @@ -156,7 +156,7 @@ the domain being migrated. >>> ``` >>> 0 1 2 3 4 5 6 7 octet >>> +-------+-------+-------+-------+-------+-------+-------+-------+ >>> -| conn-id | conn-type | | >>> +| conn-id | conn-type | uniq-id-off | >>> +-------------------------------+---------------+---------------+ >> > | conn-spec> ... >>> @@ -165,6 +165,9 @@ the domain being migrated. >>> +---------------+---------------+-------------------------------+ >>> | data >>> ... >>> ++---------------------------------------------------------------+ >>> +| unique-id | >>> ++---------------------------------------------------------------+ >>> ``` >>> @@ -178,6 +181,12 @@ the domain being migrated. >>> | | 0x0001: socket | >>> | | 0x0002 - 0xFFFF: reserved for future use | >>> | | | >>> +| `uniq-id-off` | The offset (in octets) of the `unique-id` | >>> +| | field from the start of the record body. | >>> +| | If 0, no `unique-id` field is present. | >>> +| | Only needed for `shared ring` connection in | >>> +| | live update streams. | >>> +| | | >> >> Looking at the rest of the record, the unique ID would be past the in- >> data (length is 2-byte) and the out-data (length is 4-byte). So >> technically the offset would need 5-bytes. But here you are using 2- >> bytes. Can you explain why? > > Good catch. > > I think I need to change this to be a flag indicating that the unique-id > is present and located at the next 8-byte boundary after "data". This would work for me. Cheers, -- Julien Grall
© 2016 - 2026 Red Hat, Inc.