Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Avi Kivity
Anthony Liguori wrote: >> >> In a PV environment why not just pass an initial cookie/hash/whatever >> as a command-line argument/register/memory-space to the underlying >> kernel? >> > > You can't pass a command line argument to Windows (at least, not easily > AFAIK). You could get away with

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Anthony Liguori
Eric Van Hensbergen wrote: > On 5/21/07, Anthony Liguori <[EMAIL PROTECTED]> wrote: >> ron minnich wrote: >> > OK, so what are we doing here? We're using a PCI abstraction, as a >> > common abstraction,which is not common really, because we don't have a >> > common abstraction? So we describe all t

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Eric Van Hensbergen
On 5/21/07, Anthony Liguori <[EMAIL PROTECTED]> wrote: > ron minnich wrote: > > OK, so what are we doing here? We're using a PCI abstraction, as a > > common abstraction,which is not common really, because we don't have a > > common abstraction? So we describe all these non-pci resources with a > >

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Anthony Liguori
ron minnich wrote: > On 5/21/07, Anthony Liguori <[EMAIL PROTECTED]> wrote: >> No. You're confusing PV device discovery with the actual paravirtual >> transport. In a fully virtual environment like KVM, a PCI bus is >> present. You need some way for the guest to detect that a PV device is >> pre

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread ron minnich
On 5/21/07, Anthony Liguori <[EMAIL PROTECTED]> wrote: > ron minnich wrote: > > OK, so what are we doing here? We're using a PCI abstraction, as a > > common abstraction,which is not common really, because we don't have a > > common abstraction? So we describe all these non-pci resources with a > >

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Anthony Liguori
ron minnich wrote: > OK, so what are we doing here? We're using a PCI abstraction, as a > common abstraction,which is not common really, because we don't have a > common abstraction? So we describe all these non-pci resources with a > pci abstraction? > No. You're confusing PV device discovery

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread ron minnich
OK, so what are we doing here? We're using a PCI abstraction, as a common abstraction,which is not common really, because we don't have a common abstraction? So we describe all these non-pci resources with a pci abstraction? I don't get it at all. I really think the resource interface idea I menti

Re: [kvm-devel] New VT-D spec available

2007-05-21 Thread Nakajima, Jun
Avi Kivity wrote: > Nakajima, Jun wrote: > > An updated specification (Rev 1.0 update) of Intel(r) virtualization > > technology for Directed I/O is now available on Intel web site: > > > > http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Di > > rect_IO.pdf > > > > The speci

Re: [kvm-devel] qemu/kvm seems to take ALSA all for itself?

2007-05-21 Thread Jon
On Mon, May 21, 2007 at 08:37:48AM -0700, Shahar Frank wrote: > You have to make QEMU use ALSA as your sound system and specify a > mixer device for input and output. This can be done using some > environment variables that should be set before the qemu binary is > run. >From the ALSA wiki: "

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Anthony Liguori
Arnd Bergmann wrote: > On Monday 21 May 2007, Christian Borntraeger wrote: > >>> This is quite easy with KVM. I like the approach that vmchannel has >>> taken. A simple PCI device. That gives you a discovery mechanism for >>> shared memory and an interrupt and then you can just implement a

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Carsten Otte
Avi Kivity wrote: > Interesting. And if you have multiple guest virtual to guest physical > translations, the hardware knows to flush them when the host virtual to > host physical entry is flushed? Yes, the cpu flushes all of them. so long, Carsten -

Re: [kvm-devel] qemu/kvm seems to take ALSA all for itself?

2007-05-21 Thread Shahar Frank
You have to make QEMU use ALSA as your sound system and specify a mixer device for input and output. This can be done using some environment variables that should be set before the qemu binary is run. The following may work: export QEMU_AUDIO_DRV=alsa # the default is OSS if I recall corr

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Avi Kivity
Carsten Otte wrote: > Avi Kivity wrote: >> Interesting. And if you have multiple guest virtual to guest >> physical translations, the hardware knows to flush them when the host >> virtual to host physical entry is flushed? > Yes, the cpu flushes all of them. > Ooh, I want one too. -- error co

Re: [kvm-devel] qemu/kvm seems to take ALSA all for itself?

2007-05-21 Thread Avi Kivity
David Abrahams wrote: > When I have windows XP running under kvm, I get > > [EMAIL PROTECTED]:/tmp$ aplay /usr/share/sounds/gaim/receive.wav > ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave > aplay: main:550: audio open error: Device or resource busy > > As soon as I shut

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Avi Kivity
Carsten Otte wrote: > >> An example: suppose host pfn 7 is allocated as guest pfn 8 (and >> therefore, userspace address 0x8000). Suppose further the guest maps >> guest pfn 8 to guest virtual 0x1 and guest virtal 0x11000. >> Aren't there three tlbs you need to shoot down? host virtual >

[kvm-devel] qemu/kvm seems to take ALSA all for itself?

2007-05-21 Thread David Abrahams
When I have windows XP running under kvm, I get [EMAIL PROTECTED]:/tmp$ aplay /usr/share/sounds/gaim/receive.wav ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave aplay: main:550: audio open error: Device or resource busy As soon as I shut down my VM, though, it works perf

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Carsten Otte
Avi Kivity wrote: > The pte is stored/cached in two different places (in addition to what > Linux already knows about): > > - in the shadow page tables > - in the tlbs of the vcpus that may have referenced the page > > so, when swapping out the page, you need to use the kvm rmap to find all > s

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Arnd Bergmann
On Monday 21 May 2007, Cornelia Huck wrote: > IRQ numbers are evil :) yes, but getting rid of them is an entirely different discussion. I really think that in the first step, you should be able to use its "external interrupts" with the same request_irq interface as the other architectures. Fundam

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Avi Kivity
Carsten Otte wrote: > Avi Kivity wrote: >> For one thing, kvm uses page->private to store its rmap information. >> This is lost if regular mappings are used. >> >> More importantly, both the regular address space and kvm will want to >> be called when a page is paged out, while this is doable, i

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Carsten Otte
Avi Kivity wrote: > For one thing, kvm uses page->private to store its rmap information. > This is lost if regular mappings are used. > > More importantly, both the regular address space and kvm will want to be > called when a page is paged out, while this is doable, it isn't easy. Taking the l

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Cornelia Huck
On Mon, 21 May 2007 13:28:03 +0200, Arnd Bergmann <[EMAIL PROTECTED]> wrote: > We've had the same discussion about PCI as virtual device abstraction > recently when hpa made the suggestions to get a set of PCI device > numbers registered for Linux. (If you want to read it up, it's the thread at h

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Christoph Hellwig
On Mon, May 21, 2007 at 11:17:06AM +0200, Carsten Otte wrote: > Shaohua Li wrote: > > +EXPORT_SYMBOL(delete_from_swap_cache); > > +EXPORT_SYMBOL(move_to_swap_cache); > > +EXPORT_SYMBOL(lookup_swap_cache); > > +EXPORT_SYMBOL(read_swap_cache_async); > > +EXPORT_SYMBOL(get_swap_page); > > +EXPORT_SYMB

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Arnd Bergmann
On Monday 21 May 2007, Christian Borntraeger wrote: > > This is quite easy with KVM.  I like the approach that vmchannel has > > taken.  A simple PCI device.  That gives you a discovery mechanism for > > shared memory and an interrupt and then you can just implement a ring > > queue using those

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Christian Borntraeger
Anthony Liguori <[EMAIL PROTECTED]> wrote on 17.05.2007 16:22:23: > Is there anything that explains what the fields in sockaddr mean: > > sa_family_tsiucv_family; > unsigned shortsiucv_port;/* Reserved */ > unsigned intsiucv_addr;/* Reserved */ > char

Re: [kvm-devel] [PATCH/RFC] KVM: Adds support for halting in the kernel

2007-05-21 Thread Carsten Otte
Gregory Haskins wrote: > I was thinking about some of the issues that we are dealing with > w.r.t. signalling a sleeping userspace (eventfd, signals, etc). I was > wondering if perhaps we were looking at the problem the wrong way. Can we > perform halts in the kernel and therefore elimina

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Cornelia Huck
On Mon, 21 May 2007 11:07:07 +0200, Christian Borntraeger <[EMAIL PROTECTED]> wrote: > > This is quite easy with KVM. I like the approach that vmchannel has > > taken. A simple PCI device. That gives you a discovery mechanism for > > shared memory and an interrupt and then you can just implem

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Avi Kivity
Carsten Otte wrote: > Shaohua Li wrote: > >> +EXPORT_SYMBOL(delete_from_swap_cache); >> +EXPORT_SYMBOL(move_to_swap_cache); >> +EXPORT_SYMBOL(lookup_swap_cache); >> +EXPORT_SYMBOL(read_swap_cache_async); >> +EXPORT_SYMBOL(get_swap_page); >> +EXPORT_SYMBOL(swap_free); >> +EXPORT_SYMBOL(add_to_pag

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Avi Kivity
Shaohua Li wrote: > Hi, > I saw some discussions on the topic but no progress. I did an > experiment to make guest page be allocated dynamically and swap out. > please see attachment patches. It's not yet for merge but I'd like get > some suggestions and help. Patches (against kvm-19) work here but

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Carsten Otte
Shaohua Li wrote: > +EXPORT_SYMBOL(delete_from_swap_cache); > +EXPORT_SYMBOL(move_to_swap_cache); > +EXPORT_SYMBOL(lookup_swap_cache); > +EXPORT_SYMBOL(read_swap_cache_async); > +EXPORT_SYMBOL(get_swap_page); > +EXPORT_SYMBOL(swap_free); > +EXPORT_SYMBOL(add_to_page_cache_lru); Use EXPORT_SYMBOL_GP

Re: [kvm-devel] 1 Bug found for compiling on 32 Bit machine

2007-05-21 Thread Daniel Hecken
Avi Kivity schrieb: > Daniel Hecken wrote: >> Hello, >> >> I have found an issue for compiling on 32 Bit machines in >> v2.6.22-rc1-g1ab29f3. >> >> I'm not sure if I have set the #ifdef CONFIG_X86_64 at the right place. >> Please have a look at it. With this patch v2.6.22-rc1-g1ab29f3 compiles >> u

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Christian Borntraeger
> This is quite easy with KVM. I like the approach that vmchannel has > taken. A simple PCI device. That gives you a discovery mechanism for > shared memory and an interrupt and then you can just implement a ring > queue using those mechanisms (along with a PIO port for signaling from > the

Re: [kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Dor Laor
>Hi, >I saw some discussions on the topic but no progress. I did an >experiment to make guest page be allocated dynamically and swap out. Wow, that's a very nice/welcomed/hard experience. >please see attachment patches. It's not yet for merge but I'd like get >some suggestions and help. Patches (

Re: [kvm-devel] 1 Bug found for compiling on 32 Bit machine

2007-05-21 Thread Avi Kivity
Daniel Hecken wrote: > Hello, > > I have found an issue for compiling on 32 Bit machines in > v2.6.22-rc1-g1ab29f3. > > I'm not sure if I have set the #ifdef CONFIG_X86_64 at the right place. > Please have a look at it. With this patch v2.6.22-rc1-g1ab29f3 compiles > und runs fine. > > v2.6.22-

[kvm-devel] [RFC]kvm: swapout guest page

2007-05-21 Thread Shaohua Li
Hi, I saw some discussions on the topic but no progress. I did an experiment to make guest page be allocated dynamically and swap out. please see attachment patches. It's not yet for merge but I'd like get some suggestions and help. Patches (against kvm-19) work here but maybe not very stable as t

[kvm-devel] 1 Bug found for compiling on 32 Bit machine

2007-05-21 Thread Daniel Hecken
Hello, I have found an issue for compiling on 32 Bit machines in v2.6.22-rc1-g1ab29f3. I'm not sure if I have set the #ifdef CONFIG_X86_64 at the right place. Please have a look at it. With this patch v2.6.22-rc1-g1ab29f3 compiles und runs fine. Daniel Signed-off-by: Daniel Hecken [EMAIL PROTEC