All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, kernel test robot <lkp@intel.com>,
	David Woodhouse <dwmw@amazon.co.uk>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 5.14 03/15] KVM: Fix steal time asm constraints
Date: Fri, 19 Nov 2021 18:38:36 +0100	[thread overview]
Message-ID: <20211119171443.835489014@linuxfoundation.org> (raw)
In-Reply-To: <20211119171443.724340448@linuxfoundation.org>

From: David Woodhouse <dwmw@amazon.co.uk>

commit 964b7aa0b040bdc6ec1c543ee620cda3f8b4c68a upstream.

In 64-bit mode, x86 instruction encoding allows us to use the low 8 bits
of any GPR as an 8-bit operand. In 32-bit mode, however, we can only use
the [abcd] registers. For which, GCC has the "q" constraint instead of
the less restrictive "r".

Also fix st->preempted, which is an input/output operand rather than an
input.

Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-Id: <89bf72db1b859990355f9c40713a34e0d2d86c98.camel@infradead.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/kvm/x86.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3237,9 +3237,9 @@ static void record_steal_time(struct kvm
 			     "xor %1, %1\n"
 			     "2:\n"
 			     _ASM_EXTABLE_UA(1b, 2b)
-			     : "+r" (st_preempted),
-			       "+&r" (err)
-			     : "m" (st->preempted));
+			     : "+q" (st_preempted),
+			       "+&r" (err),
+			       "+m" (st->preempted));
 		if (err)
 			goto out;
 



  parent reply	other threads:[~2021-11-19 17:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 17:38 [PATCH 5.14 00/15] 5.14.21-rc1 review Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 01/15] Revert "drm: fb_helper: improve CONFIG_FB dependency" Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 02/15] Revert "drm: fb_helper: fix " Greg Kroah-Hartman
2021-11-19 17:38 ` Greg Kroah-Hartman [this message]
2021-11-19 17:38 ` [PATCH 5.14 04/15] fortify: Explicitly disable Clang support Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 05/15] block: Add a helper to validate the block size Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 06/15] loop: Use blk_validate_block_size() to validate " Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 07/15] bootconfig: init: Fix memblock leak in xbc_make_cmdline() Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 08/15] Bluetooth: btusb: Add support for TP-Link UB500 Adapter Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 09/15] parisc/entry: fix trace test in syscall exit path Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 10/15] PCI/MSI: Destroy sysfs before freeing entries Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 11/15] PCI/MSI: Deal with devices lying about their MSI mask capability Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 12/15] PCI: Add MSI masking quirk for Nvidia ION AHCI Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 13/15] perf/core: Avoid put_page() when GUP fails Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 14/15] thermal: Fix NULL pointer dereferences in of_thermal_ functions Greg Kroah-Hartman
2021-11-19 17:38 ` [PATCH 5.14 15/15] Revert "ACPI: scan: Release PM resources blocked by unused objects" Greg Kroah-Hartman
2021-11-19 19:02 ` [PATCH 5.14 00/15] 5.14.21-rc1 review Florian Fainelli
2021-11-19 23:18 ` Shuah Khan
2021-11-19 23:57 ` Fox Chen
2021-11-20  4:40 ` Daniel Díaz
2021-11-20 16:52 ` Guenter Roeck

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=20211119171443.835489014@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dwmw@amazon.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.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 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.