public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
@ 2007-12-14  3:27 Zhang, Xiantao
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD01F2-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiantao @ 2007-12-14  3:27 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

Hi, Avi
As you know, we have to change to kvm_vcpu_arch concept since meet
various issues about #includes. 
This patches enables it. I also prepared a series of patches to split
kvm with similar idea. 
Now, kvm.h includes x86.h by default. X86.c needs includes kvm.h, and
vmx.c and svm.c only needs to include x86.h

One mmu.h is created to solve inter-dependent issues.

With these two seires of pacthes, a clear arch-independent pictures
described! :)

Tested on x86_32 boot up, and x86_64 build.

[1/22] kvm portability. Add kvm_vcpu_arch support
[2/22] kvm: Portability : Moving irq-related fields to arch.
[3/22] kvm portability, moving general registers to arch.
[4/22] kvm portability: Moving shadow_efer and pdptrs to archs.
[5/22] kvm portability: Moving apic and apic_base to kvm_vcpu arch.
[6/22] kvm portability: Moving mp_state, and sipi_vector to
kvm_vcpu_arch
[7/22] kvm portability: Moving mmu-related fields to arch.
[8/22] kvm : portability : moving pt fileds to arch.
[9/22] kvm: portability: Moving {host, guest}_fx_image fields to arch
[10/22] Moving pio_data, pio, mmio_fault_cr2 to arch.
[11/22]   kvm: portability: Moving rmode, exceptions, halt_request to
arch
[12/22] kvm: portabiltiy: Moving cpuid_entries to arch
[13/22] kvm: portability: Moving emulate_ctxt to kvm_vcpu_arch.
[14/22] kvm: portability: Splitting mmu-related static functions to
mmu.h
[15/22] kvm: portability: Moving kvm_vcpu defintions back to kvm.h
[16/22] kvm: portability: Expand the KVM_VCPU_COMM in kvm_vcpu
structure.
[17/22] kvm: portability : Moving kvm_vcpu_stat to x86.h
[18/22] kvm: portability: moving naliases and aliases to kvm_arch.
[19//22] kvm: portability: Moving mmu-related fields to kvm_arch.
[20/22] kvm: portability: moving vpic and vioapic to kvm_arch
[21/22] kvm: portability: moving round_robin_prev_vcpu and tss_addr to
kvm_arch
[22/22] kvm: portability : moving kvm_vm_stat to x86.h

Thanks 
Xiantao

[-- Attachment #2: 0022-kvm-portability-moving-kvm_vm_stat-to-x86.h.patch --]
[-- Type: application/octet-stream, Size: 1470 bytes --]

From b074d0c02851b362863a98c050d4ae3451eb954b Mon Sep 17 00:00:00 2001
From: Zhang Xiantao <xiantao.zhang@intel.com>
Date: Fri, 14 Dec 2007 10:23:23 +0800
Subject: [PATCH] kvm: portability : moving kvm_vm_stat to x86.h

This patch moves kvm_vm_stat to x86.h, and every arch
can define its own kvm_vm_stat in $arch.h
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 drivers/kvm/kvm.h |   10 ----------
 drivers/kvm/x86.h |   10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index ab9657a..bf6a3b3 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -103,16 +103,6 @@ struct kvm_memory_slot {
 	int user_alloc;
 };
 
-struct kvm_vm_stat {
-	u32 mmu_shadow_zapped;
-	u32 mmu_pte_write;
-	u32 mmu_pte_updated;
-	u32 mmu_pde_zapped;
-	u32 mmu_flooded;
-	u32 mmu_recycled;
-	u32 remote_tlb_flush;
-};
-
 struct kvm {
 	struct mutex lock; /* protects everything except vcpus */
 	struct mm_struct *mm; /* userspace tied to this vm */
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 9455839..dfb8091 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -283,6 +283,16 @@ struct kvm_arch{
 	struct page *apic_access_page;
 };
 
+struct kvm_vm_stat {
+	u32 mmu_shadow_zapped;
+	u32 mmu_pte_write;
+	u32 mmu_pte_updated;
+	u32 mmu_pde_zapped;
+	u32 mmu_flooded;
+	u32 mmu_recycled;
+	u32 remote_tlb_flush;
+};
+
 struct kvm_vcpu_stat {
 	u32 pf_fixed;
 	u32 pf_guest;
-- 
1.5.1.2


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

-------------------------------------------------------------------------
SF.Net email is sponsored by:
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

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD01F2-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-12-14  6:56   ` Avi Kivity
  2007-12-14 11:21   ` Carsten Otte
  2007-12-14 14:35   ` Avi Kivity
  2 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2007-12-14  6:56 UTC (permalink / raw)
  To: Carsten Otte, Hollis Blanchard
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Zhang, Xiantao

Zhang, Xiantao wrote:
> Hi, Avi
> As you know, we have to change to kvm_vcpu_arch concept since meet
> various issues about #includes. 
> This patches enables it. I also prepared a series of patches to split
> kvm with similar idea. 
> Now, kvm.h includes x86.h by default. X86.c needs includes kvm.h, and
> vmx.c and svm.c only needs to include x86.h
>
> One mmu.h is created to solve inter-dependent issues.
>
> With these two seires of pacthes, a clear arch-independent pictures
> described! :)
>   

Please review this ASAP; if there are no objections I want to commit 
this quickly (I can't really commit anything else while this is pending).

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
SF.Net email is sponsored by:
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] 6+ messages in thread

* Re: [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD01F2-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2007-12-14  6:56   ` Avi Kivity
@ 2007-12-14 11:21   ` Carsten Otte
  2007-12-14 14:35   ` Avi Kivity
  2 siblings, 0 replies; 6+ messages in thread
From: Carsten Otte @ 2007-12-14 11:21 UTC (permalink / raw)
  To: Zhang, Xiantao; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity

Zhang, Xiantao wrote:
> As you know, we have to change to kvm_vcpu_arch concept since meet
> various issues about #includes. 
> This patches enables it. I also prepared a series of patches to split
> kvm with similar idea. 
> Now, kvm.h includes x86.h by default. X86.c needs includes kvm.h, and
> vmx.c and svm.c only needs to include x86.h
> 
> One mmu.h is created to solve inter-dependent issues.
> 
> With these two seires of pacthes, a clear arch-independent pictures
> described! :)
> 
> Tested on x86_32 boot up, and x86_64 build.

Very nice patch series :-).
Acked-by: Carsten Otte <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>

-------------------------------------------------------------------------
SF.Net email is sponsored by:
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] 6+ messages in thread

* Re: [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD01F2-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2007-12-14  6:56   ` Avi Kivity
  2007-12-14 11:21   ` Carsten Otte
@ 2007-12-14 14:35   ` Avi Kivity
       [not found]     ` <476294CB.90605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2007-12-14 14:35 UTC (permalink / raw)
  To: Zhang, Xiantao; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Zhang, Xiantao wrote:
> Hi, Avi
> As you know, we have to change to kvm_vcpu_arch concept since meet
> various issues about #includes. 
> This patches enables it. I also prepared a series of patches to split
> kvm with similar idea. 
> Now, kvm.h includes x86.h by default. X86.c needs includes kvm.h, and
> vmx.c and svm.c only needs to include x86.h
>
> One mmu.h is created to solve inter-dependent issues.
>
>   

Applied and pushed; thanks for the good patchset.

> With these two seires of pacthes, a clear arch-independent pictures
> described! :)
>
>   

Indeed, I'll rearrange the directory layout tomorrow and then we can 
finally see actual arch support instead of preparations!

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
SF.Net email is sponsored by:
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] 6+ messages in thread

* Re: [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
       [not found]     ` <476294CB.90605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-12-14 14:42       ` Carsten Otte
  2007-12-14 22:46       ` Zhang, Xiantao
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Otte @ 2007-12-14 14:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Zhang, Xiantao

Avi Kivity wrote:
> Indeed, I'll rearrange the directory layout tomorrow and then we can 
> finally see actual arch support instead of preparations!
Yipieeeeeeeeeh :-).


-------------------------------------------------------------------------
SF.Net email is sponsored by:
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] 6+ messages in thread

* Re: [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture.
       [not found]     ` <476294CB.90605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  2007-12-14 14:42       ` Carsten Otte
@ 2007-12-14 22:46       ` Zhang, Xiantao
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, Xiantao @ 2007-12-14 22:46 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi
>> As you know, we have to change to kvm_vcpu_arch concept since meet
>> various issues about #includes.
>> This patches enables it. I also prepared a series of patches to
>> split kvm with similar idea. Now, kvm.h includes x86.h by default.
>> X86.c needs includes kvm.h, and vmx.c and svm.c only needs to
>> include x86.h 
>> 
>> One mmu.h is created to solve inter-dependent issues.
>> 
>> 
> 
> Applied and pushed; thanks for the good patchset.
> 
>> With these two seires of pacthes, a clear arch-independent pictures
>> described! :) 
>> 
>> 
> 
> Indeed, I'll rearrange the directory layout tomorrow and then we can
> finally see actual arch support instead of preparations!

Thanks, that's great news to us :)

-------------------------------------------------------------------------
SF.Net email is sponsored by:
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] 6+ messages in thread

end of thread, other threads:[~2007-12-14 22:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-14  3:27 [PATCH][0/22] Patches to use arch concept to hold arch-speicif fileds for kvm_vcpu and kvm strucuture Zhang, Xiantao
     [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD01F2-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-14  6:56   ` Avi Kivity
2007-12-14 11:21   ` Carsten Otte
2007-12-14 14:35   ` Avi Kivity
     [not found]     ` <476294CB.90605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-12-14 14:42       ` Carsten Otte
2007-12-14 22:46       ` Zhang, Xiantao

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