All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH, RFC] Add sysctl to HVM hypercall table
@ 2010-09-08 15:20 Daniel De Graaf
  2010-09-08 15:38 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel De Graaf @ 2010-09-08 15:20 UTC (permalink / raw)
  To: xen-devel, Stefano Stabellini, Ian Campbell

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

The sysctl hypercall should be callable from HVM guests.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

---

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?

[-- Attachment #2: xen-allow-hvm-sysctl.patch --]
[-- Type: text/plain, Size: 526 bytes --]

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -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)
 };
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, RFC] Add sysctl to HVM hypercall table
  2010-09-08 15:20 [PATCH, RFC] Add sysctl to HVM hypercall table Daniel De Graaf
@ 2010-09-08 15:38 ` Keir Fraser
  2010-09-08 16:00   ` Daniel De Graaf
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2010-09-08 15:38 UTC (permalink / raw)
  To: Daniel De Graaf, xen-devel, Stefano Stabellini, Ian Campbell

On 08/09/2010 08:20, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:

> The sysctl hypercall should be callable from HVM guests.

Why?

 K.

> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> 
> ---
> 
> 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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, RFC] Add sysctl to HVM hypercall table
  2010-09-08 15:38 ` Keir Fraser
@ 2010-09-08 16:00   ` Daniel De Graaf
  2010-09-08 21:02     ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel De Graaf @ 2010-09-08 16:00 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On 09/08/2010 11:38 AM, Keir Fraser wrote:
> On 08/09/2010 08:20, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:
> 
>> 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.

>>
>> 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?
> 
> 


-- 

Daniel De Graaf
National Security Agency

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, RFC] Add sysctl to HVM hypercall table
  2010-09-08 16:00   ` Daniel De Graaf
@ 2010-09-08 21:02     ` Keir Fraser
  2010-09-08 21:15       ` Daniel De Graaf
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2010-09-08 21:02 UTC (permalink / raw)
  To: Daniel De Graaf; +Cc: xen-devel

On 08/09/2010 09:00, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:

>>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH, RFC] Add sysctl to HVM hypercall table
  2010-09-08 21:02     ` Keir Fraser
@ 2010-09-08 21:15       ` Daniel De Graaf
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel De Graaf @ 2010-09-08 21:15 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On 09/08/2010 05:02 PM, Keir Fraser wrote:
> On 08/09/2010 09:00, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:
> 
>>>> 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
> 

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.

-- 

Daniel De Graaf
National Security Agency

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-08 21:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 15:20 [PATCH, RFC] Add sysctl to HVM hypercall table Daniel De Graaf
2010-09-08 15:38 ` Keir Fraser
2010-09-08 16:00   ` Daniel De Graaf
2010-09-08 21:02     ` Keir Fraser
2010-09-08 21:15       ` Daniel De Graaf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.