Skip to content

S9: OXT-1622: surfman: xc_domain_getinfo usage.#33

Merged
jean-edouard merged 1 commit intoOpenXT:stable-9from
eric-ch:s9-oxt-1622
Jul 30, 2019
Merged

S9: OXT-1622: surfman: xc_domain_getinfo usage.#33
jean-edouard merged 1 commit intoOpenXT:stable-9from
eric-ch:s9-oxt-1622

Conversation

@eric-ch
Copy link
Contributor

@eric-ch eric-ch commented Jul 25, 2019

xc_domain_getinfo(h, domid, n, info): will return the number of xc_dominfo_t written in info and fill info starting with the first domain with domain_id >= domid.

In practice, this means, xc_domain_getinfo(h, domid, 1, info), may fill the info struct for a domain which domain_id != domid. This is a problem for xc_domid_exists() which makes that assumption.

Since libsurfman provides xc_domid_getinfo() handle the case in it and use the exported function across surfman.

xc_domid_getinfo() will return -ENOENT if the domain associated with the domid in argument does not exist.

This was merged in master with #25.

xc_domain_getinfo(h, domid, n, info):
will return the number of xc_dominfo_t written in info and fill
info starting with the first domain with domain_id >= domid.

In practice, this means, xc_domain_getinfo(h, domid, 1, info), may fill
the info struct for a domain which domain_id != domid. This is a problem
for xc_domid_exists() which makes that assumption.

Since libsurfman provides xc_domid_getinfo() handle the case in it and
use the exported function across surfman.

The main in this is xc_domid_getinfo() will return -ENOENT if the domain
associated with the domid in argument does not exist.

Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>
(cherry picked from commit 64793ff)
Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>
@jean-edouard
Copy link
Member

@jean-edouard
Copy link
Member

Merging soon.

@jean-edouard jean-edouard merged commit f972c2d into OpenXT:stable-9 Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants