On 13.11.23 22:59, Julien Grall wrote:
Hi Juergen,

On 10/11/2023 16:07, Juergen Gross wrote:
Obtain the own domid from the Xenstore special grant entry when running
as stubdom.

Signed-off-by: Juergen Gross <jgr...@suse.com>
---
V2:
- replacement of V1 patch (ANdrew Cooper)
---
  tools/xenstored/core.c   | 1 +
  tools/xenstored/core.h   | 1 +
  tools/xenstored/minios.c | 5 +++++
  3 files changed, 7 insertions(+)

diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index 0c14823fb0..8e271e31f9 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -2738,6 +2738,7 @@ static struct option options[] = {
  int dom0_domid = 0;
  int dom0_event = 0;
  int priv_domid = 0;
+int stub_domid = -1;

After looking at partch #25, I feel that it would make more sense if stub_domid is a domid_t and initialized to DOMID_INVALID.

At least this makes clearer that initial value is not supported to be a valid domid.

Yes, you are right.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to