qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: qemu-s390x@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Cédric Le Goater" <clegoate@redhat.com>
Subject: [PATCH v3 0/2] target/s390x/kvm: Simplify the synchronization code
Date: Wed, 11 Oct 2023 10:05:36 +0200	[thread overview]
Message-ID: <20231011080538.796999-1-thuth@redhat.com> (raw)

KVM_SYNC_GPRS, KVM_SYNC_ACRS, KVM_SYNC_CRS and KVM_SYNC_PREFIX are
available since kernel 3.10. Since we already require at least kernel
3.15 in the s390x KVM code, we can also assume that the KVM_CAP_SYNC_REGS
sync code is always possible for these registers, and remove the
related checks and fallbacks via KVM_SET_REGS and KVM_GET_REGS.

v3:
- Don't sync ACRs, CRs and prefix in kvm_arch_put_registers()
  when using level == KVM_PUT_RUNTIME_STATE
- Use g_assert(can_sync_regs(cs, KVM_SYNC_REQUIRED_REGS)) instead
  of open-coding it.

v2:
- Split the patch from v1 into two patches
- Use a #define KVM_SYNC_REQUIRED_BITS for the required sync bits
- Use memcpy() instead of for-loops for copying the registers

Thomas Huth (2):
  target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement
  target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix
    synchronization code

 target/s390x/kvm/kvm.c | 124 ++++++++++++-----------------------------
 1 file changed, 37 insertions(+), 87 deletions(-)

-- 
2.41.0



             reply	other threads:[~2023-10-11  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  8:05 Thomas Huth [this message]
2023-10-11  8:05 ` [PATCH v3 1/2] target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement Thomas Huth
2023-10-24  6:12   ` Cédric Le Goater
2023-10-11  8:05 ` [PATCH v3 2/2] target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization code Thomas Huth
2023-10-24  6:11   ` Cédric Le Goater

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=20231011080538.796999-1-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clegoate@redhat.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).