qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and contr


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device
Date: Tue, 01 Apr 2014 17:12:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130910 Thunderbird/17.0.9

On 04/01/2014 05:04 PM, Christian Borntraeger wrote:
On 01/04/14 16:58, Alexander Graf wrote:
On 04/01/2014 04:47 PM, Christian Borntraeger wrote:
From: Ekaterina Tumanova <address@hidden>

Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains
configuration and control attributes of particular vm.
The device is created by KVM_CREATE_DEVICE ioctl.
The attributes may be retrieved and stored by calling
KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR ioctls.

Signed-off-by: Ekaterina Tumanova <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
I don't think a device is particularly the best fit. A device can usually be 
instantiated multiple times. The configuration device can only be created once. 
A device also gets created by user space which enables it to receive the fd to 
drive it. Your device has to be created during VM creation.
I remember some discussion a year or 2 ago, and IIRC a config device
was actually your idea ;-) (The other idea that we had, was ONE_REG for the VM)

Omg, really? :o

A device would make sense for a specific "system information" instruction trap that we handle in-kernel for whatever reason (usually because it's performance critical) and some mandatory say to make sure user space always creates it. And some checks to make sure it can't get created twice.

Speaking of which, why don't we just forward STSI to user space with an ENABLE_CAP and handle all of this there? It's not performance critical at all, right?

I think VM configuration is common enough to just make this a separate 
interface.
So you propose to define a new base ioctl (e.g. VM_REG) on the vm fd, instead?
Seems like an easy enough change. Would you reuse the kvm_attr structure for 
that?

Yeah, reuse whatever we can. Basically just remove the device boilerplate - I don't think it's impressively useful for a non-device.


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]