public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* architecture-specific data in struct kvm_run ?
@ 2008-01-09 23:20 Hollis Blanchard
  2008-01-10  1:36 ` Zhang, Xiantao
  2008-01-10  8:30 ` Carsten Otte
  0 siblings, 2 replies; 4+ messages in thread
From: Hollis Blanchard @ 2008-01-09 23:20 UTC (permalink / raw)
  To: kvm-devel; +Cc: Carsten Otte, Zhang,  Xiantao

There are a bunch of x86-specific fields in struct kvm_run:
	/* in */
	__u8 request_interrupt_window;
	__u8 padding1[7];

	/* out */
	__u8 if_flag;
	__u8 padding2[2];

	/* in (pre_kvm_run), out (post_kvm_run) */
	__u64 cr8;
	__u64 apic_base;

Since this structure is shared with all architectures, can we find a
more appropriate place to keep this data? Or should we feel free to add
arch-specific data here?

-- 
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: architecture-specific data in struct kvm_run ?
  2008-01-09 23:20 architecture-specific data in struct kvm_run ? Hollis Blanchard
@ 2008-01-10  1:36 ` Zhang, Xiantao
       [not found]   ` <42DFA526FC41B1429CE7279EF83C6BDCC08A9F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2008-01-10  8:30 ` Carsten Otte
  1 sibling, 1 reply; 4+ messages in thread
From: Zhang, Xiantao @ 2008-01-10  1:36 UTC (permalink / raw)
  To: Hollis Blanchard, kvm-devel; +Cc: Carsten Otte

Hollis Blanchard wrote:
> There are a bunch of x86-specific fields in struct kvm_run:
> 	/* in */
> 	__u8 request_interrupt_window;
> 	__u8 padding1[7];
> 
> 	/* out */
> 	__u8 if_flag;
> 	__u8 padding2[2];
> 
> 	/* in (pre_kvm_run), out (post_kvm_run) */
> 	__u64 cr8;
> 	__u64 apic_base;
> 
> Since this structure is shared with all architectures, can we find a
> more appropriate place to keep this data? Or should we feel free to
> add arch-specific data here?
Hollis,

Maybe #ifdef is enough if we other archs doesn't need to add new more.
For IA64, we don't require new fields.

Xiantao

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: architecture-specific data in struct kvm_run ?
  2008-01-09 23:20 architecture-specific data in struct kvm_run ? Hollis Blanchard
  2008-01-10  1:36 ` Zhang, Xiantao
@ 2008-01-10  8:30 ` Carsten Otte
  1 sibling, 0 replies; 4+ messages in thread
From: Carsten Otte @ 2008-01-10  8:30 UTC (permalink / raw)
  To: Hollis Blanchard; +Cc: kvm-devel, Carsten Otte, Zhang,  Xiantao

Hollis Blanchard wrote:
> There are a bunch of x86-specific fields in struct kvm_run:
> 	/* in */
> 	__u8 request_interrupt_window;
> 	__u8 padding1[7];
> 
> 	/* out */
> 	__u8 if_flag;
> 	__u8 padding2[2];
> 
> 	/* in (pre_kvm_run), out (post_kvm_run) */
> 	__u64 cr8;
> 	__u64 apic_base;
> 
> Since this structure is shared with all architectures, can we find a
> more appropriate place to keep this data? Or should we feel free to add
> arch-specific data here?
Afaics, we'll need an arch extension to kvm_run. On s390, we'll need 
different extensions then x86 has defined here. And we don't need any 
of above fields.

Carsten

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

* Re: architecture-specific data in struct kvm_run ?
       [not found]   ` <42DFA526FC41B1429CE7279EF83C6BDCC08A9F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2008-01-10  9:47     ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2008-01-10  9:47 UTC (permalink / raw)
  To: Zhang, Xiantao; +Cc: kvm-devel, Carsten Otte, Hollis Blanchard

Zhang, Xiantao wrote:
> Hollis Blanchard wrote:
>   
>> There are a bunch of x86-specific fields in struct kvm_run:
>> 	/* in */
>> 	__u8 request_interrupt_window;
>> 	__u8 padding1[7];
>>
>> 	/* out */
>> 	__u8 if_flag;
>> 	__u8 padding2[2];
>>
>> 	/* in (pre_kvm_run), out (post_kvm_run) */
>> 	__u64 cr8;
>> 	__u64 apic_base;
>>
>> Since this structure is shared with all architectures, can we find a
>> more appropriate place to keep this data? Or should we feel free to
>> add arch-specific data here?
>>     
> Hollis,
>
> Maybe #ifdef is enough if we other archs doesn't need to add new more.
> For IA64, we don't require new fields.
>
>   

I agree, ifdefs are best here.  Maybe wrap them in a structure.


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

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

end of thread, other threads:[~2008-01-10  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 23:20 architecture-specific data in struct kvm_run ? Hollis Blanchard
2008-01-10  1:36 ` Zhang, Xiantao
     [not found]   ` <42DFA526FC41B1429CE7279EF83C6BDCC08A9F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-10  9:47     ` Avi Kivity
2008-01-10  8:30 ` Carsten Otte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox