Skip to content

Commit 740edfc

Browse files
Anup Patelchazy
authored andcommitted
KVM: Add documentation for KVM_ARM_PREFERRED_TARGET ioctl
To implement CPU=Host we have added KVM_ARM_PREFERRED_TARGET vm ioctl which provides information to user space required for creating VCPU matching underlying Host. This patch adds info related to this new KVM_ARM_PREFERRED_TARGET vm ioctl in the KVM API documentation. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent 42c4e0c commit 740edfc

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

Documentation/virtual/kvm/api.txt

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,31 @@ Possible features:
23042304
Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
23052305

23062306

2307-
4.83 KVM_GET_REG_LIST
2307+
4.83 KVM_ARM_PREFERRED_TARGET
2308+
2309+
Capability: basic
2310+
Architectures: arm, arm64
2311+
Type: vm ioctl
2312+
Parameters: struct struct kvm_vcpu_init (out)
2313+
Returns: 0 on success; -1 on error
2314+
Errors:
2315+
 ENODEV:    no preferred target available for the host
2316+
2317+
This queries KVM for preferred CPU target type which can be emulated
2318+
by KVM on underlying host.
2319+
2320+
The ioctl returns struct kvm_vcpu_init instance containing information
2321+
about preferred CPU target type and recommended features for it. The
2322+
kvm_vcpu_init->features bitmap returned will have feature bits set if
2323+
the preferred target recommends setting these features, but this is
2324+
not mandatory.
2325+
2326+
The information returned by this ioctl can be used to prepare an instance
2327+
of struct kvm_vcpu_init for KVM_ARM_VCPU_INIT ioctl which will result in
2328+
in VCPU matching underlying host.
2329+
2330+
2331+
4.84 KVM_GET_REG_LIST
23082332

23092333
Capability: basic
23102334
Architectures: arm, arm64
@@ -2323,8 +2347,7 @@ struct kvm_reg_list {
23232347
This ioctl returns the guest registers that are supported for the
23242348
KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
23252349

2326-
2327-
4.84 KVM_ARM_SET_DEVICE_ADDR
2350+
4.85 KVM_ARM_SET_DEVICE_ADDR
23282351

23292352
Capability: KVM_CAP_ARM_SET_DEVICE_ADDR
23302353
Architectures: arm, arm64
@@ -2362,7 +2385,7 @@ must be called after calling KVM_CREATE_IRQCHIP, but before calling
23622385
KVM_RUN on any of the VCPUs. Calling this ioctl twice for any of the
23632386
base addresses will return -EEXIST.
23642387

2365-
4.85 KVM_PPC_RTAS_DEFINE_TOKEN
2388+
4.86 KVM_PPC_RTAS_DEFINE_TOKEN
23662389

23672390
Capability: KVM_CAP_PPC_RTAS
23682391
Architectures: ppc

0 commit comments

Comments
 (0)