[kvm-unit-tests PATCH 4/7] svm: change operand to output-only for matching constraint

morbo
2020-02-26T07:45:03Z

From: Bill Wendling <morbo@google.com>

According to GNU extended asm documentation, "the two operands [of
matching constraints] must include one input-only operand and one
output-only operand." So remove the read/write modifier from the output
constraint.

Signed-off-by: Bill Wendling <morbo@google.com>
---
x86/svm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/svm.c b/x86/svm.c
index aa3d995..ae85194 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -288,8 +288,8 @@ static void test_run(struct test *test, struct vmcb *vmcb)
"cli \n\t"
"stgi"
: // inputs clobbered by the guest:
- "+D" (the_test), // first argument register
- "+b" (the_vmcb) // callee save register!
+ "=D" (the_test), // first argument register
+ "=b" (the_vmcb) // callee save register!
: [test] "0" (the_test),
[vmcb_phys] "1"(the_vmcb),
[PREPARE_GIF_CLEAR] "i" (offsetof(struct test, prepare_gif_clear))
--
2.25.0.265.gbab2e86ba0-goog