From: <darkhan@amazon.com>
To: <pbonzini@redhat.com>
Cc: <kvm@vger.kernel.org>, <corbet@lwn.net>, <maz@kernel.org>,
<james.morse@arm.com>, <catalin.marinas@arm.com>,
<chenhc@lemote.com>, <paulus@ozlabs.org>, <frankja@linux.ibm.com>,
<mingo@redhat.com>, <acme@redhat.com>, <graf@amazon.de>,
<darkhan@amazon.de>, Darkhan Mukashov <darkhan@amazon.com>
Subject: [PATCH 1/3] Documentation: KVM: change description of vcpu ioctls KVM_(GET|SET)_ONE_REG
Date: Fri, 20 Nov 2020 13:56:14 +0100 [thread overview]
Message-ID: <20201120125616.14436-2-darkhan@amazon.com> (raw)
In-Reply-To: <20201120125616.14436-1-darkhan@amazon.com>
From: Darkhan Mukashov <darkhan@amazon.com>
KVM APIs KVM_GET_ONE_REG and KVM_SET_ONE_REG are not implemented
in x86. They are handled in architecture specific "kvm_arch_vcpu_ioctl"
functions. There are no handlers for KVM_GET_ONE_REG and KVM_SET_ONE_REG
in "kvm_arch_vcpu_ioctl" in x86. -EINVAL is returned when both are called.
Therefore, architectures supported by KVM_(GET|SET)_ONE_REG should be
"all except x86" rather than "all".
KVM_GET_ONE_REG accepts a struct kvm_one_reg and writes value of a register
indicated by 'id' field of the struct to the memory location pointed by
'addr' field of the struct. As nothing is written to the struct
kvm_one_reg, parameter type should be "in" rather than "in/out".
Signed-off-by: Darkhan Mukashov <darkhan@amazon.com>
---
Documentation/virt/kvm/api.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 76317221d29f..6d6135c15729 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -2105,7 +2105,7 @@ prior to calling the KVM_RUN ioctl.
--------------------
:Capability: KVM_CAP_ONE_REG
-:Architectures: all
+:Architectures: all except x86
:Type: vcpu ioctl
:Parameters: struct kvm_one_reg (in)
:Returns: 0 on success, negative value on failure
@@ -2544,9 +2544,9 @@ following id bit patterns::
--------------------
:Capability: KVM_CAP_ONE_REG
-:Architectures: all
+:Architectures: all except x86
:Type: vcpu ioctl
-:Parameters: struct kvm_one_reg (in and out)
+:Parameters: struct kvm_one_reg (in)
:Returns: 0 on success, negative value on failure
Errors include:
--
2.17.1
next prev parent reply other threads:[~2020-11-20 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 12:56 [PATCH 0/3] Introduce new vcpu ioctls KVM_(GET|SET)_MANY_REGS darkhan
2020-11-20 12:56 ` darkhan [this message]
2020-11-20 12:56 ` [PATCH 2/3] KVM: handle vcpu ioctls KVM_(GET|SET)_ONE_REG in a generic function darkhan
2020-11-20 12:56 ` [PATCH 3/3] KVM: introduce new vcpu ioctls KVM_GET_MANY_REGS and KVM_SET_MANY_REGS darkhan
2020-11-23 11:39 ` [PATCH 0/3] Introduce new vcpu ioctls KVM_(GET|SET)_MANY_REGS Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201120125616.14436-2-darkhan@amazon.com \
--to=darkhan@amazon.com \
--cc=acme@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=chenhc@lemote.com \
--cc=corbet@lwn.net \
--cc=darkhan@amazon.de \
--cc=frankja@linux.ibm.com \
--cc=graf@amazon.de \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@ozlabs.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox