* [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw()
@ 2019-05-27 8:45 Jan Beulich
2019-05-30 18:30 ` Sean Christopherson
2019-06-04 17:20 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2019-05-27 8:45 UTC (permalink / raw)
To: Paolo Bonzini, Radim Krm; +Cc: KVM
While upstream gcc doesn't detect conflicts on cc (yet), it really
should, and hence "cc" should not be specified for asm()-s also having
"=@cc<cond>" outputs. (It is quite pointless anyway to specify a "cc"
clobber in x86 inline assembly, since the compiler assumes it to be
always clobbered, and has no means [yet] to suppress this behavior.)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -2781,7 +2781,7 @@ static int nested_vmx_check_vmentry_hw(s
[launched]"i"(offsetof(struct loaded_vmcs, launched)),
[host_state_rsp]"i"(offsetof(struct loaded_vmcs, host_state.rsp)),
[wordsize]"i"(sizeof(ulong))
- : "cc", "memory"
+ : "memory"
);
if (vmx->msr_autoload.host.nr)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw()
2019-05-27 8:45 [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw() Jan Beulich
@ 2019-05-30 18:30 ` Sean Christopherson
2019-06-04 17:20 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2019-05-30 18:30 UTC (permalink / raw)
To: Jan Beulich; +Cc: Paolo Bonzini, Radim Krm, KVM
On Mon, May 27, 2019 at 02:45:44AM -0600, Jan Beulich wrote:
> While upstream gcc doesn't detect conflicts on cc (yet), it really
> should, and hence "cc" should not be specified for asm()-s also having
> "=@cc<cond>" outputs. (It is quite pointless anyway to specify a "cc"
> clobber in x86 inline assembly, since the compiler assumes it to be
> always clobbered, and has no means [yet] to suppress this behavior.)
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
FWIW (mostly to satisfy my curiosity):
Fixes: bbc0b8239257 ("KVM: nVMX: Capture VM-Fail via CC_{SET,OUT} in nested early checks")
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
>
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -2781,7 +2781,7 @@ static int nested_vmx_check_vmentry_hw(s
> [launched]"i"(offsetof(struct loaded_vmcs, launched)),
> [host_state_rsp]"i"(offsetof(struct loaded_vmcs, host_state.rsp)),
> [wordsize]"i"(sizeof(ulong))
> - : "cc", "memory"
> + : "memory"
> );
>
> if (vmx->msr_autoload.host.nr)
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw()
2019-05-27 8:45 [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw() Jan Beulich
2019-05-30 18:30 ` Sean Christopherson
@ 2019-06-04 17:20 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2019-06-04 17:20 UTC (permalink / raw)
To: Jan Beulich, Radim Krm; +Cc: KVM
On 27/05/19 10:45, Jan Beulich wrote:
> While upstream gcc doesn't detect conflicts on cc (yet), it really
> should, and hence "cc" should not be specified for asm()-s also having
> "=@cc<cond>" outputs. (It is quite pointless anyway to specify a "cc"
> clobber in x86 inline assembly, since the compiler assumes it to be
> always clobbered, and has no means [yet] to suppress this behavior.)
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -2781,7 +2781,7 @@ static int nested_vmx_check_vmentry_hw(s
> [launched]"i"(offsetof(struct loaded_vmcs, launched)),
> [host_state_rsp]"i"(offsetof(struct loaded_vmcs, host_state.rsp)),
> [wordsize]"i"(sizeof(ulong))
> - : "cc", "memory"
> + : "memory"
> );
>
> if (vmx->msr_autoload.host.nr)
>
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-04 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 8:45 [PATCH] x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw() Jan Beulich
2019-05-30 18:30 ` Sean Christopherson
2019-06-04 17:20 ` Paolo Bonzini
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.