From: Oliver Upton <oliver.upton@linux.dev>
To: kvmarm@lists.linux.dev
Cc: Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Jing Zhang <jingzhangos@google.com>,
Reiji Watanabe <reijiw@google.com>,
Oliver Upton <oliver.upton@linux.dev>
Subject: [PATCH 2/4] KVM: arm64: Remove pointless check for changed init target
Date: Fri, 23 Jun 2023 19:42:56 +0000 [thread overview]
Message-ID: <20230623194258.2648987-3-oliver.upton@linux.dev> (raw)
In-Reply-To: <20230623194258.2648987-1-oliver.upton@linux.dev>
At any time there is only a single valid value for KVM_ARM_VCPU_INIT,
depending on the current CPU implementation. In all likelihood, this
will be the generic ARMv8 target.
Drop the pointless check for a changed target value between calls to
KVM_ARM_VCPU_INIT and instead rely on the check against
kvm_target_cpu().
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
arch/arm64/kvm/arm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index c2c14059f6a8..3f844934b9f3 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1212,8 +1212,7 @@ static bool kvm_vcpu_init_changed(struct kvm_vcpu *vcpu,
{
unsigned long features = init->features[0];
- return !bitmap_equal(vcpu->arch.features, &features, KVM_VCPU_MAX_FEATURES) ||
- vcpu->arch.target != init->target;
+ return !bitmap_equal(vcpu->arch.features, &features, KVM_VCPU_MAX_FEATURES);
}
static int __kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
--
2.41.0.178.g377b9f9a00-goog
next prev parent reply other threads:[~2023-06-23 19:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 19:42 [PATCH 0/4] KVM: arm64: Consistently use 'generic' vCPU target across all uarches Oliver Upton
2023-06-23 19:42 ` [PATCH 1/4] KVM: arm64: Delete pointless switch statement in kvm_reset_vcpu() Oliver Upton
2023-07-10 15:14 ` Zenghui Yu
2023-06-23 19:42 ` Oliver Upton [this message]
2023-06-23 19:42 ` [PATCH 3/4] KVM: arm64: Replace vCPU target with a configuration flag Oliver Upton
2023-07-10 15:17 ` Zenghui Yu
2023-06-23 19:42 ` [PATCH 4/4] KVM: arm64: Always return generic v8 as the preferred target Oliver Upton
2023-06-24 0:45 ` Marc Zyngier
2023-06-24 0:55 ` Oliver Upton
2023-07-10 15:13 ` Zenghui Yu
2023-07-10 18:35 ` Oliver Upton
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=20230623194258.2648987-3-oliver.upton@linux.dev \
--to=oliver.upton@linux.dev \
--cc=james.morse@arm.com \
--cc=jingzhangos@google.com \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=reijiw@google.com \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.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