2008-04-17 12:28:09 +08:00
|
|
|
#
|
|
|
|
# KVM configuration
|
|
|
|
#
|
|
|
|
|
2009-05-21 21:45:19 +08:00
|
|
|
source "virt/kvm/Kconfig"
|
2009-01-05 00:04:18 +08:00
|
|
|
|
2008-04-17 12:28:09 +08:00
|
|
|
menuconfig VIRTUALIZATION
|
|
|
|
bool "Virtualization"
|
|
|
|
---help---
|
|
|
|
Say Y here to get to see options for using your Linux host to run
|
|
|
|
other operating systems inside virtual machines (guests).
|
|
|
|
This option alone does not add any kernel code.
|
|
|
|
|
|
|
|
If you say N, all options in this submenu will be skipped and
|
|
|
|
disabled.
|
|
|
|
|
|
|
|
if VIRTUALIZATION
|
|
|
|
|
|
|
|
config KVM
|
2008-11-08 03:15:13 +08:00
|
|
|
bool
|
2008-04-17 12:28:09 +08:00
|
|
|
select PREEMPT_NOTIFIERS
|
|
|
|
select ANON_INODES
|
2009-12-20 21:00:10 +08:00
|
|
|
select KVM_MMIO
|
2008-11-08 03:15:13 +08:00
|
|
|
|
2010-04-16 06:11:41 +08:00
|
|
|
config KVM_BOOK3S_HANDLER
|
|
|
|
bool
|
|
|
|
|
2009-10-30 13:47:24 +08:00
|
|
|
config KVM_BOOK3S_64_HANDLER
|
|
|
|
bool
|
2010-04-16 06:11:41 +08:00
|
|
|
select KVM_BOOK3S_HANDLER
|
2009-10-30 13:47:24 +08:00
|
|
|
|
|
|
|
config KVM_BOOK3S_64
|
|
|
|
tristate "KVM support for PowerPC book3s_64 processors"
|
2010-04-16 06:11:42 +08:00
|
|
|
depends on EXPERIMENTAL && PPC_BOOK3S_64
|
2009-10-30 13:47:24 +08:00
|
|
|
select KVM
|
|
|
|
select KVM_BOOK3S_64_HANDLER
|
|
|
|
---help---
|
|
|
|
Support running unmodified book3s_64 and book3s_32 guest kernels
|
|
|
|
in virtual machines on book3s_64 host processors.
|
|
|
|
|
|
|
|
This module provides access to the hardware capabilities through
|
|
|
|
a character device node named /dev/kvm.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2008-11-08 03:15:13 +08:00
|
|
|
config KVM_440
|
|
|
|
bool "KVM support for PowerPC 440 processors"
|
|
|
|
depends on EXPERIMENTAL && 44x
|
|
|
|
select KVM
|
2008-04-17 12:28:09 +08:00
|
|
|
---help---
|
2008-11-08 03:15:13 +08:00
|
|
|
Support running unmodified 440 guest kernels in virtual machines on
|
|
|
|
440 host processors.
|
2008-04-17 12:28:09 +08:00
|
|
|
|
|
|
|
This module provides access to the hardware capabilities through
|
|
|
|
a character device node named /dev/kvm.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2008-12-03 05:51:57 +08:00
|
|
|
config KVM_EXIT_TIMING
|
|
|
|
bool "Detailed exit timing"
|
2009-12-21 05:24:06 +08:00
|
|
|
depends on KVM_440 || KVM_E500
|
2008-12-03 05:51:57 +08:00
|
|
|
---help---
|
|
|
|
Calculate elapsed time for every exit/enter cycle. A per-vcpu
|
|
|
|
report is available in debugfs kvm/vm#_vcpu#_timing.
|
|
|
|
The overhead is relatively small, however it is not recommended for
|
|
|
|
production environments.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2009-01-04 06:23:10 +08:00
|
|
|
config KVM_E500
|
|
|
|
bool "KVM support for PowerPC E500 processors"
|
|
|
|
depends on EXPERIMENTAL && E500
|
|
|
|
select KVM
|
|
|
|
---help---
|
|
|
|
Support running unmodified E500 guest kernels in virtual machines on
|
|
|
|
E500 host processors.
|
|
|
|
|
|
|
|
This module provides access to the hardware capabilities through
|
|
|
|
a character device node named /dev/kvm.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
vhost_net: a kernel-level virtio server
What it is: vhost net is a character device that can be used to reduce
the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.
There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for
migration, bug work-arounds in userspace)
- write logging is supported (good for migration)
- support memory table and not just an offset (needed for kvm)
common virtio related code has been put in a separate file vhost.c and
can be made into a separate module if/when more backends appear. I used
Rusty's lguest.c as the source for developing this part : this supplied
me with witty comments I wouldn't be able to write myself.
What it is not: vhost net is not a bus, and not a generic new system
call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.
How it works: Basically, we connect virtio frontend (configured by
userspace) to a backend. The backend could be a network device, or a tap
device. Backend is also configured by userspace, including vlan/mac
etc.
Status: This works for me, and I haven't see any crashes.
Compared to userspace, people reported improved latency (as I save up to
4 system calls per packet), as well as better bandwidth and CPU
utilization.
Features that I plan to look at in the future:
- mergeable buffers
- zero copy
- scalability tuning: figure out the best threading model to use
Note on RCU usage (this is also documented in vhost.h, near
private_pointer which is the value protected by this variant of RCU):
what is happening is that the rcu_dereference() is being used in a
workqueue item. The role of rcu_read_lock() is taken on by the start of
execution of the workqueue item, of rcu_read_unlock() by the end of
execution of the workqueue item, and of synchronize_rcu() by
flush_workqueue()/flush_work(). In the future we might need to apply
some gcc attribute or sparse annotation to the function passed to
INIT_WORK(). Paul's ack below is for this RCU usage.
(Includes fixes by Alan Cox <alan@linux.intel.com>,
David L Stevens <dlstevens@us.ibm.com>,
Chris Wright <chrisw@redhat.com>)
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-14 14:17:27 +08:00
|
|
|
source drivers/vhost/Kconfig
|
2008-04-17 12:28:09 +08:00
|
|
|
source drivers/virtio/Kconfig
|
|
|
|
|
|
|
|
endif # VIRTUALIZATION
|