* Balloon driver?
@ 2007-06-05 10:55 Jun Koi
[not found] ` <fdaac4d50706050355t3e34e9caj5fe9f3f38613bcbf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Jun Koi @ 2007-06-05 10:55 UTC (permalink / raw)
To: kvm-devel
Hi,
I want to try the balloon driver. Do we have it in any git tree?
The git tree I am having now only has master branch, and nothing else.
(Maybe the balloon driver is not working yet, but I am curious when
see the userspace code in user/)
Thanks,
Jun
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <fdaac4d50706050355t3e34e9caj5fe9f3f38613bcbf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-05 11:49 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C1A61E8-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Dor Laor @ 2007-06-05 11:49 UTC (permalink / raw)
To: Jun Koi, kvm-devel
>Hi,
>
>I want to try the balloon driver. Do we have it in any git tree?
>
>The git tree I am having now only has master branch, and nothing else.
>
>(Maybe the balloon driver is not working yet, but I am curious when
>see the userspace code in user/)
>
>Thanks,
>Jun
You're welcome to test it, it is under
git://kvm.qumranet.com/home/dor/src/linux-2.6
Checkout the build-trunk branch.
I don't have the time to merge it currently. Note that there are also
some more balloon drivers for other architecture (s390).
The Linux guest driver change the balloon size using a simple char
device.
In our windows drivers we control the balloon from the host using pci
device. Qemu handle/controls the balloon hypercalls for mgmt reasons.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <64F9B87B6B770947A9F8391472E032160C1A61E8-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-06-06 2:20 ` Jun Koi
[not found] ` <fdaac4d50706051920w17cfe72am13d9d5213b344c9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Jun Koi @ 2007-06-06 2:20 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel
Hi Dor,
On 6/5/07, Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> >Hi,
> >
> >I want to try the balloon driver. Do we have it in any git tree?
> >
> >The git tree I am having now only has master branch, and nothing else.
> >
> >(Maybe the balloon driver is not working yet, but I am curious when
> >see the userspace code in user/)
> >
> >Thanks,
> >Jun
>
> You're welcome to test it, it is under
> git://kvm.qumranet.com/home/dor/src/linux-2.6
> Checkout the build-trunk branch.
>
> I don't have the time to merge it currently. Note that there are also
> some more balloon drivers for other architecture (s390).
>
> The Linux guest driver change the balloon size using a simple char
> device.
Now I see the userspace tool again, and it seems it must be used from
inside the guest??
So we cannot balloon up/down a guest from host machine?
I will try to see if it works.
Thanks,
Jun
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <fdaac4d50706051920w17cfe72am13d9d5213b344c9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-06 10:24 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F84A-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Dor Laor @ 2007-06-06 10:24 UTC (permalink / raw)
To: Jun Koi; +Cc: kvm-devel
>> >I want to try the balloon driver. Do we have it in any git tree?
>> >
>> >The git tree I am having now only has master branch, and nothing
else.
>> >
>> >(Maybe the balloon driver is not working yet, but I am curious when
>> >see the userspace code in user/)
>> >
>> >Thanks,
>> >Jun
>>
>> You're welcome to test it, it is under
>> git://kvm.qumranet.com/home/dor/src/linux-2.6
>> Checkout the build-trunk branch.
>>
>> I don't have the time to merge it currently. Note that there are also
>> some more balloon drivers for other architecture (s390).
>>
>> The Linux guest driver change the balloon size using a simple char
>> device.
>
>Now I see the userspace tool again, and it seems it must be used from
>inside the guest??
That's right. That's the Linux guest side implementation.
For windows we use the vmchannel option in qemu (qemu/hw/hypercall)
interface. It is a qemu device from the host side that can be connected
to tcp/unix socket. The guest sees it as a pci device.
Both ends can define any protocol over the channel.
So our windows guest passes balloon inflate/deflate commands/acks.
What's your motivation of ballooning? If it's important I can add the
pci interface + push it upstream.
>
>So we cannot balloon up/down a guest from host machine?
>
>I will try to see if it works.
>
>Thanks,
>Jun
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F84A-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-06-06 10:53 ` Jun Koi
[not found] ` <fdaac4d50706060353o12fe931du8250b8bd15b256d8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Jun Koi @ 2007-06-06 10:53 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel
On 6/6/07, Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> >> >I want to try the balloon driver. Do we have it in any git tree?
> >> >
> >> >The git tree I am having now only has master branch, and nothing
> else.
> >> >
> >> >(Maybe the balloon driver is not working yet, but I am curious when
> >> >see the userspace code in user/)
> >> >
> >> >Thanks,
> >> >Jun
> >>
> >> You're welcome to test it, it is under
> >> git://kvm.qumranet.com/home/dor/src/linux-2.6
> >> Checkout the build-trunk branch.
> >>
> >> I don't have the time to merge it currently. Note that there are also
> >> some more balloon drivers for other architecture (s390).
> >>
> >> The Linux guest driver change the balloon size using a simple char
> >> device.
> >
> >Now I see the userspace tool again, and it seems it must be used from
> >inside the guest??
>
> That's right. That's the Linux guest side implementation.
> For windows we use the vmchannel option in qemu (qemu/hw/hypercall)
> interface. It is a qemu device from the host side that can be connected
> to tcp/unix socket. The guest sees it as a pci device.
> Both ends can define any protocol over the channel.
>
> So our windows guest passes balloon inflate/deflate commands/acks.
>
> What's your motivation of ballooning? If it's important I can add the
> pci interface + push it upstream.
I looked at the current balloon driver of Linux, and really I dont
like it. Why we have a different solution from Windows'? It is better
we have the same way of implementing it on different OS.
So the PCI interface is definetely better IMO. Please put it online,
so we can test it.
Thanks,
Jun
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <fdaac4d50706060353o12fe931du8250b8bd15b256d8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-06 12:40 ` Carsten Otte
[not found] ` <4666AB2E.8030502-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Carsten Otte @ 2007-06-06 12:40 UTC (permalink / raw)
To: Jun Koi; +Cc: kvm-devel
Jun Koi wrote:
> So the PCI interface is definetely better IMO. Please put it online,
> so we can test it.
Why would we want a PCI interface to do balooning? All we need is a
simple interface. It _is_ a mess for platforms that don't have PCI.
And it is a mess for paravirtulaization - will we create a virtual PCI
bus just for this?
so long,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666AB2E.8030502-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-06-06 14:03 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F90E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Dor Laor @ 2007-06-06 14:03 UTC (permalink / raw)
To: carsteno-tA70FqPdS9bQT0dZR+AlfA, Jun Koi; +Cc: kvm-devel
>Jun Koi wrote:
>> So the PCI interface is definetely better IMO. Please put it online,
>> so we can test it.
>Why would we want a PCI interface to do balooning? All we need is a
>simple interface. It _is_ a mess for platforms that don't have PCI.
>And it is a mess for paravirtulaization - will we create a virtual PCI
>bus just for this?
I agree that pci interface isn't ideal, the advantage is that platforms
that do support pci don't have to implement a virtualized bus, and pci
is PnP device. This was the motivation behind using it, especially for
Windows.
Now that more platforms are joining the KVM wagon, we should define a
common bus. PCI was a overkill anyway - its irq are shared and we don't
have to use its io/mmio areas.
Do you guys have something to start with?
>
>so long,
>Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F90E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-06-06 16:04 ` Carsten Otte
[not found] ` <4666DB13.7080504-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Carsten Otte @ 2007-06-06 16:04 UTC (permalink / raw)
To: Dor Laor; +Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA, kvm-devel
Dor Laor wrote:
> I agree that pci interface isn't ideal, the advantage is that platforms
> that do support pci don't have to implement a virtualized bus, and pci
> is PnP device. This was the motivation behind using it, especially for
> Windows.
In understand that requirement, and I think being able to surface
paravirtual functions/devices to the guest as PCI device needs to be a
key feature. For windows guests.
> Now that more platforms are joining the KVM wagon, we should define a
> common bus. PCI was a overkill anyway - its irq are shared and we don't
> have to use its io/mmio areas.
> Do you guys have something to start with?
We do have something basic, our vdev bus. The bad thing is, it is
platform specific. I really prefer to aim for an idea that Arnd came
up with when discussing this issue:
We could define a virtual device bus. We would have platform specific
bus implementations which rely on hypercalls, interrupts, and shared
memory in the pure paravirtual case. And we need a second bus driver,
which is based on a pci device. Just similar to the situation where a
PCI device is a USB host adapter.
Now functionality like device drivers can sit on top of the
abstraction layer. We need to invent a similar abstraction on the
hypervisor side, which is a tricky task indeed.
The best approach into this direction I have seen so far is not our
own vdev thing but Rusty's virtio infrastructure. That's what I think
I would start with.
so long,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666DB13.7080504-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-06-06 16:17 ` Avi Kivity
[not found] ` <4666DE28.1060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-06 16:38 ` Arnd Bergmann
1 sibling, 1 reply; 17+ messages in thread
From: Avi Kivity @ 2007-06-06 16:17 UTC (permalink / raw)
To: carsteno-tA70FqPdS9bQT0dZR+AlfA; +Cc: kvm-devel
Carsten Otte wrote:
> The best approach into this direction I have seen so far is not our
> own vdev thing but Rusty's virtio infrastructure. That's what I think
> I would start with.
>
>
I agree. We need a Lego set containing the following bricks:
- bus interfaces: pci bus, hypercall-based bus, xenbus
- functionality: net driver, block driver
- virtio data path: xen rings + grant tables + event channels, kvm rings
+ kmap_atomic + interrupts
So you can write a 4-line driver that glues the pci bus interface to the
net functionality driver to kvm virtio backend, and take the rest of the
day off.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666DB13.7080504-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-06-06 16:17 ` Avi Kivity
@ 2007-06-06 16:38 ` Arnd Bergmann
[not found] ` <200706061838.29017.arnd-r2nGTMty4D4@public.gmane.org>
1 sibling, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2007-06-06 16:38 UTC (permalink / raw)
To: carsteno-tA70FqPdS9bQT0dZR+AlfA; +Cc: kvm-devel
On Wednesday 06 June 2007, Carsten Otte wrote:
> Dor Laor wrote:
>
> > Now that more platforms are joining the KVM wagon, we should define a
> > common bus. PCI was a overkill anyway - its irq are shared and we don't
> > have to use its io/mmio areas.
> > Do you guys have something to start with?
> We do have something basic, our vdev bus. The bad thing is, it is
> platform specific. I really prefer to aim for an idea that Arnd came
> up with when discussing this issue:
> We could define a virtual device bus.
I guess, more specifically, you mean a bus_type in Linux terminology.
> Now functionality like device drivers can sit on top of the
> abstraction layer. We need to invent a similar abstraction on the
> hypervisor side, which is a tricky task indeed.
> The best approach into this direction I have seen so far is not our
> own vdev thing but Rusty's virtio infrastructure. That's what I think
> I would start with.
So you suggest having a PCI driver that exports a virtio device for
each PCI device it matches? Sounds fine to me, though it goes beyond
what I think Rusty had in mind with his latest set of virtio
patches.
Note that contrary to what I may have said previously, I think that
such a virtio device on top of a PCI device need not use any PCI
specific APIs (readl/writel, pci_map_*, ioremap_, pci_dev->irq, ...)
but could do all of that by means of a hypercall interface. The
only real point we want to use PCI for is to find out about the
existence of a device and to get an identifier that gets passed
to the hypercalls.
Arnd <><
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666DE28.1060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-06-06 16:41 ` Jun Koi
[not found] ` <fdaac4d50706060941u2ebd0180o5b6075ceb370db1b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-07 1:30 ` Rusty Russell
1 sibling, 1 reply; 17+ messages in thread
From: Jun Koi @ 2007-06-06 16:41 UTC (permalink / raw)
To: Avi Kivity, Dor Laor; +Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA, kvm-devel
On 6/7/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> Carsten Otte wrote:
> > The best approach into this direction I have seen so far is not our
> > own vdev thing but Rusty's virtio infrastructure. That's what I think
> > I would start with.
> >
> >
>
> I agree. We need a Lego set containing the following bricks:
>
> - bus interfaces: pci bus, hypercall-based bus, xenbus
> - functionality: net driver, block driver
> - virtio data path: xen rings + grant tables + event channels, kvm rings
> + kmap_atomic + interrupts
>
Avi, may you explain what is the role of the "bus interface" in the
whole picture? To autodetect and probe new virtual device??
About the balloon driver, I looked at the current code, and what I
dont like is its approach: it needs to be operated from inside the
guest, which is not the way we usually want to do. So something like
Xen balloon driver is certainly better.
Dor, why dont you get the idea from Xen balloon, but take your way?
Thanks,
Jun
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <200706061838.29017.arnd-r2nGTMty4D4@public.gmane.org>
@ 2007-06-06 16:46 ` Carsten Otte
[not found] ` <4666E4D4.7090901-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-06-08 21:41 ` Dor Laor
1 sibling, 1 reply; 17+ messages in thread
From: Carsten Otte @ 2007-06-06 16:46 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA, kvm-devel
Arnd Bergmann wrote:
> On Wednesday 06 June 2007, Carsten Otte wrote:
>> We do have something basic, our vdev bus. The bad thing is, it is
>> platform specific. I really prefer to aim for an idea that Arnd came
>> up with when discussing this issue:
>> We could define a virtual device bus.
>
> I guess, more specifically, you mean a bus_type in Linux terminology.
Indeed, sorry for the confusion.
> So you suggest having a PCI driver that exports a virtio device for
> each PCI device it matches? Sounds fine to me, though it goes beyond
> what I think Rusty had in mind with his latest set of virtio
> patches.
We don't need a PCI device per virtio device. We can have a PCI device
that is a virtio bus driver.
> Note that contrary to what I may have said previously, I think that
> such a virtio device on top of a PCI device need not use any PCI
> specific APIs (readl/writel, pci_map_*, ioremap_, pci_dev->irq, ...)
> but could do all of that by means of a hypercall interface. The
> only real point we want to use PCI for is to find out about the
> existence of a device and to get an identifier that gets passed
> to the hypercalls.
True. We need to abstract how things get passed. Simple primitives,
but good enough to provide all functionality needed by the exploiters.
See Avis Lego box.
so long,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <fdaac4d50706060941u2ebd0180o5b6075ceb370db1b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-06 16:52 ` Avi Kivity
2007-06-06 22:06 ` Arnd Bergmann
1 sibling, 0 replies; 17+ messages in thread
From: Avi Kivity @ 2007-06-06 16:52 UTC (permalink / raw)
To: Jun Koi; +Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA, kvm-devel
Jun Koi wrote:
> On 6/7/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>> Carsten Otte wrote:
>> > The best approach into this direction I have seen so far is not our
>> > own vdev thing but Rusty's virtio infrastructure. That's what I think
>> > I would start with.
>> >
>> >
>>
>> I agree. We need a Lego set containing the following bricks:
>>
>> - bus interfaces: pci bus, hypercall-based bus, xenbus
>> - functionality: net driver, block driver
>> - virtio data path: xen rings + grant tables + event channels, kvm rings
>> + kmap_atomic + interrupts
>>
>
> Avi, may you explain what is the role of the "bus interface" in the
> whole picture? To autodetect and probe new virtual device??
>
Yes. I guess the most important part is to advertise the interrupt line
correctly to the guest OS, so it can apply its policies wrt sharing and
priorities as it wishes. Hotplug/unplug and autodetection are also
important, but can probably be hacked even without pci.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666E4D4.7090901-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-06-06 17:24 ` Avi Kivity
0 siblings, 0 replies; 17+ messages in thread
From: Avi Kivity @ 2007-06-06 17:24 UTC (permalink / raw)
To: carsteno-tA70FqPdS9bQT0dZR+AlfA; +Cc: kvm-devel
Carsten Otte wrote:
>
>> So you suggest having a PCI driver that exports a virtio device for
>> each PCI device it matches? Sounds fine to me, though it goes beyond
>> what I think Rusty had in mind with his latest set of virtio
>> patches.
>>
> We don't need a PCI device per virtio device. We can have a PCI device
> that is a virtio bus driver.
>
>
I think it is better to have a pci device per, er, device. It's nice to
be able to do lspci (on an older Linux distro) and see what devices you
have, instead of requiring a new tool. It will also not require us to
backport the virtual bus to older kernels.
Newer kernels can of course use a hypercall-based bus (suggestion: one
hypercall that reads an array of structures, each describing one device,
and one interrupt that means "please issue that hypercall and take
notice of any changes that may have occurred since the last time you did
that").
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <fdaac4d50706060941u2ebd0180o5b6075ceb370db1b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-06 16:52 ` Avi Kivity
@ 2007-06-06 22:06 ` Arnd Bergmann
1 sibling, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2007-06-06 22:06 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA
On Wednesday 06 June 2007, Jun Koi wrote:
> About the balloon driver, I looked at the current code, and what I
> dont like is its approach: it needs to be operated from inside the
> guest, which is not the way we usually want to do. So something like
> Xen balloon driver is certainly better.
There are multiple fundamentally different approaches. Three of
these have been used on s390 with success, and they are not
mutually exclusive:
1. Balloning: The guest voluntarily gives up pages using an
hcall if it has free pages or is told to do so by the
hypervisor.
2. pfault: The host takes away pages from the guest based on
LRU. When the guest accesses a page that has been paged out
by the host, it gets an exception and has the chance to switch
the guest task. Another exception is delivered when the page
is there, and the task gets marked runnable again.
3. "cmm2": The guest annotages every page as 'unused', 'stable',
'volatile' or 'potentially volatile', and the host memory
management code can take these into consideration. See
https://ols2006.108.redhat.com/reprints/schwidefsky-reprint.pdf
for details.
Arnd <><
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <4666DE28.1060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-06 16:41 ` Jun Koi
@ 2007-06-07 1:30 ` Rusty Russell
1 sibling, 0 replies; 17+ messages in thread
From: Rusty Russell @ 2007-06-07 1:30 UTC (permalink / raw)
To: Avi Kivity; +Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA, kvm-devel
On Wed, 2007-06-06 at 19:17 +0300, Avi Kivity wrote:
> Carsten Otte wrote:
> > The best approach into this direction I have seen so far is not our
> > own vdev thing but Rusty's virtio infrastructure. That's what I think
> > I would start with.
> >
> >
>
> I agree. We need a Lego set containing the following bricks:
>
> - bus interfaces: pci bus, hypercall-based bus, xenbus
> - functionality: net driver, block driver
> - virtio data path: xen rings + grant tables + event channels, kvm rings
> + kmap_atomic + interrupts
>
> So you can write a 4-line driver that glues the pci bus interface to the
> net functionality driver to kvm virtio backend, and take the rest of the
> day off.
Speaking of which, I have been beavering away with various failed
attempts, and finally ate humble pie and am implementing the simple
callback scheme first suggested by Avi. Everything else made the
drivers nasty and an efficient implementation nastier.
Expect draft II patches within 24 hours...
Rusty.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Balloon driver?
[not found] ` <200706061838.29017.arnd-r2nGTMty4D4@public.gmane.org>
2007-06-06 16:46 ` Carsten Otte
@ 2007-06-08 21:41 ` Dor Laor
1 sibling, 0 replies; 17+ messages in thread
From: Dor Laor @ 2007-06-08 21:41 UTC (permalink / raw)
To: Arnd Bergmann, carsteno-tA70FqPdS9bQT0dZR+AlfA; +Cc: kvm-devel
>> > Now that more platforms are joining the KVM wagon, we should define
a
>> > common bus. PCI was a overkill anyway - its irq are shared and we
don't
>> > have to use its io/mmio areas.
>> > Do you guys have something to start with?
>> We do have something basic, our vdev bus. The bad thing is, it is
>> platform specific. I really prefer to aim for an idea that Arnd came
>> up with when discussing this issue:
>> We could define a virtual device bus.
>
>I guess, more specifically, you mean a bus_type in Linux terminology.
>
>> Now functionality like device drivers can sit on top of the
>> abstraction layer. We need to invent a similar abstraction on the
>> hypervisor side, which is a tricky task indeed.
>> The best approach into this direction I have seen so far is not our
>> own vdev thing but Rusty's virtio infrastructure. That's what I think
>> I would start with.
>
>So you suggest having a PCI driver that exports a virtio device for
>each PCI device it matches? Sounds fine to me, though it goes beyond
>what I think Rusty had in mind with his latest set of virtio
>patches.
>
>Note that contrary to what I may have said previously, I think that
>such a virtio device on top of a PCI device need not use any PCI
>specific APIs (readl/writel, pci_map_*, ioremap_, pci_dev->irq, ...)
>but could do all of that by means of a hypercall interface. The
>only real point we want to use PCI for is to find out about the
>existence of a device and to get an identifier that gets passed
>to the hypercalls.
This is exactly our current approach. This is the way the current pv
network device is implemented and also the windows balloon driver.
Currently there is a small advantage of using io port/mmio because there
is no need to define additional shared page data, but that's negligible.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2007-06-08 21:41 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-05 10:55 Balloon driver? Jun Koi
[not found] ` <fdaac4d50706050355t3e34e9caj5fe9f3f38613bcbf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-05 11:49 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C1A61E8-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-06-06 2:20 ` Jun Koi
[not found] ` <fdaac4d50706051920w17cfe72am13d9d5213b344c9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-06 10:24 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F84A-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-06-06 10:53 ` Jun Koi
[not found] ` <fdaac4d50706060353o12fe931du8250b8bd15b256d8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-06 12:40 ` Carsten Otte
[not found] ` <4666AB2E.8030502-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-06-06 14:03 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160C26F90E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-06-06 16:04 ` Carsten Otte
[not found] ` <4666DB13.7080504-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-06-06 16:17 ` Avi Kivity
[not found] ` <4666DE28.1060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-06 16:41 ` Jun Koi
[not found] ` <fdaac4d50706060941u2ebd0180o5b6075ceb370db1b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-06 16:52 ` Avi Kivity
2007-06-06 22:06 ` Arnd Bergmann
2007-06-07 1:30 ` Rusty Russell
2007-06-06 16:38 ` Arnd Bergmann
[not found] ` <200706061838.29017.arnd-r2nGTMty4D4@public.gmane.org>
2007-06-06 16:46 ` Carsten Otte
[not found] ` <4666E4D4.7090901-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-06-06 17:24 ` Avi Kivity
2007-06-08 21:41 ` Dor Laor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox