Skip to contentSkip to conversation

When to use "domain creation flag" or "HVM param"?

RFC Don Slutz 6 participants 10 messages Feb 23, 2015 – Feb 26, 2015

lore
Share & tools
lore

Don Slutz

author
#0 lore raw

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

This is from:

Quoted 6 lines · Jan Beulich
Quoted 1 line

I was not sure on the way to go based on the emails.

I think I said so before - we should come to some conclusion among maintainers here first. I'm afraid besides Andrew and me no-one really voiced any opinion; maybe worth for you to send out a separate request-for-comments on this specific aspect...

Below is some of the subsets of the email threads on this:

Message-ID: <[email protected]>
References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: [PATCH v8 4/7] xen: Add vmware_port support
Date: Tue, 10 Feb 2015 14:30:49 -0500
From: Don Slutz <[email protected]>
To: Don Slutz <[email protected]>, Jan Beulich <[email protected]>
CC: Suravee Suthikulpanit <[email protected]>, Andrew Cooper <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, Ian Jackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, Jun Nakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 13 lines · Don Slutz
Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 21.01.15 at 18:52, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 03.10.14 at 00:40, <[email protected]> wrote:

This is a new domain_create() flag, DOMCRF_vmware_port. It is passed to domctl as XEN_DOMCTL_CDF_vmware_port.

Can you explain why a HVM param isn't suitable here?

The issue is that you need this flag during construct_vmcb() and construct_vmcs(). While Intel has vmx_update_exception_bitmap() AMD does not. So when HVM param's are setup and/or changed there currently is no way to adjust AMD's exception bitmap.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

So this is the simpler way.

But the less desirable one from a design/consistency perspective. Unless other maintainers disagree, I'd like to see this changed.

Ok, but will wait some time to see if "Unless other maintainers disagree"

While coding this is up I have hit issues that I need input on:

As a HVM_PARAM_ item, I would assume I should be following what HVM_PARAM_VIRIDIAN does. It has this comment:

            case HVM_PARAM_VIRIDIAN:
                /* This should only ever be set once by the tools and

read by the guest. */

Which is almost true. However the code allows you to change from 0 to non-zero any time in the life of the DomU. I am assuming that this is why xc_domain_save() and xc_domain_restore() save and restore this HVM_PARAM_ item.

With the enable of vmware_port the same way, I feel it would be a bug to allow the enable after "create" to not also adjust QEMU. Currently there is no way for the hypervisor to tell QEMU to enable vmware_port handling. So to avoid adding this code to xen and QEMU, it looks to me that adding code to make this a true write only 1 time would be needed so that you cannot use the hyper call to change later.

So, should I extend this change to cover other HVM_PARAM_?

Is all this additional code (xc_domain_save(), xc_domain_restore(), write only 1 time) still better then a domain_create() flag?

-Don Slutz

Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>Subject: Re: [PATCH v8 4/7]
xen: Add vmware_port support
Date: Tue, 17 Feb 2015 07:45:06 +0000
From: Jan Beulich <[email protected]>
To: Andrew Cooper <[email protected]>, Don Slutz <[email protected]>
CC: Suravee Suthikulpanit <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, IanJackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, JunNakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 11.02.15 at 18:04, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 10.02.15 at 20:30, <[email protected]> wrote:

While coding this is up I have hit issues that I need input on:

As a HVM_PARAM_ item, I would assume I should be following what HVM_PARAM_VIRIDIAN does. It has this comment:

Quoted 8 lines
Quoted 8 lines
            case HVM_PARAM_VIRIDIAN:
                /* This should only ever be set once by the tools and

read by the guest. */

Which is almost true. However the code allows you to change from 0 to non-zero any time in the life of the DomU. I am assuming that this is why xc_domain_save() and xc_domain_restore() save and restore this HVM_PARAM_ item.>> I was not sure on the way to go based on the emails.

I think I said so before - we should come to some conclusion among maintainers here first. I'm afraid besides Andrew and me no-one really voiced any opinion; maybe worth for you to send out a separate request-for-comments on this specific aspect...

Quoted 10 lines
Quoted 10 lines

With the enable of vmware_port the same way, I feel it would be a bug to allow the enable after "create" to not also adjust QEMU. Currently there is no way for the hypervisor to tell QEMU to enable vmware_port handling. So to avoid adding this code to xen and QEMU, it looks to me that adding code to make this a true write only 1 time would be needed so that you cannot use the hyper call to change later.

So, should I extend this change to cover other HVM_PARAM_?

Quoted 8 lines
Quoted 2 lines

Is all this additional code (xc_domain_save(), xc_domain_restore(), write only 1 time) still better then a domain_create() flag?

I suppose for your case it's indeed the right approach. Which other params this may be true for as well I can't immediately say, but I'd certainly like to ask for adjustments to others to be in separate patches (and perhaps even a separate series), with proper rationale for each of them. I guess Andrew will have further input for you on this matter...

Quoted 4 lines

My recommendation is still to use a creation flag. The described problem is exactly the reason why I dislike the use of hvmparams for booleans like this which really do need to be consistent for the lifetime of the guest.

While I can see your point, HVM params are much better scalable (and more obviously architecture specific) than creation flags...

Jan

Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: [PATCH v9 05/13] xen: Add vmware_port support
Date: Mon, 23 Feb 2015 15:05:52 +0000
From: Jan Beulich <[email protected]>
To: Don Slutz <[email protected]>
CC: Aravind Gopalakrishnan <[email protected]>, Suravee Suthikulpanit <[email protected]>, Andrew Cooper <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, Ian Jackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, Jun Nakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 17.02.15 at 00:05, <[email protected]> wrote:

This includes adding is_vmware_port_enabled

This is a new domain_create() flag, DOMCRF_vmware_port. It is passed to domctl as XEN_DOMCTL_CDF_vmware_port.

As indicated before, I don't think this is a good use case for a domain creation flag. Some of the others we have may not be either, but as I have said quite often recently - let's not make the situation worse by following bad examples.

-Don Slutz

#1 lore raw
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits? I think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

Cheers,

Tim.

Quoted 202 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line

I was not sure on the way to go based on the emails.

I think I said so before - we should come to some conclusion among maintainers here first. I'm afraid besides Andrew and me no-one really voiced any opinion; maybe worth for you to send out a separate request-for-comments on this specific aspect...

Below is some of the subsets of the email threads on this:

Message-ID: <[email protected]>
References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: [PATCH v8 4/7] xen: Add vmware_port support
Date: Tue, 10 Feb 2015 14:30:49 -0500
From: Don Slutz <[email protected]>
To: Don Slutz <[email protected]>, Jan Beulich <[email protected]>
CC: Suravee Suthikulpanit <[email protected]>, Andrew Cooper <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, Ian Jackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, Jun Nakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 13 lines · Don Slutz
Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 21.01.15 at 18:52, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 03.10.14 at 00:40, <[email protected]> wrote:

This is a new domain_create() flag, DOMCRF_vmware_port. It is passed to domctl as XEN_DOMCTL_CDF_vmware_port.

Can you explain why a HVM param isn't suitable here?

The issue is that you need this flag during construct_vmcb() and construct_vmcs(). While Intel has vmx_update_exception_bitmap() AMD does not. So when HVM param's are setup and/or changed there currently is no way to adjust AMD's exception bitmap.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

So this is the simpler way.

But the less desirable one from a design/consistency perspective. Unless other maintainers disagree, I'd like to see this changed.

Ok, but will wait some time to see if "Unless other maintainers disagree"

While coding this is up I have hit issues that I need input on:

As a HVM_PARAM_ item, I would assume I should be following what HVM_PARAM_VIRIDIAN does. It has this comment:

            case HVM_PARAM_VIRIDIAN:
                /* This should only ever be set once by the tools and

read by the guest. */

Which is almost true. However the code allows you to change from 0 to non-zero any time in the life of the DomU. I am assuming that this is why xc_domain_save() and xc_domain_restore() save and restore this HVM_PARAM_ item.

With the enable of vmware_port the same way, I feel it would be a bug to allow the enable after "create" to not also adjust QEMU. Currently there is no way for the hypervisor to tell QEMU to enable vmware_port handling. So to avoid adding this code to xen and QEMU, it looks to me that adding code to make this a true write only 1 time would be needed so that you cannot use the hyper call to change later.

So, should I extend this change to cover other HVM_PARAM_?

Is all this additional code (xc_domain_save(), xc_domain_restore(), write only 1 time) still better then a domain_create() flag?

-Don Slutz

Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>Subject: Re: [PATCH v8 4/7]
xen: Add vmware_port support
Date: Tue, 17 Feb 2015 07:45:06 +0000
From: Jan Beulich <[email protected]>
To: Andrew Cooper <[email protected]>, Don Slutz <[email protected]>
CC: Suravee Suthikulpanit <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, IanJackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, JunNakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 11.02.15 at 18:04, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 10.02.15 at 20:30, <[email protected]> wrote:

While coding this is up I have hit issues that I need input on:

As a HVM_PARAM_ item, I would assume I should be following what HVM_PARAM_VIRIDIAN does. It has this comment:

Quoted 8 lines
Quoted 8 lines
            case HVM_PARAM_VIRIDIAN:
                /* This should only ever be set once by the tools and

read by the guest. */

Which is almost true. However the code allows you to change from 0 to non-zero any time in the life of the DomU. I am assuming that this is why xc_domain_save() and xc_domain_restore() save and restore this HVM_PARAM_ item.>> I was not sure on the way to go based on the emails.

I think I said so before - we should come to some conclusion among maintainers here first. I'm afraid besides Andrew and me no-one really voiced any opinion; maybe worth for you to send out a separate request-for-comments on this specific aspect...

Quoted 10 lines
Quoted 10 lines

With the enable of vmware_port the same way, I feel it would be a bug to allow the enable after "create" to not also adjust QEMU. Currently there is no way for the hypervisor to tell QEMU to enable vmware_port handling. So to avoid adding this code to xen and QEMU, it looks to me that adding code to make this a true write only 1 time would be needed so that you cannot use the hyper call to change later.

So, should I extend this change to cover other HVM_PARAM_?

Quoted 8 lines
Quoted 2 lines

Is all this additional code (xc_domain_save(), xc_domain_restore(), write only 1 time) still better then a domain_create() flag?

I suppose for your case it's indeed the right approach. Which other params this may be true for as well I can't immediately say, but I'd certainly like to ask for adjustments to others to be in separate patches (and perhaps even a separate series), with proper rationale for each of them. I guess Andrew will have further input for you on this matter...

Quoted 4 lines

My recommendation is still to use a creation flag. The described problem is exactly the reason why I dislike the use of hvmparams for booleans like this which really do need to be consistent for the lifetime of the guest.

While I can see your point, HVM params are much better scalable (and more obviously architecture specific) than creation flags...

Jan

Message-ID: <[email protected]>
References: <[email protected]>
<[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: [PATCH v9 05/13] xen: Add vmware_port support
Date: Mon, 23 Feb 2015 15:05:52 +0000
From: Jan Beulich <[email protected]>
To: Don Slutz <[email protected]>
CC: Aravind Gopalakrishnan <[email protected]>, Suravee Suthikulpanit <[email protected]>, Andrew Cooper <[email protected]>, Ian Campbell <[email protected]>, George Dunlap <[email protected]>, Ian Jackson <[email protected]>, Stefano Stabellini <[email protected]>, Eddie Dong <[email protected]>, Jun Nakajima <[email protected]>, Kevin Tian <[email protected]>, [email protected], Boris Ostrovsky <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Keir Fraser <[email protected]>, Tim Deegan <[email protected]>

Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 17.02.15 at 00:05, <[email protected]> wrote:

This includes adding is_vmware_port_enabled

This is a new domain_create() flag, DOMCRF_vmware_port. It is passed to domctl as XEN_DOMCTL_CDF_vmware_port.

As indicated before, I don't think this is a good use case for a domain creation flag. Some of the others we have may not be either, but as I have said quite often recently - let's not make the situation worse by following bad examples.

-Don Slutz

#2 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

Quoted 7 lines

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits? I think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

In a couple of years we may end up with an x86-CPUID-like mess of hundreds of flags. And apart from that scalability issue I also dislike the gross mixing of arch specific and generic flags here. Perhaps the already arch-specific XEN_DOMCTL_configure_domain would be the better route then if HVM params are being disliked?

Jan

#3 lore raw
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Quoted 6 lines
Quoted 3 lines

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits? I think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

In a couple of years we may end up with an x86-CPUID-like mess of hundreds of flags.

I'm not very worried about that. Looking at the similar hvm params now (booleans that shouldn't change at runtime), I only count 5 new flags.

Quoted 2 lines

And apart from that scalability issue I also
dislike the gross mixing of arch specific and generic flags here.

We could namespace that easily enough - start with 16 generic, 16 arch-specific, or just add an arch_flags field right now.

Quoted 2 lines

Perhaps the already arch-specific XEN_DOMCTL_configure_domain would be the better route then if HVM params are being disliked?

That appears to return config info from Xen rather than setting it. But I think I would prefer a create op that took arch-specific flags to a second op that effectively has to be called exactly at create time (with the risk that we'll mess up enfoorcing that and have asome race between flag-setting and e.g. memory allocation).

Tim.

#4 lore raw
In reply to Jan Beulich
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Quoted 8 lines
Quoted 3 lines

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits? I think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

In a couple of years we may end up with an x86-CPUID-like mess of hundreds of flags. And apart from that scalability issue I also dislike the gross mixing of arch specific and generic flags here. Perhaps the already arch-specific XEN_DOMCTL_configure_domain would be the better route then if HVM params are being disliked?

Given some recent consideration to the problem of domain architectural state (x86 cpuid policy, arm gic/spi), a (set of?) configuration hypercalls valid only during domain construction would perhaps be the best way to proceed.

Extending createdomain itself is incompatible with XSM disaggregation and having the architectural state in the migration stream.

The vmware backdoor is however slightly more complicated, in that it also involves qemu. What would be the effects be for a domain where Xen believes the backdoor is active, but qemu is not running appropriately?

~Andrew

author
#5 lore raw
Quoted 11 lines · Andrew Cooper
Quoted 5 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

The vmware backdoor is however slightly more complicated, in that it also involves qemu. What would be the effects be for a domain where Xen believes the backdoor is active, but qemu is not running appropriately?

Right now for a QEMU that does not support vmport=on as a machine property, QEMU will terminate and the domain will not be created.

If QEMU is started without this and Xen then activates the backdoor, QEMU will act like any other unsupported ioport access. This does mean that you will lose the use of a mouse under current Xorg GUI.

I have not tried to hot-plug the vmport and vmmouse devices in QEMU. That may take some changes to work.

-Don Slutz

Quoted 2 lines

~Andrew

#6 lore raw
In reply to Andrew Cooper
Quoted 19 lines · Andrew Cooper
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 3 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am stuck in the middle.

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Quoted 8 lines
Quoted 3 lines

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits? I think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

In a couple of years we may end up with an x86-CPUID-like mess of hundreds of flags. And apart from that scalability issue I also dislike the gross mixing of arch specific and generic flags here. Perhaps the already arch-specific XEN_DOMCTL_configure_domain would be the better route then if HVM params are being disliked?

Quoted 4 lines

Given some recent consideration to the problem of domain architectural state (x86 cpuid policy, arm gic/spi), a (set of?) configuration hypercalls valid only during domain construction would perhaps be the best way to proceed.

That sounds like you're also arguing for using HVM params then. :)

The nice thing about having a single set of flags at creation time is that it avoids any worrying about what order the flag-setting and the init of VM state happens in (e.g. turning on a feature after vcpus are already assigned means extra code to update them; having the features be settable in any order means handling all O(N^2) interactions).

Quoted 1 line

Extending createdomain itself is incompatible with XSM disaggregation

Hrm. Possibly, but I think that might be splitting hairs. A privileged VM creation component will already have to check its arguments (e.g. memory size, #vcpus, boot image) against some policy.

Quoted 1 line

and having the architectural state in the migration stream.

Not at all -- since these flags are immutable, you can trivially send them before any other state. If a toolstack can't remember what it did, we could add a what-were-the-creation-flags domctl.

Tim.

#7 lore raw

Tim, Andrew, Jan,
it seems as if we are slowly coming to some conclusion on this thread. If I am mistaken, I am wondering whether it would make sense to have an IRC meeting with all the involved stake-holders and report back to the list. Regards
Lars

Quoted 48 lines · Tim Deegan
Quoted 21 lines · Andrew Cooper
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 24.02.15 at 11:24, <[email protected]> wrote:
Quoted 2 lines · Don Slutz

Currently Jan Beulich is not happy with the addition of a new domain creation flag. Andrew Cooper is not happy with a HVM param. I am

stuck

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

in the middle.

I prefer a new flag, for anything that's fixed for the life of the domain. We've already had too many bugs where HVM params changed when people thought they wouldn't.

Jan, is your objection that we'll run out of XEN_DOMCTL_CDF_* bits?

I

Quoted 7 lines
Quoted 2 lines

think we can add more flag fields to DOMCTL_createdomain (or a v2) if that becomes a problem.

In a couple of years we may end up with an x86-CPUID-like mess of hundreds of flags. And apart from that scalability issue I also dislike the gross mixing of arch specific and generic flags here. Perhaps the already arch-specific XEN_DOMCTL_configure_domain would be the better route then if HVM params are being disliked?

Quoted 4 lines

Given some recent consideration to the problem of domain architectural state (x86 cpuid policy, arm gic/spi), a (set of?) configuration hypercalls valid only during domain construction would perhaps be the best way to proceed.

That sounds like you're also arguing for using HVM params then. :)

The nice thing about having a single set of flags at creation time is that it avoids any worrying about what order the flag-setting and the init of VM state happens in (e.g. turning on a feature after vcpus are already assigned means extra code to update them; having the features be settable in any order means handling all O(N^2) interactions).

Quoted 1 line

Extending createdomain itself is incompatible with XSM disaggregation

Hrm. Possibly, but I think that might be splitting hairs. A privileged VM creation component will already have to check its arguments (e.g. memory size, #vcpus, boot image) against some policy.

Quoted 1 line

and having the architectural state in the migration stream.

Not at all -- since these flags are immutable, you can trivially send them before any other state. If a toolstack can't remember what it did, we could add a what-were-the-creation-flags domctl.

Tim.

#8 lore raw

Hi,

Quoted 4 lines · Lars Kurth

Tim, Andrew, Jan,
it seems as if we are slowly coming to some conclusion on this thread. If I am mistaken, I am wondering whether it would make sense to have an IRC meeting with all the involved stake-holders and report back to the list.

I'm not sure where I should answer...

We have a similar problem on ARM where we have arch-specific information (GIC version, number of interrupts) which changes between each domain.

On Xen 4.5, we took the approach to create a separate DOMCTL for passing information. It has to be called before any VCPUs is created (DOMCTL_set_max_vcpus) and make the code more complicate to handle because we have to defer some domain initialization.

I took another approach for Xen 4.6 based on Jan suggestion [1]. A v3 as been send recently [2] and we had some discussion about what is the best approach.

I hope this will help to sort out a good approach for both ARM and x86.

Regards,

[1] http://lists.xen.org/archives/html/xen-devel/2014-11/msg00522.html
[2] http://lists.xen.org/archives/html/xen-devel/2015-01/msg01184.html

Signature · 1 line
Julien Grall
#9 lore raw
Quoted 13 lines · Julien Grall

Hi,

Quoted 4 lines · Lars Kurth

Tim, Andrew, Jan,
it seems as if we are slowly coming to some conclusion on this thread. If I am mistaken, I am wondering whether it would make sense to have an IRC meeting with all the involved stake-holders and report back to the list.

I'm not sure where I should answer...

We have a similar problem on ARM where we have arch-specific information (GIC version, number of interrupts) which changes between each domain.

Quoted 8 lines

On Xen 4.5, we took the approach to create a separate DOMCTL for passing information. It has to be called before any VCPUs is created (DOMCTL_set_max_vcpus) and make the code more complicate to handle because we have to defer some domain initialization.

I took another approach for Xen 4.6 based on Jan suggestion [1]. A v3 as been send recently [2] and we had some discussion about what is the best approach.

This line (adding these immutable config options at create time) seems like a good one to me.

For migration, we'd need a hypercall that lets the Xen tools extract the correct values to pass to the receiving Xen. Xen would fill in the actual values used for anything (like this GIC option) that was set to 'default' or 'don't care' on the initial create op.

Andrew Cooper had some reasons why we might want to split this into a bare create op (which might do no more than allocate a domid) and a set-config op that would take these and all other immutable flags. I'm not wild for that but could be convinced either way -- I'll let him fill in the details.

Cheers,

Tim.