Re: [PATCH v1 1/5] perf: add context parameter to perf_event overflow handler

2011-06-05 Thread Avi Kivity
On 06/03/2011 05:41 PM, Peter Zijlstra wrote: On Wed, 2011-05-11 at 11:55 -0400, Avi Kivity wrote: +++ b/include/linux/perf_event.h @@ -709,7 +709,9 @@ struct perf_buffer { struct perf_sample_data; -typedef void (*perf_overflow_handler_t)(struct perf_event *, int, +typedef void

Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to guests

2011-06-05 Thread Avi Kivity
On 06/03/2011 05:41 PM, Peter Zijlstra wrote: On Wed, 2011-05-11 at 11:55 -0400, Avi Kivity wrote: - counters that have PMI (interrupt) enabled stop counting after the interrupt is signalled. This is because we need one-shot samples that keep counting, which perf doesn't support yet

Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to guests

2011-06-05 Thread Avi Kivity
On 06/03/2011 05:41 PM, Peter Zijlstra wrote: On Wed, 2011-05-11 at 11:55 -0400, Avi Kivity wrote: +static u64 read_gp_pmc(struct kvm_pmu *pmu, struct kvm_pmc *pmc) +{ + u64 counter, enabled, running; + + counter = pmc-counter; + + if (pmc-perf_event) +

Re: KVM induced panic on 2.6.38[2367] 2.6.39

2011-06-05 Thread Avi Kivity
On 06/03/2011 04:38 PM, Brad Campbell wrote: Is there anyone who can point me at the appropriate cage to rattle? I know it appears to be a netfilter issue, but I don't seem to be able to get a message to the list (and I am subscribed to it and have been getting mail for months) and I'm not

Re: IRQ issue on graphics card passthrough

2011-06-05 Thread Jan Kiszka
On 2011-06-04 19:50, André Weidemann wrote: Hi, as mentioned before I have successfully passed a graphics card from a Linux host to VM using qemu-kvm. Shortly after starting the VM and before Windows7 initializes the graphics card, info pci looks like this: Bus 0, device 4, function

Re: [PATCH] kvm tools, ui: Optimize SDL updates

2011-06-05 Thread Alexander Graf
On 04.06.2011, at 18:49, Sasha Levin wrote: On Sat, 2011-06-04 at 17:40 +0200, Alexander Graf wrote: On 04.06.2011, at 17:34, Sasha Levin wrote: On Sat, 2011-06-04 at 17:21 +0200, Alexander Graf wrote: On 04.06.2011, at 16:19, Sasha Levin wrote: On Sat, 2011-06-04 at 15:48 +0200,

Re: [PATCH] kvm tools, ui: Optimize SDL updates

2011-06-05 Thread Alon Levy
On Sat, Jun 04, 2011 at 01:07:09PM +0200, Alexander Graf wrote: On 04.06.2011, at 12:54, Ingo Molnar wrote: * Alexander Graf ag...@suse.de wrote: On 04.06.2011, at 12:42, Ingo Molnar wrote: * Alexander Graf ag...@suse.de wrote: I wrote up 2 virtio-fb implementations

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-05 Thread Avi Kivity
On 05/30/2011 03:36 PM, Ingo Molnar wrote: You are probably right about 1024 CPUs. Right now i can produce something similar to it: 42 vcpus on a single CPU: $ taskse 1 kvm run --cpus 42 And that hangs early on during bootup, around: [0.236000] Disabled fast string operations [

Re: IRQ issue on graphics card passthrough

2011-06-05 Thread André Weidemann
Hi Jan, On 05.06.2011 10:30, Jan Kiszka wrote: On 2011-06-04 19:50, André Weidemann wrote: Hi, as mentioned before I have successfully passed a graphics card from a Linux host to VM using qemu-kvm. Shortly after starting the VM and before Windows7 initializes the graphics card, info pci looks

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/03/2011 06:53 PM, Jan Kiszka wrote: @@ -310,6 +310,7 @@ struct kvm_translation { struct kvm_interrupt { /* in */ __u32 irq; + __u8 raise; }; This touches an existing ABI and corrupts the definition of KVM_INTERRUPT IOCTL. The might exist jurisdictions

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/03/2011 06:03 PM, Christoffer Dall wrote: Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. + +struct kvm_regs { + __u32 regs0_7[8]; /* Unbanked regs. (r0 -

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Avi Kivity
On 06/03/2011 06:03 PM, Christoffer Dall wrote: Initializes a blank level-1 translation table for the second stage translation and handles freeing it as well. + start = (unsigned long)kvm, + end = start + sizeof(struct kvm); + ret = create_hyp_mappings(kvm_hyp_pgd, start,

Re: [PATCH v3 7/8] ARM: KVM: Handle guest faults in KVM

2011-06-05 Thread Avi Kivity
On 06/03/2011 06:04 PM, Christoffer Dall wrote: Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. +static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, + gfn_t gfn, struct kvm_memory_slot *memslot)

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/03/2011 06:03 PM, Christoffer Dall wrote: Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. (series review - please have a cover letter in the future for this stuff)

Re: KVM induced panic on 2.6.38[2367] 2.6.39

2011-06-05 Thread Brad Campbell
On 05/06/11 16:14, Avi Kivity wrote: On 06/03/2011 04:38 PM, Brad Campbell wrote: Is there anyone who can point me at the appropriate cage to rattle? I know it appears to be a netfilter issue, but I don't seem to be able to get a message to the list (and I am subscribed to it and have been

Re: KVM induced panic on 2.6.38[2367] 2.6.39

2011-06-05 Thread Avi Kivity
On 06/05/2011 04:45 PM, Brad Campbell wrote: The mailing list might be set not to send your own mails back to you. Check the list archive. Yep, I did that first.. Given the response to previous issues along the same line, it looks a bit like I just remember not to actually use the system in

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 03:52 PM, Avi Kivity wrote: (series review - please have a cover letter in the future for this stuff) Oh - you did - but in a separate thread. Oh well. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 4:00 PM, Avi Kivity a...@redhat.com wrote: On 06/05/2011 03:52 PM, Avi Kivity wrote: (series review - please have a cover letter in the future for this stuff) Oh - you did - but in a separate thread.  Oh well. My internet router decided to reset immediately after

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 14:21, Avi Kivity wrote: On 06/03/2011 06:53 PM, Jan Kiszka wrote: @@ -310,6 +310,7 @@ struct kvm_translation { struct kvm_interrupt { /* in */ __u32 irq; +__u8 raise; }; This touches an existing ABI and corrupts the definition of

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 05:13 PM, Jan Kiszka wrote: On 2011-06-05 14:21, Avi Kivity wrote: On 06/03/2011 06:53 PM, Jan Kiszka wrote: @@ -310,6 +310,7 @@ struct kvm_translation { struct kvm_interrupt { /* in */ __u32 irq; +__u8 raise; }; This touches

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 05:13 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 4:00 PM, Avi Kivitya...@redhat.com wrote: On 06/05/2011 03:52 PM, Avi Kivity wrote: (series review - please have a cover letter in the future for this stuff) Oh - you did - but in a separate thread. Oh well. My

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivity a...@redhat.com wrote: On 06/03/2011 06:03 PM, Christoffer Dall wrote: Initializes a blank level-1 translation table for the second stage translation and handles freeing it as well. +       start = (unsigned long)kvm, +       end = start +

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Avi Kivity
On 06/05/2011 05:50 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivitya...@redhat.com wrote: On 06/03/2011 06:03 PM, Christoffer Dall wrote: Initializes a blank level-1 translation table for the second stage translation and handles freeing it as well. + start

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 16:18, Avi Kivity wrote: On 06/05/2011 05:13 PM, Jan Kiszka wrote: On 2011-06-05 14:21, Avi Kivity wrote: On 06/03/2011 06:53 PM, Jan Kiszka wrote: @@ -310,6 +310,7 @@ struct kvm_translation { struct kvm_interrupt { /* in */ __u32 irq; +

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 17:10, Avi Kivity wrote: On 06/05/2011 05:58 PM, Jan Kiszka wrote: Note that with KVM_SET_GSI_ROUTING (bad name for ARM...) we can even choose if an irq line is connected to a kernel-emulated interrupt controller or to the core's irq input. Makes some sense: Add

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Avi Kivity
On 06/05/2011 05:53 PM, Avi Kivity wrote: On 06/05/2011 05:50 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivitya...@redhat.com wrote: On 06/03/2011 06:03 PM, Christoffer Dall wrote: Initializes a blank level-1 translation table for the second stage translation and

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 06:14 PM, Jan Kiszka wrote: An additional advantage is that this is a vm ioctl, not a vcpu ioctl, so no need to interrupt the vcpu thread in userspace in order to queue an interrupt. Of course, it still happens in the kernel, but it's easier for userspace to implement its

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 5:14 PM, Avi Kivity a...@redhat.com wrote: On 06/05/2011 05:53 PM, Avi Kivity wrote: On 06/05/2011 05:50 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivitya...@redhat.com  wrote:  On 06/03/2011 06:03 PM, Christoffer Dall wrote:  Initializes a

Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup

2011-06-05 Thread Avi Kivity
On 06/05/2011 06:27 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 5:14 PM, Avi Kivitya...@redhat.com wrote: On 06/05/2011 05:53 PM, Avi Kivity wrote: On 06/05/2011 05:50 PM, Christoffer Dall wrote: On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivitya...@redhat.comwrote: On

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 2:36 PM, Avi Kivity a...@redhat.com wrote: On 06/03/2011 06:03 PM, Christoffer Dall wrote: Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. +

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 07:03 PM, Christoffer Dall wrote: + + /* Banked FIQ registers r8-r12 */ + if (reg_num= 8reg_num= 12) { + if (mode == MODE_FIQ) { + reg_idx = reg_num - 8; /* 0=r8, ..., 4=r12 */ +

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 4:58 PM, Jan Kiszka jan.kis...@web.de wrote: On 2011-06-05 16:18, Avi Kivity wrote: On 06/05/2011 05:13 PM, Jan Kiszka wrote: On 2011-06-05 14:21, Avi Kivity wrote:  On 06/03/2011 06:53 PM, Jan Kiszka wrote:     @@ -310,6 +310,7 @@ struct kvm_translation {      

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Christoffer Dall
On Sun, Jun 5, 2011 at 5:14 PM, Jan Kiszka jan.kis...@web.de wrote: On 2011-06-05 17:10, Avi Kivity wrote: On 06/05/2011 05:58 PM, Jan Kiszka wrote:  Note that with KVM_SET_GSI_ROUTING (bad name for ARM...) we can even  choose if an irq line is connected to a kernel-emulated interrupt  

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 07:25 PM, Christoffer Dall wrote: An additional advantage is that this is a vm ioctl, not a vcpu ioctl, so no need to interrupt the vcpu thread in userspace in order to queue an interrupt. Of course, it still happens in the kernel, but it's easier for userspace to

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 18:28, Avi Kivity wrote: On 06/05/2011 07:25 PM, Christoffer Dall wrote: An additional advantage is that this is a vm ioctl, not a vcpu ioctl, so no need to interrupt the vcpu thread in userspace in order to queue an interrupt. Of course, it still happens in the kernel,

Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 07:24 PM, Christoffer Dall wrote: On ARM, we are talking about IRQs and FIQs, both of which can be lowered and raised. In other words, four values. Two lines per cpu, each of which can be raised or lowered. But instead of this, you want to use KVM_IRQ_LINE and just assume one

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Avi Kivity
On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate what you mean here? I'm not really following. Are you suggesting a new arch-generic interface? (Pardon my ignorance). Using KVM_IRQ_LINE everywhere except s390, not just in x86 and ARM. An in-kernel MPIC implementation is

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate what you mean here? I'm not really following. Are you suggesting a new arch-generic interface? (Pardon my ignorance). Using KVM_IRQ_LINE everywhere except s390, not just in

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate what you mean here? I'm not really following. Are you suggesting a new arch-generic interface? (Pardon my ignorance). Using

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate what you mean here? I'm not really following. Are you suggesting a new arch-generic

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 19:54, Alexander Graf wrote: On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate what you mean here? I'm not really following.

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 19:56, Jan Kiszka wrote: On 2011-06-05 19:54, Alexander Graf wrote: On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM, Alexander Graf wrote: Could you elaborate

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 20:00, Alexander Graf wrote: On 05.06.2011, at 19:56, Jan Kiszka wrote: On 2011-06-05 19:54, Alexander Graf wrote: On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at 18:33, Avi Kivity wrote: On 06/05/2011 07:30 PM,

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Alexander Graf
On 05.06.2011, at 20:04, Jan Kiszka wrote: On 2011-06-05 20:00, Alexander Graf wrote: On 05.06.2011, at 19:56, Jan Kiszka wrote: On 2011-06-05 19:54, Alexander Graf wrote: On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19, Alexander Graf wrote: On 05.06.2011, at

Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

2011-06-05 Thread Jan Kiszka
On 2011-06-05 20:12, Alexander Graf wrote: On 05.06.2011, at 20:04, Jan Kiszka wrote: On 2011-06-05 20:00, Alexander Graf wrote: On 05.06.2011, at 19:56, Jan Kiszka wrote: On 2011-06-05 19:54, Alexander Graf wrote: On 05.06.2011, at 19:48, Jan Kiszka wrote: On 2011-06-05 19:19,