Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: +static void kvm_pte_clear(struct mm_struct *mm, + unsigned long addr, pte_t *ptep) +{ +pte_t pte = {0}; Surely there's a nice macro for creating a pte from an int? Perhaps my grep'ing skills are weak, but I don't seem to see any. Were you thinking of

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: Perhaps my grep'ing skills are weak, but I don't seem to see any. Were you thinking of something in particular? __pte(), of course. Sheesh. ;) J - This SF.net email is sponsored by DB2

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Anthony Liguori wrote: Perhaps my grep'ing skills are weak, but I don't seem to see any. Were you thinking of something in particular? __pte(), of course. Sheesh. ;) How could I have missed something that is so clearly named! :-) Regards,

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-18 Thread Avi Kivity
Anthony Liguori wrote: +static int kvm_hypercall_mmu_write(struct kvm_vcpu *vcpu, gva_t addr, +unsigned long size, unsigned long a0, +unsigned long a1) +{ + gpa_t gpa = vcpu-mmu.gva_to_gpa(vcpu, addr); + u64 value; + +

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-18 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: +static int kvm_hypercall_mmu_write(struct kvm_vcpu *vcpu, gva_t addr, + unsigned long size, unsigned long a0, + unsigned long a1) +{ +gpa_t gpa = vcpu-mmu.gva_to_gpa(vcpu, addr); +u64 value; + +if

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-18 Thread Avi Kivity
Anthony Liguori wrote: Hypercalls should return kvm-specific error codes (defined in include/linux/kvm_para.h), not Linux error codes, as they could be used in operating systems which have different values for E2BIG and friends. If Linux's errnos are stable, we could just use them and

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-18 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Hypercalls should return kvm-specific error codes (defined in include/linux/kvm_para.h), not Linux error codes, as they could be used in operating systems which have different values for E2BIG and friends. If Linux's errnos are stable, we could

[kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-17 Thread Anthony Liguori
Regards, Anthony Liguori Subject: [PATCH] KVM: Add paravirt MMU write support Author: Anthony Liguori [EMAIL PROTECTED] On at least AMD hardware, hypercall based manipulation of page table memory is significantly faster than taking a page fault. Additionally, using hypercalls to manipulation