[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH 1/8] x86/domctl: introduce a pair of hypercall to set and get cpu topology


  • To: Chao Gao <chao.gao@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxx, Wei Liu <wei.liu2@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Date: Tue, 9 Jan 2018 12:18:13 -0500
  • Delivery-date: Tue, 09 Jan 2018 17:18:30 +0000
  • Ironport-phdr: 9a23:0bundRQ+78dCp4dd3XnWGN9hItpsv+yvbD5Q0YIujvd0So/mwa67YhOFt8tkgFKBZ4jH8fUM07OQ7/i5HzxeqsbZ+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAmroQnLtcQbgIRuJ6UtxhDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKiU0+3/LhMNukK1boQqhpx1hzI7SfIGVL+d1cqfEcd8HWWZNQsNdWipPDYOma4sEEvQPM+BWoYLgo1cCtAWyCRWpCO7p1zRGhGL53bci3uo8Dw/G0gwuEdEAvnvao9r6NrsdX++uwanUzzjOde9a1Svz5YXKdB0qvPGCXah3ccrU0UQhGRnKjlORqYP7OzOey+oDvHaG5ORhT+KgkXQoqw9sqTWo28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VuMaKYzE9BdzSA0JDyIbLYNHTy/BSua6HK2lHTy82W+roU6PsmsVnsoAapFk9xu0lghvJV2nzUyZzNRF4ZUZv2FEk+8DB7oa3XZm824IaCkTV8PK/xvjLc1tYBAOo+1g3mb9pZdqSeG0u6LMAbT+yvNaR+hFWoKBYFIbp6/68oJcK2MfCB3fjvdNphmXqKgGlI6YY1hl6N8gJsR+iO2IwKlbXQ5ReKWT76ix+arsn9lIRAZDcTVj6k0jTtDoNVYqx0fK4IBH2oLsnxwc9x0dqleHle7levT2kU1dS7ZAafbBTC3AlTnRAUpnq9kCf+0D1wkBkutKOU2CGIyOPnIl5PG2dNDEtrhlT3Jo7829ETWg6qZgMqjxyjzUvngaNauL5+Py/YRkIeO2DZImZ4Xab4mqeEZ8dXoMcHvCJNX+n6TU2cTrflixYHlSjiA3Ff1HYwcDT8/t3QmRBghX3VB3F0tHfDMZV5wxvF6cOaTvlWxjccHwFziCXNB0j6NN6sq5HctZ7F+sqzSmagXZ0bJSvhwJ6EtSC7zXZ3GhD5lPe2zI7JCw8/hAPy0dhnUW3koV7TeIDi2ezuPe1rc0ZyDXfg+sF6Hcd4iYJ2i5YOjytJzq6J9GYKxD+gee5Q3rjzOT9UH2YG
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01/09/2018 04:06 AM, Chao Gao wrote:
On Mon, Jan 08, 2018 at 01:14:44PM -0500, Daniel De Graaf wrote:
On 01/07/2018 11:01 PM, Chao Gao wrote:
Define interface, structures and hypercalls for toolstack to build
cpu topology and for guest that will retrieve it [1].
Two subop hypercalls introduced by this patch:
XEN_DOMCTL_set_cpu_topology to define cpu topology information per domain
and XENMEM_get_cpu_topology to retrieve cpu topology information.

[1]: during guest creation, those information helps hvmloader to build ACPI.

Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>

When adding new XSM controls for use by device models, you also
need to add the permissions to the device_model macro defined in
tools/flask/policy/modules/xen.if.  If domains need to call this
function on themselves (is this only true for get?), you will also
need to add it to declare_domain_common.


Hi, Daniel.

Yes. XENMEM_get_cpu_topology will be called by the domain itself.
And Both get and set will be called by dom0 when creating one domain.
So I need:
1. add *set* and *get* to create_domain_common.
2. add *set* to declare_domain_common.

Is it right?

Thanks
Chao

It sounds like you need to add get to declare_domain_common (not set)
because the domain only needs to invoke this on itself.  If the device
model doesn't need to use these hypercalls (would guest cpu hotplug or
similar things need them?), then that's all you need to add.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.