Skip to contentSkip to conversation

Add sysctl to HVM hypercall table

RFC PATCH In review Daniel De Graaf 2 participants 5 messages Sep 8, 2010

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Add sysctl to HVM hypercall table

The sysctl hypercall should be callable from HVM guests.

---

It may be useful to add all (or almost all) hypercalls to the HVM hypercall table, rather than adding them one at a time when it is found that a useful one is missing. While a few hypercalls don't make sense when calling from HVM, any call that can interact with global xen state or another domain could be useful to an HVM driver domain. Thoughts?

xen/arch/x86/hvm/hvm.c +3 -0
@@ -2321,6 +2321,7 @@
     HYPERCALL(sched_op),
     HYPERCALL(set_timer_op),
     HYPERCALL(hvm_op),
+    HYPERCALL(sysctl),
     HYPERCALL(tmem_op)
 };
 
@@ -2375,6 +2376,7 @@
     HYPERCALL(sched_op),
     HYPERCALL(set_timer_op),
     HYPERCALL(hvm_op),
+    HYPERCALL(sysctl),
     HYPERCALL(tmem_op)
 };
 
@@ -2387,6 +2389,7 @@
     HYPERCALL(sched_op),
     HYPERCALL(set_timer_op),
     HYPERCALL(hvm_op),
+    HYPERCALL(sysctl),
     HYPERCALL(tmem_op)
 };
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Daniel De Graaf

The sysctl hypercall should be callable from HVM guests.

Why?

K.

Quoted 9 lines

---

It may be useful to add all (or almost all) hypercalls to the HVM hypercall table, rather than adding them one at a time when it is found that a useful one is missing. While a few hypercalls don't make sense when calling from HVM, any call that can interact with global xen state or another domain could be useful to an HVM driver domain. Thoughts?

#2 lore raw
Quoted 7 lines · Keir Fraser
Quoted 1 line · Daniel De Graaf

The sysctl hypercall should be callable from HVM guests.

Why?

K.

I would like to be able to call xc_domain_getinfolist from an HVM driver domain. This uses the XEN_SYSCTL_getdomaininfolist sysctl.

Quoted 8 lines
Quoted 6 lines

It may be useful to add all (or almost all) hypercalls to the HVM hypercall table, rather than adding them one at a time when it is found that a useful one is missing. While a few hypercalls don't make sense when calling from HVM, any call that can interact with global xen state or another domain could be useful to an HVM driver domain. Thoughts?

Signature · 2 lines
Daniel De Graaf
National Security Agency
#3 lore raw
Quoted 8 lines · Daniel De Graaf
Quoted 5 lines
Quoted 1 line

The sysctl hypercall should be callable from HVM guests.

Why?

K.

I would like to be able to call xc_domain_getinfolist from an HVM driver domain. This uses the XEN_SYSCTL_getdomaininfolist sysctl.

You realise that as it stands the domain needs to be as privileged as dom0 to successfully execute the sysctl hypercall?

-- Keir

#4 lore raw
Quoted 8 lines · Keir Fraser
Quoted 6 lines · Daniel De Graaf
Quoted 5 lines
Quoted 1 line

The sysctl hypercall should be callable from HVM guests.

Why?

K.

Quoted 8 lines
Quoted 2 lines

I would like to be able to call xc_domain_getinfolist from an HVM driver domain. This uses the XEN_SYSCTL_getdomaininfolist sysctl.

You realise that as it stands the domain needs to be as privileged as dom0 to successfully execute the sysctl hypercall?

-- Keir

Yes, the domain will need to be privileged. XSM hooks exist to reduce the privileges granted to the guest, so it does not need to be equal to dom0. Since PV domains can already make this hypercall, there's no reason not to allow HVM domains to do the same.

Signature · 2 lines
Daniel De Graaf
National Security Agency