Re: [kvm-devel] kvm somehow exempt from frequency scaling?

2007-04-10 Thread Avi Kivity
David Abrahams wrote: > on Mon Apr 09 2007, Avi Kivity wrote: > > >> David Abrahams wrote: >> >>> I'm using the ondemand governor on my core duo laptop. Even when kvm >>> is taking 99% of the CPU, somehow instead of the ondemand governor >>> kicking it up to 2GHz, the CPU is still running

Re: [kvm-devel] Is KVM source code available through http or https?

2007-04-10 Thread Avi Kivity
Li, Xin B wrote: >> If the git: and svn: protocols are blocked for you, I can try to make >> > them > >> available through http. >> >> > > That would be helpful, thanks! > -Xin > http://www.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git, branch avi/master Subversion is not yet a

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: > I still have not converted over to kerneldoc format as I cannot find an > example anywhere yet, and the documentation under > Documentation/kernel-doc-nano-HOWTO was a little vague. Pointers appreciated. > > see lib/kref.c for an example. -- Do not meddle in the

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: >>> + >>> +struct kvm_irqdevice; >>> + >>> +struct kvm_irqsink { >>> + void (*raise_intr)(struct kvm_irqsink *this, >>> + struct kvm_irqdevice *dev); >>> + >>> + void *private; >>> +}; >>> + >>> +struct kvm_irqdevice { >>> + int (*pending)(struct

Re: [kvm-devel] [PATCH] Support for in-kernel mmio handlers

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: > Hi Avi, > > I believe I have incorporated all of the changes requested. Please find the > result of that patch inline. > > Note that I finally understand what you were getting at with the array of > objects thing. I didn't change it yet for the same reason that you > m

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Evgeniy Polyakov
On Mon, Apr 09, 2007 at 04:38:18PM +0300, Avi Kivity ([EMAIL PROTECTED]) wrote: > >But I don't get this "we can enhance the kernel but not userspace" vibe > >8( > > > > I've been waiting for network aio since ~2003. If it arrives in the > next few days, I'm all for it; much more than kvm can u

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Christoph Hellwig
On Mon, Apr 09, 2007 at 04:27:54PM -0400, Gregory Haskins wrote: > Here is the next pass of the patch with changes based on feedback. > > I still have not converted over to kerneldoc format as I cannot find an > example anywhere yet, and the documentation under > Documentation/kernel-doc-nano-HO

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Evgeniy Polyakov
On Tue, Apr 10, 2007 at 11:19:52AM +0300, Avi Kivity ([EMAIL PROTECTED]) wrote: > I meant, network aio in the mainline kernel. I am aware of the various > out-of-tree implementations. If potential users do not pay attention to initial implementaion, it is quite hard to them to get into. But actua

Re: [kvm-devel] kvm somehow exempt from frequency scaling?

2007-04-10 Thread Michael Riepe
Hi! Avi Kivity wrote: > Sounds like ondemand is broken. Maybe it only switches when the load rises in user space. With KVM, it appears in system space. Got to cross-check that on my Core Duo. Michael. - Take Surveys. Earn

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Avi Kivity
Evgeniy Polyakov wrote: >>> But it looks from this discussion, that it will not prevent from >>> changing in-kernel driver - place a hook into skb allocation path and >>> allocate data from opposing memory - get pages from another side and put >>> them into fragments, then copy headers into skb->da

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 3:52 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > > Hmm. The current code is synchronous in nature (the vcpu is never > executing while we raise an interrupt, so the INTA is never needed, as > we can ensure the cpu can process the interr

Re: [kvm-devel] [PATCH] Support for in-kernel mmio handlers

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 3:56 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > Gregory Haskins wrote: >> >> Note that I finally understand what you were getting at with the array of > objects thing. I didn't change it yet for the same reason that you > mentioned:

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Evgeniy Polyakov
On Tue, Apr 10, 2007 at 02:21:24PM +0300, Avi Kivity ([EMAIL PROTECTED]) wrote: > >You want to implement zero-copy network device between host and guest, if > >I understood this thread correctly? > >So, for sending part, device allocates pages from receiver's memory (or > >from shared memory), rece

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: >> The NIC raises an interrupt, we have to interrupt the guest to see if its >> current IF/cr8 permit interrupt injection, and if not, we have to keep >> the interrupt in the irqdevice and request an exit when IF/cr8 permit >> injection. >> > > Exactly. The INTR really

Re: [kvm-devel] [PATCH] Support for in-kernel mmio handlers

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: >> Given that the first consumer is the local apic, it makes sense to add >> the vcpu- local bus first, no? >> > > I'm confused. I thought you didn't like the vpcu-local bus? I pulled it > based on your feedback :) Please advise. > > Sorry, my mistake. -- erro

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Avi Kivity
Evgeniy Polyakov wrote: >> This is what Xen does. It is actually less performant than copying, IIRC. >> >> The problem with flipping pages around is that physical addresses are >> cached both in the kvm mmu and in the on-chip tlbs, necessitating >> expensive page table walks and tlb invalidation

Re: [kvm-devel] Bug in drivers/kvm/vmx.c inject_rmode_irq()?

2007-04-10 Thread Avi Kivity
Eric Sesterhenn / Snakebyte wrote: > * Avi Kivity ([EMAIL PROTECTED]) wrote: > >> Eric Sesterhenn / Snakebyte wrote: >> >>> i was testing the gcc 4.3 against the latest git kernel, and got a >>> warning in your code (using -Wstrict-overflow=1) >>> >>> drivers/kvm/vmx.c: In function 'inject_

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Evgeniy Polyakov
On Tue, Apr 10, 2007 at 03:17:45PM +0300, Avi Kivity ([EMAIL PROTECTED]) wrote: > >Check a link please in case we are talking about different ideas: > >http://marc.info/?l=linux-netdev&m=112262743505711&w=2 > > > > > > I don't really understand what you're testing there. in particular, how > c

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Avi Kivity
Evgeniy Polyakov wrote: > On Tue, Apr 10, 2007 at 03:17:45PM +0300, Avi Kivity ([EMAIL PROTECTED]) > wrote: > >>> Check a link please in case we are talking about different ideas: >>> http://marc.info/?l=linux-netdev&m=112262743505711&w=2 >>> >>> >>> >> I don't really understand what y

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Avi Kivity
Evgeniy Polyakov wrote: > On Mon, Apr 09, 2007 at 04:38:18PM +0300, Avi Kivity ([EMAIL PROTECTED]) > wrote: > >>> But I don't get this "we can enhance the kernel but not userspace" vibe >>> 8( >>> >>> >> I've been waiting for network aio since ~2003. If it arrives in the >> next few

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 8:01 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > Gregory Haskins wrote: >> >> And if we replace read_vector() with ack(), how do we learn of the vector in > the first place? I am guessing that you are thinking that both pending and >

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: On Tue, Apr 10, 2007 at 8:01 AM, in message <[EMAIL PROTECTED]>, > Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Gregory Haskins wrote: >> >>> And if we replace read_vector() with ack(), how do we learn of the vector >>> in >>> >> the first

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 10:46 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > > Both the vcpu and the irqdevice are involved in the decision: > > - the vcpu holds the IF (or rather, the "interrupt window") > - the lapic holds the tpr > - but the vcpu contains t

[kvm-devel] Fwd: Re: [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 11:39 AM, in message <[EMAIL PROTECTED]>, Gregory Haskins wrote: > We could change the API to handle the pending condition as a tri-level I just thought of a better way. Leave the return value as a boolean, but use the concept of the mask_reasons. It simplifies the

Re: [kvm-devel] [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: > >> where - >pending() has to program a tpr exit if current tpr masks an >> interrupt. >> > > I wasn't planning on the irqdevice having this type of control because I > assumed we would always have these exit types set, but you have highlighted > an interesting po

Re: [kvm-devel] Fwd: Re: [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Avi Kivity
Gregory Haskins wrote: On Tue, Apr 10, 2007 at 11:39 AM, in message <[EMAIL PROTECTED]>, > Gregory Haskins wrote: > >> We could change the API to handle the pending condition as a tri-level >> > > I just thought of a better way. Leave the return value as a boolean, but

Re: [kvm-devel] Is KVM source code available through http or https?

2007-04-10 Thread Avi Kivity
Li, Xin B wrote: > I can't get the source code through http or https, can anyone help? > > A snapshot (kvm-18) is available through the sourceforge download page (http://sourceforge.net/project/showfiles.php?group_id=180599). If the git: and svn: protocols are blocked for you, I can try to

Re: [kvm-devel] Fwd: Re: [PATCH] Add irqdevice interface + userint implementation

2007-04-10 Thread Gregory Haskins
>>> On Tue, Apr 10, 2007 at 12:11 PM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > > > It's more complex than that; Isn't it always ;) > you need to program the hardware to exit on > a specific threshold level of tpr values (e.g. exit when tpr <= n). > Agreed, but

Re: [kvm-devel] kvm-18 breaks Cisco VPN on WinXP SP1

2007-04-10 Thread Leslie Mann
Avi Kivity <[EMAIL PROTECTED]> writes: > That's a good indication the problem is with handling I/O instructions. > I have an image that exhibits similar behavior (but on Windows chkdsk on > boot) so I'll try debugging that. If that does not work I'll try to > send you debug patches. > Would be

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Rusty Russell
On Mon, 2007-04-09 at 16:38 +0300, Avi Kivity wrote: > Moreover, some things just don't lend themselves to a userspace > abstraction. If we want to expose tso (tcp segmentation offload), we > can easily do so with a kernel driver since the kernel interfaces are > all tso aware. Tacking on tso

Re: [kvm-devel] QEMU PIC indirection patch for in-kernel APIC work

2007-04-10 Thread Avi Kivity
Rusty Russell wrote: > On Mon, 2007-04-09 at 16:38 +0300, Avi Kivity wrote: > >> Moreover, some things just don't lend themselves to a userspace >> abstraction. If we want to expose tso (tcp segmentation offload), we >> can easily do so with a kernel driver since the kernel interfaces are >>