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] [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] [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] [PATCH] Support for in-kernel mmio handlers

2007-04-09 Thread Gregory Haskins
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 mentioned: reduction of churn. Howeve

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

2007-04-08 Thread Avi Kivity
This has significant changes, so merits a review. Gregory Haskins wrote: > diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h > index fceeb84..c1923df 100644 > --- a/drivers/kvm/kvm.h > +++ b/drivers/kvm/kvm.h > @@ -236,6 +236,56 @@ struct kvm_pio_request { > int rep; > }; > > +struct k

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

2007-04-08 Thread Avi Kivity
Gregory Haskins wrote: > >>> + int (*in_range)(struct kvm_io_device *this, gpa_t addr); >>> >>> >> Do you see any reason to have this as a callback and not a pair of gpas? >> > > I believe Dor replied earlier stating the reason of being able to support > holes. Another reason

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

2007-04-05 Thread Gregory Haskins
Hi Avi, I have addressed your comments and re-attached the fixed up patch. Most of the things you suggested I implemented, but a few I didnt so I will comment inline... >>> On Thu, Apr 5, 2007 at 3:07 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > Gregory Hask

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

2007-04-05 Thread Avi Kivity
Gregory Haskins wrote: >> The pit/pic are pio devices, not mmio, so they need their own bus. >> > > Yeah, I knew that but I haven't coded any support for anything but mmio > yet. I explicitly chose the "kvm_io_XX" name instead of kvm_mmio_XXX in > hopes that I can use the same structure f

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

2007-04-05 Thread Gregory Haskins
>>> On Thu, Apr 5, 2007 at 3:46 AM, in message <[EMAIL PROTECTED]>, Avi Kivity <[EMAIL PROTECTED]> wrote: > > The pit/pic are pio devices, not mmio, so they need their own bus. Good morning! Yeah, I knew that but I haven't coded any support for anything but mmio yet. I explicitly chose the

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

2007-04-05 Thread Avi Kivity
Gregory Haskins wrote: > The MMIO registration code has been broken out as a new patch from the > in-kernel APIC work with the following changes per Avi's request: > > 1) Supports dynamic registration > 2) Uses gpa_t addresses > 3) Explicit per-cpu mappings > > In addition, I have added the concep

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

2007-04-05 Thread Dor Laor
>> Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> >> >> --- >> drivers/kvm/kvm.h | 50 >+ >> drivers/kvm/kvm_main.c | 53 +++--- >- >> 2 files changed, 94 insertions(+), 9 deletions(-) >> >> diff --git

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

2007-04-05 Thread Avi Kivity
Gregory Haskins wrote: > The MMIO registration code has been broken out as a new patch from the > in-kernel APIC work with the following changes per Avi's request: > > 1) Supports dynamic registration > 2) Uses gpa_t addresses > 3) Explicit per-cpu mappings > > In addition, I have added the concep

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

2007-04-04 Thread Chris Wright
* Gregory Haskins ([EMAIL PROTECTED]) wrote: > LAPICs can be remapped on a per-cpu basis via an MSR, whereas something > like an IOAPIC is a system-wide resource. Yes, I see now, no vcpu in kvm_io_device callbacks' context (admittedly, I'm used to the Xen implementation ;-) > >> +struct kvm_io_de

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

2007-04-04 Thread Gregory Haskins
The attachment contains fixes based on the feedback from Chris. Thanks Chris! Regards, -Greg diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index fceeb84..0e6eb04 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -236,6 +236,54 @@ struct kvm_pio_request { int rep; }; +str

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

2007-04-04 Thread Gregory Haskins
Hi Chris, Thanks for the feedback. Ive answered inline below. >>> On Wed, Apr 4, 2007 at 6:48 PM, in message <[EMAIL PROTECTED]>, Chris Wright <[EMAIL PROTECTED]> wrote: > * Gregory Haskins ([EMAIL PROTECTED]) wrote: >> The MMIO registration code has been broken out as a new patch from the >

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

2007-04-04 Thread Chris Wright
* Gregory Haskins ([EMAIL PROTECTED]) wrote: > The MMIO registration code has been broken out as a new patch from the > in-kernel APIC work with the following changes per Avi's request: > > 1) Supports dynamic registration > 2) Uses gpa_t addresses > 3) Explicit per-cpu mappings > > In addition,