Skip to contentSkip to conversation

Move kvm_get_pit to libkvm.c common code

PATCH Applied Jerone Young 2 participants 4 messages Apr 8, 2008 – Apr 15, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Move kvm_get_pit to libkvm.c common code

# HG changeset patch
# User Jerone Young <[email protected]>
# Date 1207692873 18000
# Branch merge
# Node ID 8ddf560729aac228cd84068e1227e601e68a6840 # Parent 94cbc19df0f0fcab150599b10d859f1a3bc1b7cb [v2] Move kvm_get_pit to libkvm.c common code

- I am resending this patch removing ia64. It apprently fell through the cracks.

Don't compile kvm_*_pit() on architectures whose currently supported platforms do not contain a PIT.

libkvm/libkvm.h +2 -0
@@ -549,6 +549,7 @@ int kvm_pit_in_kernel(kvm_context_t kvm)
 
 #ifdef KVM_CAP_PIT
 
+#if defined(__i386__) || defined(__x86_64__)
 /*!
  * \brief Get in kernel PIT of the virtual domain
  *
@@ -569,6 +570,7 @@ int kvm_get_pit(kvm_context_t kvm, struc
  * \param s PIT state of the virtual domain
  */
 int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s);
+#endif
 
 #endif
 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

#1 lore raw
Quoted 19 lines · Jerone Young

- I am resending this patch removing ia64. It apprently fell through the cracks.

Don't compile kvm_*_pit() on architectures whose currently supported platforms do not contain a PIT.

libkvm/libkvm.h +1 -0
@@ -549,6 +549,7 @@ int kvm_pit_in_kernel(kvm_context_t kvm)
 
 #ifdef KVM_CAP_PIT
 
+#if defined(__i386__) || defined(__x86_64__)
 /*!
  * \brief Get in kernel PIT of the virtual domain
  *

libkvm/libkvm.h int kvm_get_pit(kvm_context_t kvm, struc · line 575

Quoted 6 lines
libkvm/libkvm.h +1 -0
@@ -569,6 +570,7 @@ int kvm_get_pit(kvm_context_t kvm, struc
  * \param s PIT state of the virtual domain
  */
 int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s);
+#endif
 
 #endif

Patch is okay, but doesn't match the description at all. Is this what you intended to send?

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
#2 lore raw

I just took the old description that was there before. A much better one would be:

Remove declarations of kvm_*_pit() on architectures who do not support not have a PIT.

That is what I was really intending. It removes a lot of compile warnings, when compiling anything with libkvm.h on platforms that do not have a pit. It's mainly because of the structures that are used as arguments to these function declrations.

Quoted 25 lines · Avi Kivity
Quoted 24 lines · Jerone Young

- I am resending this patch removing ia64. It apprently fell through the cracks.

Don't compile kvm_*_pit() on architectures whose currently supported platforms do not contain a PIT.

libkvm/libkvm.h +2 -0
@@ -549,6 +549,7 @@ int kvm_pit_in_kernel(kvm_context_t kvm)
 
 #ifdef KVM_CAP_PIT
 
+#if defined(__i386__) || defined(__x86_64__)
 /*!
  * \brief Get in kernel PIT of the virtual domain
  *
@@ -569,6 +570,7 @@ int kvm_get_pit(kvm_context_t kvm, struc
  * \param s PIT state of the virtual domain
  */
 int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s);
+#endif
 
Quoted 5 lines

libkvm/libkvm.h int kvm_get_pit(kvm_context_t kvm, struc · line 575

Quoted 1 line
libkvm/libkvm.h +0 -0
 #endif

Patch is okay, but doesn't match the description at all. Is this what you intended to send?

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Applied
#3 lore raw
Quoted 11 lines · Jerone Young

I just took the old description that was there before. A much better one would be:

Remove declarations of kvm_*_pit() on architectures who do not support not have a PIT.

That is what I was really intending. It removes a lot of compile warnings, when compiling anything with libkvm.h on platforms that do not have a pit. It's mainly because of the structures that are used as arguments to these function declrations.

Thanks, applied.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone