diff options
| author | Amos Kong <akong@redhat.com> | 2013-05-25 06:44:15 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-06-17 16:12:30 +0200 |
| commit | 24e4962541a6e5ef0d4fb5b61f602b0f50f7a6d9 (patch) | |
| tree | d3cd5c763169a32e9deaea60f3d8fd125728776e /include/linux/kvm_host.h | |
| parent | 1c4552f45ba3663ef4d7ba28ecc7a5afc4056074 (diff) | |
kvm: exclude ioeventfd from counting kvm_io_range limit
commit 6ea34c9b78c10289846db0abeebd6b84d5aca084 upstream.
We can easily reach the 1000 limit by start VM with a couple
hundred I/O devices (multifunction=on). The hardcode limit
already been adjusted 3 times (6 ~ 200 ~ 300 ~ 1000).
In userspace, we already have maximum file descriptor to
limit ioeventfd count. But kvm_io_bus devices also are used
for pit, pic, ioapic, coalesced_mmio. They couldn't be limited
by maximum file descriptor.
Currently only ioeventfds take too much kvm_io_bus devices,
so just exclude it from counting kvm_io_range limit.
Also fixed one indent issue in kvm_host.h
Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
[wt: next patch depends on this one]
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/linux/kvm_host.h')
| -rw-r--r-- | include/linux/kvm_host.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 8db53cfac..cbe908312 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -145,7 +145,8 @@ struct kvm_io_range { #define NR_IOBUS_DEVS 1000 struct kvm_io_bus { - int dev_count; + int dev_count; + int ioeventfd_count; struct kvm_io_range range[]; }; |
