diff mbox

[RFC,2/3] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

Message ID CANM98q+q31A2w7atjOLnozc3dioyf6cxRvQ=MxxGzT0rRUt7kg@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christoffer Dall Oct. 19, 2012, 8:33 p.m. UTC
On Fri, Oct 19, 2012 at 4:27 PM, Christoffer Dall
<c.dall@virtualopensystems.com> wrote:
> On Fri, Oct 19, 2012 at 4:24 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 19 October 2012 19:46, Christoffer Dall
>> <c.dall@virtualopensystems.com> wrote:
>>> On Wed, Oct 17, 2012 at 4:29 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>>> This doesn't say whether userspace is allowed to make this ioctl
>>>> multiple times for the same device. This could be any of:
>>>>  * undefined behaviour
>>>>  * second call fails with some errno
>>>>  * second call overrides first one
>>>>
>>>
>>> I added an error condition EEXIST, but since this is trying to not be
>>> arm-vgic specific this is really up to the individual device - maybe
>>> we can have some polymorphic device that moves around later.
>>>
>>>> It also doesn't say that you're supposed to call this after CREATE
>>>> and before INIT of the irqchip. (Nor does it say what happens if
>>>> you call it at some other time.)
>>>>
>>>
>>> same non-device specific argument as above.
>>
>> We could have a section in the docs that says "On ARM platforms
>> there are devices X and Y and they have such-and-such properties
>> and requirements" [and other devices later can have further docs
>> as appropriate].
>>


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

Patch

diff --git a/Documentation/virtual/kvm/api.txt
b/Documentation/virtual/kvm/api.txt
index 65aacc5..1380885 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2131,6 +2131,12 @@  specific to the individual device.
   bits:  | 31    ...    16 | 15    ...    0 |
   field: |     device id   |  addr type id  |

+ARM currently only require this when using the in-kernel GIC support for the
+hardware vGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id.  When
+setting the base address for the guest's mapping of the vGIC virtual CPU
+and distributor interface, the ioctl must be called after calling
+KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs.  Calling
+this ioctl twice for any of the base addresses will return -EEXIST.


 5. The kvm_run structure