Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-20 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 17 January 2020 15:31 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Wei Liu ; Anthony Perard > ; Andrew Cooper ; > George Dunlap ; Jan Beulich ; > Julien Grall ; Konrad Rzeszutek Wilk > ; Stefano Stabellini ; >

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-17 Thread Ian Jackson
Durrant, Paul writes ("RE: [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid"): > Ok, to cover all bases then it seems like checking the domid after creation > and then destroying if it is too recent is the better option. I think so, yes. I think the recent

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-17 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 17 January 2020 12:36 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Wei Liu ; Anthony Perard > ; Andrew Cooper ; > George Dunlap ; Jan Beulich ; > Julien Grall ; Konrad Rzeszutek Wilk > ; Stefano Stabellini ; >

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-17 Thread Ian Jackson
Durrant, Paul writes ("RE: [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid"): > [Ian:] > > I think there are only two possible solutions: > > > > - Check the domain's entry in the recent list *after* creating > > the domain in Xen. This involves accepting

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-17 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 16 January 2020 19:36 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Wei Liu ; Anthony Perard > ; Andrew Cooper ; > George Dunlap ; Jan Beulich ; > Julien Grall ; Konrad Rzeszutek Wilk > ; Stefano Stabellini ; >

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Ian Jackson
Hi. This broadly contains what I expected, but: Paul Durrant writes ("[PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid"): > +for (;;) { > +if (info->domid == RANDOM_DOMID) { > +uint16_t v; > + > +/* Randomize

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Jason Andryuk
On Thu, Jan 16, 2020 at 4:36 AM Paul Durrant wrote: > > This patch adds a 'domid' field to libxl_domain_create_info and then > modifies do_domain_create() to use that value if it is valid. Any valid > domid will be checked against the retired domid list before being passed > to

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Jan Beulich
On 16.01.2020 10:46, Durrant, Paul wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 16 January 2020 10:40 >> To: Durrant, Paul >> Cc: xen-devel@lists.xenproject.org; Ian Jackson >> ; Wei Liu ; Anthony PERARD >> ; Andrew Cooper ; >> George Dunlap ; Julien Grall >> ; Konrad

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 16 January 2020 10:40 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Ian Jackson > ; Wei Liu ; Anthony PERARD > ; Andrew Cooper ; > George Dunlap ; Julien Grall > ; Konrad Rzeszutek Wilk ; Stefano > Stabellini ;

Re: [Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Jan Beulich
On 16.01.2020 10:36, Paul Durrant wrote: > --- a/xen/include/public/xen.h > +++ b/xen/include/public/xen.h > @@ -614,6 +614,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t); > /* Idle domain. */ > #define DOMID_IDLE xen_mk_uint(0x7FFF) > > +/* Mask for valid domain id values */ > +#define

[Xen-devel] [PATCH v3 4/6] libxl: allow creation of domains with a specified or random domid

2020-01-16 Thread Paul Durrant
This patch adds a 'domid' field to libxl_domain_create_info and then modifies do_domain_create() to use that value if it is valid. Any valid domid will be checked against the retired domid list before being passed to libxl__domain_make(). If the domid value is invalid then Xen will choose the