PPC KVM patches
Subsystems (4)
Hi Marcelo / Avi,
This is my current PPC KVM patch queue. Please pull.
Alex
The following changes since commit 40f4a244a3687d390e97f8e5240f5a701e630ccc:
Avi Kivity (1):
KVM: VMX: Cache vmcs segment fields
are available in the git repository at:
git://github.com/agraf/linux-2.6.git kvm-ppc-next
Alexander Graf (1):
KVM: PPC: Add kvm headers to headers_install
Scott Wood (4):
KVM: PPC: e500: emulate SVR
KVM: PPC: fix exit accounting for SPRs, tlbwe, tlbsx
KVM: PPC: booke: save/restore VRSAVE (a.k.a. USPRG0)
KVM: PPC: booke: add sregs support
Stuart Yoder (1):
KVM: PPC: use ticks, not usecs, for exit timing
Documentation/kvm/api.txt | 6 +- arch/powerpc/include/asm/Kbuild | 2 + arch/powerpc/include/asm/kvm.h | 184 +++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/kvm_44x.h | 1 - arch/powerpc/include/asm/kvm_e500.h | 2 + arch/powerpc/include/asm/kvm_host.h | 4 + arch/powerpc/include/asm/kvm_ppc.h | 9 ++ arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/44x.c | 10 ++ arch/powerpc/kvm/44x_emulate.c | 2 - arch/powerpc/kvm/booke.c | 154 +++++++++++++++++++++++++++++- arch/powerpc/kvm/booke_interrupts.S | 1 - arch/powerpc/kvm/e500.c | 76 ++++++++++++++ arch/powerpc/kvm/e500_emulate.c | 7 +- arch/powerpc/kvm/e500_tlb.c | 13 +++- arch/powerpc/kvm/emulate.c | 15 ++- arch/powerpc/kvm/powerpc.c | 17 +++ arch/powerpc/kvm/timing.c | 21 +++- include/linux/kvm.h | 1 + 19 files changed, 505 insertions(+), 21 deletions(-)
PATCH 1/6 KVM: PPC: e500: emulate SVR
From: Scott Wood <[email protected]>
Return the actual host SVR for now, as we already do for PVR. Eventually we may support Qemu overriding PVR/SVR if the situation is appropriate, once we implement KVM_SET_SREGS on e500.
--- arch/powerpc/include/asm/kvm_e500.h | 1 + arch/powerpc/kvm/e500.c | 1 + arch/powerpc/kvm/e500_emulate.c | 2 ++ 3 files changed, 4 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/kvm_e500.h +1 -0
@@ -43,6 +43,7 @@ struct kvmppc_vcpu_e500 {u32 host_pid[E500_PID_NUM ];u32 pid[E500_PID_NUM ]; +u32 svr;u32 mas0;u32 mas1;
arch/powerpc/kvm/e500.c +1 -0
@@ -63,6 +63,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)/* Registers init */ vcpu->arch.pvr =mfspr (SPRN_PVR ); + vcpu_e500->svr =mfspr (SPRN_SVR );/* Since booke kvm only support one core, update all vcpus' PIR to 0 */ vcpu->vcpu_id =0 ;
arch/powerpc/kvm/e500_emulate.c +2 -0
@@ -175,6 +175,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)kvmppc_set_gpr (vcpu, rt, vcpu_e500->hid0);break ;case SPRN_HID1 :kvmppc_set_gpr (vcpu, rt, vcpu_e500->hid1);break ; +case SPRN_SVR : +kvmppc_set_gpr (vcpu, rt, vcpu_e500->svr);break ;case SPRN_MMUCSR0 :kvmppc_set_gpr (vcpu, rt,0 );break ;
Signature · 1 line
1.6.0.2
PATCH 3/6 KVM: PPC: use ticks, not usecs, for exit timing
In reply to Alexander GrafFrom: Stuart Yoder <[email protected]>
Convert to microseconds when displaying
(with fix from Bharat Bhushan <[email protected]>).
This reduces rounding error with large quantities of short exits.
--- arch/powerpc/kvm/timing.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)
arch/powerpc/kvm/timing.c +17 -4
@@ -151,17 +151,30 @@ static int kvmppc_exit_timing_show(struct seq_file *m, void *private) {struct kvm_vcpu *vcpu = m->private;int i; +u64 min, max, sum, sum_quad;seq_printf (m,"%s" ,"type count min max sum sum_squared\n" ); +for (i =0 ; i < __NUMBER_OF_KVM_EXIT_TYPES; i++) { + + min = vcpu->arch.timing_min_duration[i]; +do_div (min, tb_ticks_per_usec); + max = vcpu->arch.timing_max_duration[i]; +do_div (max, tb_ticks_per_usec); + sum = vcpu->arch.timing_sum_duration[i]; +do_div (sum, tb_ticks_per_usec); + sum_quad = vcpu->arch.timing_sum_quad_duration[i]; +do_div (sum_quad, tb_ticks_per_usec); +seq_printf (m,"%12s %10d %10lld %10lld %20lld %20lld\n" , kvm_exit_names[i], vcpu->arch.timing_count_type[i], - vcpu->arch.timing_min_duration[i], - vcpu->arch.timing_max_duration[i], - vcpu->arch.timing_sum_duration[i], - vcpu->arch.timing_sum_quad_duration[i]); + min, + max, + sum, + sum_quad); + }return 0 ; }
Signature · 1 line
1.6.0.2
PATCH 2/6 KVM: PPC: fix exit accounting for SPRs, tlbwe, tlbsx
In reply to Alexander GrafFrom: Scott Wood <[email protected]>
The exit type setting for mfspr/mtspr is moved from 44x to toplevel SPR emulation. This enables it on e500, and makes sure that all SPRs are covered.
Exit accounting for tlbwe and tlbsx is added to e500.
--- arch/powerpc/kvm/44x_emulate.c | 2 -- arch/powerpc/kvm/e500_tlb.c | 5 ++++- arch/powerpc/kvm/emulate.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-)
arch/powerpc/kvm/44x_emulate.c +0 -2
@@ -158,7 +158,6 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) emulated =kvmppc_booke_emulate_mtspr (vcpu, sprn, rs); } -kvmppc_set_exit_type (vcpu,EMULATED_MTSPR_EXITS );return emulated; }
@@ -179,7 +178,6 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) emulated =kvmppc_booke_emulate_mfspr (vcpu, sprn, rt); } -kvmppc_set_exit_type (vcpu,EMULATED_MFSPR_EXITS );return emulated; }
arch/powerpc/kvm/e500_tlb.c +4 -1
@@ -1,5 +1,5 @@/* -* Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. +* Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved. * * Author: Yu Liu, [email protected] *
@@ -24,6 +24,7 @@#include "../mm/mmu_decl.h" #include "e500_tlb.h" #include "trace.h" +#include "timing.h" #define to_htlb1_esel (esel) (tlb1_entry_num - (esel) - 1)
@@ -506,6 +507,7 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) vcpu_e500->mas7 =0 ; } +kvmppc_set_exit_type (vcpu,EMULATED_TLBSX_EXITS );return EMULATE_DONE ; }
@@ -571,6 +573,7 @@ int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)write_host_tlbe (vcpu_e500, stlbsel, sesel); } +kvmppc_set_exit_type (vcpu,EMULATED_TLBWE_EXITS );return EMULATE_DONE ; }
arch/powerpc/kvm/emulate.c +2 -0
@@ -294,6 +294,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) }break ; } +kvmppc_set_exit_type (vcpu,EMULATED_MFSPR_EXITS );break ;case OP_31_XOP_STHX :
@@ -363,6 +364,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)printk ("mtspr: unknown spr %x\n" , sprn);break ; } +kvmppc_set_exit_type (vcpu,EMULATED_MTSPR_EXITS );break ;case OP_31_XOP_DCBI :
Signature · 1 line
1.6.0.2
PATCH 4/6 KVM: PPC: booke: save/restore VRSAVE (a.k.a. USPRG0)
In reply to Alexander GrafFrom: Scott Wood <[email protected]>
Linux doesn't use USPRG0 (now renamed VRSAVE in the architecture, even when Altivec isn't involved), but a guest might.
--- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/booke_interrupts.S | 1 - arch/powerpc/kvm/powerpc.c | 13 +++++++++++++ 4 files changed, 15 insertions(+), 1 deletions(-)
arch/powerpc/include/asm/kvm_host.h +1 -0
@@ -223,6 +223,7 @@ struct kvm_vcpu_arch {ulong hflags;ulong guest_owned_ext;#endif +u32 vrsave;/* also USPRG0 */ u32 mmucr;ulong sprg4;ulong sprg5;
arch/powerpc/kernel/asm-offsets.c +1 -0
@@ -395,6 +395,7 @@ int main(void) DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); DEFINE(VCPU_GPRS, offsetof(struct kvm_vcpu, arch.gpr)); + DEFINE(VCPU_VRSAVE, offsetof(struct kvm_vcpu, arch.vrsave)); DEFINE(VCPU_SPRG4, offsetof(struct kvm_vcpu, arch.sprg4)); DEFINE(VCPU_SPRG5, offsetof(struct kvm_vcpu, arch.sprg5)); DEFINE(VCPU_SPRG6, offsetof(struct kvm_vcpu, arch.sprg6));
arch/powerpc/kvm/booke_interrupts.S +0 -1
@@ -380,7 +380,6 @@ lightweight_exit: * because host interrupt handlers would get confused. */ lwz r1, VCPU_GPR(r1)(r4) - /* XXX handle USPRG0 */ /* Host interrupt handlers may have clobbered these guest-readable * SPRGs, so we need to reload them here with the guest's values. */ lwz r3, VCPU_SPRG4(r4)
arch/powerpc/kvm/powerpc.c +13 -0
@@ -298,12 +298,25 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)void kvm_arch_vcpu_load (struct kvm_vcpu *vcpu,int cpu) { +#ifdef CONFIG_BOOKE +/* +* vrsave (formerly usprg0) isn't used by Linux, but may +* be used by the guest. +* +* On non-booke this is associated with Altivec and +* is handled by code in book3s.c. +*/ +mtspr (SPRN_VRSAVE , vcpu->arch.vrsave); +#endif kvmppc_core_vcpu_load (vcpu, cpu); }void kvm_arch_vcpu_put (struct kvm_vcpu *vcpu) {kvmppc_core_vcpu_put (vcpu); +#ifdef CONFIG_BOOKE + vcpu->arch.vrsave =mfspr (SPRN_VRSAVE ); +#endif } int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
Signature · 1 line
1.6.0.2
PATCH 5/6 KVM: PPC: booke: add sregs support
In reply to Alexander GrafFrom: Scott Wood <[email protected]>
--- Documentation/kvm/api.txt | 6 +- arch/powerpc/include/asm/kvm.h | 184 +++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/kvm_44x.h | 1 - arch/powerpc/include/asm/kvm_e500.h | 1 + arch/powerpc/include/asm/kvm_host.h | 3 + arch/powerpc/include/asm/kvm_ppc.h | 9 ++ arch/powerpc/kvm/44x.c | 10 ++ arch/powerpc/kvm/booke.c | 154 +++++++++++++++++++++++++++++- arch/powerpc/kvm/e500.c | 75 ++++++++++++++ arch/powerpc/kvm/e500_emulate.c | 5 +- arch/powerpc/kvm/e500_tlb.c | 8 ++ arch/powerpc/kvm/emulate.c | 13 ++- arch/powerpc/kvm/powerpc.c | 4 + include/linux/kvm.h | 1 + 14 files changed, 461 insertions(+), 13 deletions(-)
Documentation/kvm/api.txt +4 -2
@@ -261,7 +261,7 @@ See KVM_GET_REGS for the data structure. 4.13 KVM_GET_SREGS Capability: basic -Architectures: x86 +Architectures: x86, ppc Type: vcpu ioctl Parameters: struct kvm_sregs (out) Returns: 0 on success, -1 on error
@@ -279,6 +279,8 @@ struct kvm_sregs { __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; }; +/* ppc -- see arch/powerpc/include/asm/kvm.h */ + interrupt_bitmap is a bitmap of pending external interrupts. At most one bit may be set. This interrupt has been acknowledged by the APIC but not yet injected into the cpu core.
@@ -286,7 +288,7 @@ but not yet injected into the cpu core. 4.14 KVM_SET_SREGS Capability: basic -Architectures: x86 +Architectures: x86, ppc Type: vcpu ioctl Parameters: struct kvm_sregs (in) Returns: 0 on success, -1 on error
arch/powerpc/include/asm/kvm.h +184 -0
196 lines not on this page · raw message
arch/powerpc/include/asm/kvm_44x.h +0 -1
@@ -61,7 +61,6 @@ static inline struct kvmppc_vcpu_44x *to_44x(struct kvm_vcpu *vcpu) return container_of(vcpu, struct kvmppc_vcpu_44x, vcpu); } -void kvmppc_set_pid (struct kvm_vcpu *vcpu,u32 new_pid);void kvmppc_44x_tlb_put (struct kvm_vcpu *vcpu);void kvmppc_44x_tlb_load (struct kvm_vcpu *vcpu);
arch/powerpc/include/asm/kvm_e500.h +1 -0
@@ -59,6 +59,7 @@ struct kvmppc_vcpu_e500 {u32 hid1;u32 tlb0cfg;u32 tlb1cfg; +u64 mcar;struct kvm_vcpu vcpu; };
arch/powerpc/include/asm/kvm_host.h +3 -0
@@ -233,6 +233,9 @@ struct kvm_vcpu_arch {ulong csrr1;ulong dsrr0;ulong dsrr1; +ulong mcsrr0; +ulong mcsrr1; +ulong mcsr;ulong esr;u32 dec;u32 decar;
arch/powerpc/include/asm/kvm_ppc.h +9 -0
@@ -61,6 +61,7 @@ extern int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu);extern int kvmppc_emulate_mmio (struct kvm_run *run,struct kvm_vcpu *vcpu);extern void kvmppc_emulate_dec (struct kvm_vcpu *vcpu); +extern u32 kvmppc_get_dec (struct kvm_vcpu *vcpu,u64 tb);/* Core-specific hooks */
@@ -142,4 +143,12 @@ static inline u32 kvmppc_set_field(u64 inst, int msb, int lsb, int value) return r; } +void kvmppc_core_get_sregs (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs); +int kvmppc_core_set_sregs (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs); + +void kvmppc_get_sregs_ivor (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs); +int kvmppc_set_sregs_ivor (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs); + +void kvmppc_set_pid (struct kvm_vcpu *vcpu,u32 pid); +#endif /* __POWERPC_KVM_PPC_H__ */
arch/powerpc/kvm/44x.c +10 -0
@@ -107,6 +107,16 @@ int kvmppc_core_vcpu_translate(struct kvm_vcpu *vcpu,return 0 ; } +void kvmppc_core_get_sregs (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs) +{ +kvmppc_get_sregs_ivor (vcpu, sregs); +} + +int kvmppc_core_set_sregs (struct kvm_vcpu *vcpu,struct kvm_sregs *sregs) +{ +return kvmppc_set_sregs_ivor (vcpu, sregs); +} +struct kvm_vcpu *kvmppc_core_vcpu_create (struct kvm *kvm,unsigned int id) {struct kvmppc_vcpu_44x *vcpu_44x;
arch/powerpc/kvm/booke.c +152 -2
174 lines not on this page · raw message
arch/powerpc/kvm/e500.c +75 -0
81 lines not on this page · raw message
arch/powerpc/kvm/e500_emulate.c +2 -3
@@ -1,5 +1,5 @@/* -* Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved. +* Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved. * * Author: Yu Liu, <[email protected]> *
@@ -78,8 +78,7 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)switch (sprn) {case SPRN_PID : - vcpu_e500->pid[0 ] = vcpu->arch.shadow_pid = - vcpu->arch.pid = spr_val; +kvmppc_set_pid (vcpu, spr_val);break ;case SPRN_PID1 : vcpu_e500->pid[1 ] = spr_val;break ;
arch/powerpc/kvm/e500_tlb.c +8 -0
@@ -675,6 +675,14 @@ int kvmppc_e500_tlb_search(struct kvm_vcpu *vcpu,return -1 ; } +void kvmppc_set_pid (struct kvm_vcpu *vcpu,u32 pid) +{ +struct kvmppc_vcpu_e500 *vcpu_e500 =to_e500 (vcpu); + + vcpu_e500->pid[0 ] = vcpu->arch.shadow_pid = + vcpu->arch.pid = pid; +} +void kvmppc_e500_tlb_setup (struct kvmppc_vcpu_e500 *vcpu_e500) {struct tlbe *tlbe;
arch/powerpc/kvm/emulate.c +8 -5
@@ -114,6 +114,12 @@ void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) } } +u32 kvmppc_get_dec (struct kvm_vcpu *vcpu,u64 tb) +{ +u64 jd = tb - vcpu->arch.dec_jiffies; +return vcpu->arch.dec - jd; +} +/* XXX to do: * lhax * lhaux
@@ -279,11 +285,8 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)case SPRN_DEC : { -u64 jd =get_tb () - vcpu->arch.dec_jiffies; -kvmppc_set_gpr (vcpu, rt, vcpu->arch.dec - jd); -pr_debug ("mfDEC: %x - %llx = %lx\n" , - vcpu->arch.dec, jd, -kvmppc_get_gpr (vcpu, rt)); +kvmppc_set_gpr (vcpu, rt, +kvmppc_get_dec (vcpu,get_tb ()));break ; }default :
arch/powerpc/kvm/powerpc.c +4 -0
@@ -175,7 +175,11 @@ int kvm_dev_ioctl_check_extension(long ext)int r;switch (ext) { +#ifdef CONFIG_BOOKE +case KVM_CAP_PPC_BOOKE_SREGS : +#else case KVM_CAP_PPC_SEGSTATE : +#endif case KVM_CAP_PPC_PAIRED_SINGLES :case KVM_CAP_PPC_UNSET_IRQ :case KVM_CAP_PPC_IRQ_LEVEL :
include/linux/kvm.h +1 -0
@@ -543,6 +543,7 @@ struct kvm_ppc_pvinfo {#define KVM_CAP_ASYNC_PF 59#define KVM_CAP_TSC_CONTROL 60#define KVM_CAP_GET_TSC_KHZ 61 +#define KVM_CAP_PPC_BOOKE_SREGS 62#ifdef KVM_CAP_IRQ_ROUTING
Signature · 1 line
1.6.0.2
PATCH 6/6 KVM: PPC: Add kvm headers to headers_install
In reply to Alexander GrafWhen running "make headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.
So let's add the arch/powerpc/include/asm headers that are important for KVM to the headers_install list.
--- arch/powerpc/include/asm/Kbuild | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/Kbuild +2 -0
@@ -34,3 +34,5 @@ header-y += termios.h header-y += types.h header-y += ucontext.h header-y += unistd.h +header-y += kvm.h +header-y += kvm_para.h
Signature · 1 line
1.6.0.2
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 17 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>--- arch/powerpc/include/asm/Kbuild | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/powerpc/include/asm/Kbuild +0
-0
arch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 5 lines
arch/powerpc/include/asm/Kbuild +2
-0@@ -34,3 +34,5 @@ header-y += termios.h header-y += types.h header-y += ucontext.h header-y += unistd.h +header-y += kvm.h +header-y += kvm_para.h
Weird, just worked for me with current kvm master without your patch.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 13 lines · Jan Kiszka
Quoted 12 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/include/asm/Kbuild| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 12 lines
arch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 10 lines
arch/powerpc/include/asm/Kbuild +0
-0@@ -34,3 +34,5 @@ header-y += termios.hheader-y +=
types.h
header-y +=ucontext.h
header-y +=unistd.harch/powerpc/include/asm/Kbuild +2
-0+header-y += kvm.h +header-y += kvm_para.hWeird, just worked for me with current kvm master without your patch.
Oh? You did do make headers_install and it did push the correct headers to usr?
Alex
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 29 lines · Alexander Graf
Quoted 13 lines · Jan Kiszka
Quoted 12 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/include/asm/Kbuild| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)Quoted 12 lines
arch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 10 lines
arch/powerpc/include/asm/Kbuild +0
-0@@ -34,3 +34,5 @@ header-y += termios.hheader-y +=
types.h
header-y +=ucontext.h
header-y +=unistd.harch/powerpc/include/asm/Kbuild +2
-0+header-y += kvm.h +header-y += kvm_para.hWeird, just worked for me with current kvm master without your patch.
Quoted 1 line
Oh? You did do make
headers_installand it did push the correct headers to usr?
I strongly suspect. It's all documented in my header patch.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 30 lines · Jan Kiszka
Quoted 29 lines · Alexander Graf
Quoted 25 lines · Jan Kiszka
Quoted 20 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/include/asm/Kbuild| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)arch/powerpc/include/asm/Kbuild +0
-0@@ -34,3 +34,5 @@ header-y += termios.hheader-y +=
types.h
header-y +=ucontext.h
header-y +=unistd.harch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 2 lines
arch/powerpc/include/asm/Kbuild +2
-0+header-y += kvm.h +header-y += kvm_para.hWeird, just worked for me with current kvm master without your patch.
Quoted 3 lines
Quoted 1 line
Oh? You did do make
headers_installand it did push the correct headers to usr?I strongly suspect. It's all documented in my header patch.
Your header patch manually copies the respective files, so you're not using that code path there?
Alex
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 33 lines · Alexander Graf
Quoted 30 lines · Jan Kiszka
Quoted 29 lines · Alexander Graf
Quoted 25 lines · Jan Kiszka
Quoted 20 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/include/asm/Kbuild| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)arch/powerpc/include/asm/Kbuild +0
-0@@ -34,3 +34,5 @@ header-y += termios.hheader-y +=
types.h
header-y +=ucontext.h
header-y +=unistd.harch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 2 lines
arch/powerpc/include/asm/Kbuild +2
-0+header-y += kvm.h +header-y += kvm_para.hWeird, just worked for me with current kvm master without your patch.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Oh? You did do make
headers_installand it did push the correct headers to usr?I strongly suspect. It's all documented in my header patch.
Your header patch manually copies the respective files, so you're not using that code path there?
I'm copying from the output dir auf headers_install (INSTALL_HDR_PATH). What step does this patch target at?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 36 lines · Jan Kiszka
Quoted 35 lines · Alexander Graf
Quoted 32 lines · Jan Kiszka
Quoted 30 lines · Alexander Graf
Quoted 13 lines · Jan Kiszka
Quoted 12 lines · Alexander Graf
When running "make
headers_install", we don't install kvm headers on PPC. This confuses Qemu, as it really wants to include kernel headers to know the ioctl structs.So let's add the
arch/powerpc/include/asmheaders that are important for KVM to theheaders_installlist.Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/include/asm/Kbuild| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)Quoted 12 lines
arch/powerpc/include/asm/Kbuild header-y += termios.h · line 38
Quoted 10 lines
arch/powerpc/include/asm/Kbuild +0
-0@@ -34,3 +34,5 @@ header-y += termios.hheader-y +=
types.h
header-y +=ucontext.h
header-y +=unistd.harch/powerpc/include/asm/Kbuild +2
-0+header-y += kvm.h +header-y += kvm_para.hWeird, just worked for me with current kvm master without your patch.
Oh? You did do make
headers_installand it did push the correct headers to usr?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
I strongly suspect. It's all documented in my header patch.
Your header patch manually copies the respective files, so you're not using that code path there?
I'm copying from the output dir auf
headers_install(INSTALL_HDR_PATH). What step does this patch target at?
Ah, there it is. I find makefiles very hard to read :). No idea why it worked for you. I can certainly run make headers_install on a ppc machine later today and see if it magically started working on current master. :)
Alex
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 1 line · On Tue, 3 May 2011 17:14:48 +0200 Alexander Graf <[email protected]> wrote:
Ah, there it is. I find makefiles very hard to read :). No idea why it worked for you. I can certainly run make
headers_installon a ppc machine later today and see if it magically started working on current master. :)
I've beet getting ppc asm/kvm.h using headers_install for a while now.
Look at the top of include/asm-generic/Kbuild.asm
-Scott
Re: [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install
Quoted 8 lines · Scott Wood
Quoted 1 line · On Tue, 3 May 2011 17:14:48 +0200 Alexander Graf <[email protected]> wrote:
Ah, there it is. I find makefiles very hard to read :). No idea why it worked for you. I can certainly run make
headers_installon a ppc machine later today and see if it magically started working on current master. :)I've beet getting ppc
asm/kvm.husingheaders_installfor a while now.Look at the top of
include/asm-generic/Kbuild.asm
Hum. I just tried again and really do get the headers. I wonder why it didn't work for me before? Either way, I'll drop the patch :). Thanks guys!
Alex