Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: maz@kernel.org, pbonzini@redhat.com, steven.price@arm.com
Subject: [PATCH v2 1/6] KVM: arm64: pvtime: steal-time is only supported when configured
Date: Tue,  4 Aug 2020 19:05:59 +0200	[thread overview]
Message-ID: <20200804170604.42662-2-drjones@redhat.com> (raw)
In-Reply-To: <20200804170604.42662-1-drjones@redhat.com>

Don't confuse the guest by saying steal-time is supported when
it hasn't been configured by userspace and won't work.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arch/arm64/kvm/pvtime.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/pvtime.c b/arch/arm64/kvm/pvtime.c
index f7b52ce1557e..c3ef4ebd6846 100644
--- a/arch/arm64/kvm/pvtime.c
+++ b/arch/arm64/kvm/pvtime.c
@@ -43,7 +43,8 @@ long kvm_hypercall_pv_features(struct kvm_vcpu *vcpu)
 	switch (feature) {
 	case ARM_SMCCC_HV_PV_TIME_FEATURES:
 	case ARM_SMCCC_HV_PV_TIME_ST:
-		val = SMCCC_RET_SUCCESS;
+		if (vcpu->arch.steal.base != GPA_INVALID)
+			val = SMCCC_RET_SUCCESS;
 		break;
 	}
 
-- 
2.25.4

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

  reply	other threads:[~2020-08-04 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 17:05 [PATCH v2 0/6] KVM: arm64: pvtime: Fixes and a new cap Andrew Jones
2020-08-04 17:05 ` Andrew Jones [this message]
2020-08-04 17:06 ` [PATCH v2 2/6] KVM: arm64: pvtime: Fix potential loss of stolen time Andrew Jones
2020-08-04 17:06 ` [PATCH v2 3/6] KVM: arm64: Drop type input from kvm_put_guest Andrew Jones
2020-08-04 17:06 ` [PATCH v2 4/6] KVM: arm64: pvtime: Fix stolen time accounting across migration Andrew Jones
2020-08-04 17:06 ` [PATCH v2 5/6] KVM: Documentation: Minor fixups Andrew Jones
2020-08-04 17:06 ` [PATCH v2 6/6] arm64/x86: KVM: Introduce steal-time cap Andrew Jones
2020-08-05 15:37 ` [PATCH v2 0/6] KVM: arm64: pvtime: Fixes and a new cap Steven Price
2020-08-19 12:50 ` Andrew Jones
2020-08-21 13:04   ` 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=20200804170604.42662-2-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=steven.price@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox