Re: [PATCH 1/3] kvm: s390: Per-vm kvm device controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10.04.14 13:33, Christian Borntraeger wrote:
On 10/04/14 13:29, Alexander Graf wrote:
On 10.04.14 13:16, Christian Borntraeger wrote:
From: Dominik Dingel <dingel@xxxxxxxxxxxxxxxxxx>

We sometimes need to get/set attributes specific to a virtual machine
and so need something else than ONE_REG.

Let's copy the KVM_DEVICE approach, and define the respective ioctls
for the vm file descriptor.

Signed-off-by: Dominik Dingel <dingel@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
---
   Documentation/virtual/kvm/api.txt        |  8 ++---
   Documentation/virtual/kvm/devices/vm.txt |  6 ++++
   arch/s390/kvm/kvm-s390.c                 | 54 ++++++++++++++++++++++++++++++++
   include/uapi/linux/kvm.h                 |  1 +
   4 files changed, 65 insertions(+), 4 deletions(-)
   create mode 100644 Documentation/virtual/kvm/devices/vm.txt

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index c24211d..f69731a 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2314,8 +2314,8 @@ struct kvm_create_device {
     4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR
   -Capability: KVM_CAP_DEVICE_CTRL
-Type: device ioctl
+Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device
+Type: device ioctl, vm ioctl
   Parameters: struct kvm_device_attr
   Returns: 0 on success, -1 on error
   Errors:
@@ -2340,8 +2340,8 @@ struct kvm_device_attr {
     4.81 KVM_HAS_DEVICE_ATTR
   -Capability: KVM_CAP_DEVICE_CTRL
-Type: device ioctl
+Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device
+Type: device ioctl, vm ioctl
   Parameters: struct kvm_device_attr
   Returns: 0 on success, -1 on error
   Errors:
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt
new file mode 100644
index 0000000..4fe1532
--- /dev/null
+++ b/Documentation/virtual/kvm/devices/vm.txt
@@ -0,0 +1,6 @@
+Generic vm interface
+====================================
+
+The interface handles per-vm attributes, such as CMMA status on s390 and is
+similar in way to ONE_REG, but targeting the whole vm instead of one vcpu
+alone. It is available with KVM_CAP_VM_ATTRIBUTES.
This document doesn't sound impressively useful :).
Will be filled with patch3. I asked Dominik to split this out into this patch,
since we introduce the capability here.

Ah, it's in .../devices/. Fair enough.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux