All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, maz@kernel.org,
	james.morse@arm.com, julien.thierry.kdev@gmail.com,
	suzuki.poulose@arm.com
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 1/5] KVM: Documentation: Add arm64 KVM_RUN error codes
Date: Tue,  1 Dec 2020 15:01:53 +0000	[thread overview]
Message-ID: <20201201150157.223625-2-alexandru.elisei@arm.com> (raw)
In-Reply-To: <20201201150157.223625-1-alexandru.elisei@arm.com>

The API documentation states that general error codes are not detailed, but
errors with specific meanings are. On arm64, KVM_RUN can return error
numbers with a different meaning than what is described by POSIX or the C99
standard (as taken from man 3 errno).

Absent from the newly documented error codes is ERANGE which can be
returned when making a change to the EL2 stage 1 tables if the address is
larger than the largest supported input address. Assuming no bugs in the
implementation, that is not possible because the input addresses which are
mapped are the result of applying the macro kern_hyp_va() on kernel virtual
addresses.

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 Documentation/virt/kvm/api.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 36d5f1f3c6dd..090a2331b1f2 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -380,9 +380,14 @@ This ioctl is obsolete and has been removed.
 
 Errors:
 
-  =====      =============================
+  =======    ==============================================================
   EINTR      an unmasked signal is pending
-  =====      =============================
+  ENOEXEC    the vcpu hasn't been initialized or the guest tried to execute
+             instructions from device memory (arm64)
+  ENOSYS     data abort outside memslots with no syndrome info and
+             KVM_CAP_ARM_NISV_TO_USER not enabled (arm64)
+  EPERM      SVE feature set but not finalized (arm64)
+  =======    ==============================================================
 
 This ioctl is used to run a guest virtual cpu.  While there are no
 explicit parameters, there is an implicit parameter block that can be
-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, maz@kernel.org,
	james.morse@arm.com, julien.thierry.kdev@gmail.com,
	suzuki.poulose@arm.com
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 1/5] KVM: Documentation: Add arm64 KVM_RUN error codes
Date: Tue,  1 Dec 2020 15:01:53 +0000	[thread overview]
Message-ID: <20201201150157.223625-2-alexandru.elisei@arm.com> (raw)
In-Reply-To: <20201201150157.223625-1-alexandru.elisei@arm.com>

The API documentation states that general error codes are not detailed, but
errors with specific meanings are. On arm64, KVM_RUN can return error
numbers with a different meaning than what is described by POSIX or the C99
standard (as taken from man 3 errno).

Absent from the newly documented error codes is ERANGE which can be
returned when making a change to the EL2 stage 1 tables if the address is
larger than the largest supported input address. Assuming no bugs in the
implementation, that is not possible because the input addresses which are
mapped are the result of applying the macro kern_hyp_va() on kernel virtual
addresses.

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 Documentation/virt/kvm/api.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 36d5f1f3c6dd..090a2331b1f2 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -380,9 +380,14 @@ This ioctl is obsolete and has been removed.
 
 Errors:
 
-  =====      =============================
+  =======    ==============================================================
   EINTR      an unmasked signal is pending
-  =====      =============================
+  ENOEXEC    the vcpu hasn't been initialized or the guest tried to execute
+             instructions from device memory (arm64)
+  ENOSYS     data abort outside memslots with no syndrome info and
+             KVM_CAP_ARM_NISV_TO_USER not enabled (arm64)
+  EPERM      SVE feature set but not finalized (arm64)
+  =======    ==============================================================
 
 This ioctl is used to run a guest virtual cpu.  While there are no
 explicit parameters, there is an implicit parameter block that can be
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-01 15:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 15:01 [PATCH 0/5] KVM: arm64: Miscellaneous improvements Alexandru Elisei
2020-12-01 15:01 ` Alexandru Elisei
2020-12-01 15:01 ` Alexandru Elisei [this message]
2020-12-01 15:01   ` [PATCH 1/5] KVM: Documentation: Add arm64 KVM_RUN error codes Alexandru Elisei
2020-12-01 15:01 ` [PATCH 2/5] KVM: arm64: arch_timer: Remove VGIC initialization check Alexandru Elisei
2020-12-01 15:01   ` Alexandru Elisei
2020-12-14 12:45   ` Auger Eric
2020-12-14 12:45     ` Auger Eric
2020-12-01 15:01 ` [PATCH 3/5] KVM: arm64: Move double-checked lock to kvm_vgic_map_resources() Alexandru Elisei
2020-12-01 15:01   ` Alexandru Elisei
2020-12-14 12:55   ` Auger Eric
2020-12-14 12:55     ` Auger Eric
2020-12-27 14:36     ` Marc Zyngier
2020-12-27 14:36       ` Marc Zyngier
2020-12-01 15:01 ` [PATCH 4/5] KVM: arm64: Update comment in kvm_vgic_map_resources() Alexandru Elisei
2020-12-01 15:01   ` Alexandru Elisei
2020-12-14 12:59   ` Auger Eric
2020-12-14 12:59     ` Auger Eric
2020-12-01 15:01 ` [PATCH 5/5] KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset() Alexandru Elisei
2020-12-01 15:01   ` Alexandru Elisei
2020-12-14 13:48   ` Auger Eric
2020-12-14 13:48     ` Auger Eric
2020-12-14 14:02     ` Alexandru Elisei
2020-12-14 14:02       ` Alexandru Elisei
2020-12-15  9:15       ` Auger Eric
2020-12-15  9:15         ` Auger Eric
2020-12-27 14:41 ` [PATCH 0/5] KVM: arm64: Miscellaneous improvements Marc Zyngier
2020-12-27 14:41   ` 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=20201201150157.223625-2-alexandru.elisei@arm.com \
    --to=alexandru.elisei@arm.com \
    --cc=james.morse@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=suzuki.poulose@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.