All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@suse.com>
To: andrew.cooper3@citrix.com
Cc: xen-devel@lists.xenproject.org, kevin.tian@intel.com,
	wei.liu2@citrix.com, jun.nakajima@intel.com,
	roger.pau@citrix.com
Subject: Re: [PATCH v2] x86/msr: Fix fallout from mostly c/s 832c180
Date: Mon, 15 Apr 2019 09:49:29 -0600	[thread overview]
Message-ID: <5CB4A8090200007800155576@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <1555329809-3248-1-git-send-email-andrew.cooper3@citrix.com>

>>> Andrew Cooper <andrew.cooper3@citrix.com> 04/15/19 2:03 PM >>>
 >* Fix the shim build by providing a !CONFIG_HVM declaration for
>hvm_get_guest_bndcfgs(), and removing the introduced
>ASSERT(is_hvm_domain(d))'s.  They are needed for DCE to keep the build
>working.  Furthermore, in this way, the risk of runtime type confusion is
>removed.
>* Revert the de-const'ing of the vcpu pointer in vmx_get_guest_bndcfgs().
>vmx_vmcs_enter() really does mutate the vcpu, and may cause it to undergo a
>full de/reschedule, which is in violation of the ABI described by
>hvm_get_guest_bndcfgs().  guest_rdmsr() was always going to need to lose
>its const parameter, and this was the correct time for it to happen.

With the ABI violation claim here removed (e.g. replaced by saying that it
might be confusing to the reader)

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

This wrong (at least I continue to be of the opinion that it is) claim - just to
make it explicit - is what I've previously called being factual incorrect on the
v1 thread. As said before, there's no "ABI promise" to be derived from "const".

In fact I'd prefer VMCS reads in general to be viewed as reading "state", not
memory, and it just so happens that in certain cases some syncing between
memory and CPU needs to be done for correct "state" to be returned. This
doesn't alter what the caller sees (i.e. there's no change to "state", and any
locks acquired get released again before returning). I'd like to re-emphasize
the similarity to C++'s mutable here.


Jan


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

WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <jbeulich@suse.com>
To: <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, kevin.tian@intel.com,
	wei.liu2@citrix.com, jun.nakajima@intel.com,
	roger.pau@citrix.com
Subject: Re: [Xen-devel] [PATCH v2] x86/msr: Fix fallout from mostly c/s 832c180
Date: Mon, 15 Apr 2019 09:49:29 -0600	[thread overview]
Message-ID: <5CB4A8090200007800155576@prv1-mh.provo.novell.com> (raw)
Message-ID: <20190415154929.4BAgJrgTXx0C1MMeVLy73uI2287r6Wotj1b9fQ7Fyuc@z> (raw)
In-Reply-To: <1555329809-3248-1-git-send-email-andrew.cooper3@citrix.com>

>>> Andrew Cooper <andrew.cooper3@citrix.com> 04/15/19 2:03 PM >>>
 >* Fix the shim build by providing a !CONFIG_HVM declaration for
>hvm_get_guest_bndcfgs(), and removing the introduced
>ASSERT(is_hvm_domain(d))'s.  They are needed for DCE to keep the build
>working.  Furthermore, in this way, the risk of runtime type confusion is
>removed.
>* Revert the de-const'ing of the vcpu pointer in vmx_get_guest_bndcfgs().
>vmx_vmcs_enter() really does mutate the vcpu, and may cause it to undergo a
>full de/reschedule, which is in violation of the ABI described by
>hvm_get_guest_bndcfgs().  guest_rdmsr() was always going to need to lose
>its const parameter, and this was the correct time for it to happen.

With the ABI violation claim here removed (e.g. replaced by saying that it
might be confusing to the reader)

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

This wrong (at least I continue to be of the opinion that it is) claim - just to
make it explicit - is what I've previously called being factual incorrect on the
v1 thread. As said before, there's no "ABI promise" to be derived from "const".

In fact I'd prefer VMCS reads in general to be viewed as reading "state", not
memory, and it just so happens that in certain cases some syncing between
memory and CPU needs to be done for correct "state" to be returned. This
doesn't alter what the caller sees (i.e. there's no change to "state", and any
locks acquired get released again before returning). I'd like to re-emphasize
the similarity to C++'s mutable here.


Jan


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

  reply	other threads:[~2019-04-15 15:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 12:03 [PATCH v2] x86/msr: Fix fallout from mostly c/s 832c180 Andrew Cooper
2019-04-15 12:03 ` [Xen-devel] " Andrew Cooper
2019-04-15 15:49 ` Jan Beulich [this message]
2019-04-15 15:49   ` Jan Beulich
2019-04-16 10:53 ` Paul Durrant
2019-04-16 10:53   ` [Xen-devel] " Paul Durrant
2019-04-24  6:46 ` Tian, Kevin
2019-04-24  6:46   ` [Xen-devel] " Tian, Kevin

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=5CB4A8090200007800155576@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.