All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding
@ 2018-02-22 13:44 Jan Beulich
  2018-02-22 14:49 ` Boris Ostrovsky
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jan Beulich @ 2018-02-22 13:44 UTC (permalink / raw)
  To: xen-devel
  Cc: Boris Ostrovsky, Andrew Cooper, Kevin Tian, Jun Nakajima,
	Suravee Suthikulpanit

... for unknown MSRs: wrmsr_hypervisor_regs()'s comment clearly says
that the function returns 0 for unrecognized MSRs, so
{svm,vmx}_msr_write_intercept() should not convert this into success.

At the time it went in, commit 013e34f5a6 ("x86: handle paged gfn in
wrmsr_hypervisor_regs") was probably okay, since prior to that the
return value wasn't checked at all. But that's not how we want things
to be handled nowadays.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -2124,7 +2124,6 @@ static int svm_msr_write_intercept(unsig
         case -ERESTART:
             result = X86EMUL_RETRY;
             break;
-        case 0:
         case 1:
             break;
         default:
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3160,7 +3160,6 @@ static int vmx_msr_write_intercept(unsig
                 {
                 case -ERESTART:
                     return X86EMUL_RETRY;
-                case 0:
                 case 1:
                     break;
                 default:




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-02-27 14:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 13:44 [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding Jan Beulich
2018-02-22 14:49 ` Boris Ostrovsky
2018-02-22 14:53 ` Andrew Cooper
2018-02-22 15:00   ` Jan Beulich
2018-02-22 15:17     ` Andrew Cooper
2018-02-22 15:44   ` Jan Beulich
2018-02-22 22:16     ` Boris Ostrovsky
2018-02-23  7:55       ` Jan Beulich
2018-02-27  8:39         ` Jan Beulich
2018-02-27 14:07           ` Boris Ostrovsky
2018-02-23  8:36 ` [PATCH v2] " Jan Beulich
2018-02-23 10:07   ` Andrew Cooper
2018-02-23 10:12     ` Jan Beulich
2018-02-24  3:20   ` Tian, Kevin
2018-02-26 13:18   ` Andrew Cooper

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.