Skip to contentSkip to conversation

kvmppc: account guest time

PATCH In review [email protected] 2 participants 3 messages Apr 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvmppc: account guest time

From: Developer <[email protected]>

This adds the support to account the guest and the host apart from each other. It uses the already available structure&flags PF_VCPU reported in /proc/stat and the kvm_guest_enter/exit already available in kvm_host.h. After that patch the data is available in the proc file system. We will need contributions to the userspace tools e.g. that read from there to bring that feature to the end customer.

---

[diffstat]

 powerpc.c |    2 ++
 1 files changed, 2 insertions(+)
arch/powerpc/kvm/powerpc.c +2 -0
@@ -868,7 +868,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
 	kvmppc_check_and_deliver_interrupts(vcpu);
 
 	local_irq_disable();
+	kvm_guest_enter();
 	r = __kvmppc_vcpu_run(run, vcpu);
+	kvm_guest_exit();
 	local_irq_enable();
 
 	if (vcpu->sigset_active)

-------------------------------------------------------------------------
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
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

#1 lore raw
Quoted 1 line · [email protected] wrote:

From: Developer <[email protected]>

Oops - wrong template file - should be:
From: Christian Ehrhardt <[email protected]>

Quoted 38 lines

This adds the support to account the guest and the host apart from each other. It uses the already available structure&flags PF_VCPU reported in /proc/stat and the kvm_guest_enter/exit already available in kvm_host.h. After that patch the data is available in the proc file system. We will need contributions to the userspace tools e.g. that read from there to bring that feature to the end customer.

---

[diffstat]

 powerpc.c |    2 ++
 1 files changed, 2 insertions(+)
arch/powerpc/kvm/powerpc.c +2 -1
@@ -868,7 +868,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
 	kvmppc_check_and_deliver_interrupts(vcpu);
 
 	local_irq_disable();
+	kvm_guest_enter();
 	r = __kvmppc_vcpu_run(run, vcpu);
+	kvm_guest_exit();
 	local_irq_enable();
 
 	if (vcpu->sigset_active)
 
-------------------------------------------------------------------------

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
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

Signature · 13 lines
Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization

-------------------------------------------------------------------------
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
_______________________________________________
kvm-ppc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
#2 lore raw
In reply to [email protected]
Quoted 20 lines · On Monday 07 April 2008 07:37:28 [email protected] wrote:

From: Developer <[email protected]>

This adds the support to account the guest and the host apart from each other. It uses the already available structure&flags PF_VCPU reported in /proc/stat and the kvm_guest_enter/exit already available in kvm_host.h. After that patch the data is available in the proc file system. We will need contributions to the userspace tools e.g. that read from there to bring that feature to the end customer.

---

[diffstat]

 powerpc.c |    2 ++
 1 files changed, 2 insertions(+)

arch/powerpc/kvm/powerpc.c int kvm_arch_vcpu_ioctl_run(struct kvm_v · line 876

Quoted 9 lines
arch/powerpc/kvm/powerpc.c +2 -0
@@ -868,7 +868,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
 	kvmppc_check_and_deliver_interrupts(vcpu);
 
 	local_irq_disable();
+	kvm_guest_enter();
 	r = __kvmppc_vcpu_run(run, vcpu);
+	kvm_guest_exit();
 	local_irq_enable();
 
 	if (vcpu->sigset_active)

Thanks; applied.

Signature · 12 lines
Hollis Blanchard
IBM Linux Technology Center

-------------------------------------------------------------------------
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
_______________________________________________
kvm-ppc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel