All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/public: Further correctsion to vcpu context comments
@ 2017-09-01 13:14 Andrew Cooper
  2017-09-01 13:30 ` Jan Beulich
  2017-09-01 14:36 ` Roger Pau Monné
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Cooper @ 2017-09-01 13:14 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, Roger Pau Monné

VCPUOP_initialise and DOMCTL_setvcpucontext are not symetric.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 xen/include/public/arch-x86/xen.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/xen/include/public/arch-x86/xen.h b/xen/include/public/arch-x86/xen.h
index 3f68a43..ff91831 100644
--- a/xen/include/public/arch-x86/xen.h
+++ b/xen/include/public/arch-x86/xen.h
@@ -162,10 +162,12 @@ typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
  * The following is all CPU context. Note that the fpu_ctxt block is filled
  * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
  *
- * Also note that when calling DOMCTL_setvcpucontext and VCPUOP_initialise for
- * HVM guests, not all information in this structure is updated, the fields
- * read include: fpu_ctxt (if VGCT_I387_VALID is set), flags, user_regs and
- * debugreg[*].
+ * Also note that when calling DOMCTL_setvcpucontext for HVM guests, not all
+ * information in this structure is updated, the fields read include: fpu_ctxt
+ * (if VGCT_I387_VALID is set), flags, user_regs and debugreg[*].
+ *
+ * Note: VCPUOP_initialise for HVM guests is non-symetric with
+ * DOMCTL_setvcpucontext, and uses struct vcpu_hvm_context from hvm/hvm_vcpu.h
  */
 struct vcpu_guest_context {
     /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
-- 
2.1.4


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

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

* Re: [PATCH] x86/public: Further correctsion to vcpu context comments
  2017-09-01 13:14 [PATCH] x86/public: Further correctsion to vcpu context comments Andrew Cooper
@ 2017-09-01 13:30 ` Jan Beulich
  2017-09-01 14:36 ` Roger Pau Monné
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2017-09-01 13:30 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu, Roger Pau Monné

>>> On 01.09.17 at 15:14, <andrew.cooper3@citrix.com> wrote:
> VCPUOP_initialise and DOMCTL_setvcpucontext are not symetric.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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



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

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

* Re: [PATCH] x86/public: Further correctsion to vcpu context comments
  2017-09-01 13:14 [PATCH] x86/public: Further correctsion to vcpu context comments Andrew Cooper
  2017-09-01 13:30 ` Jan Beulich
@ 2017-09-01 14:36 ` Roger Pau Monné
  1 sibling, 0 replies; 3+ messages in thread
From: Roger Pau Monné @ 2017-09-01 14:36 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Wei Liu, Jan Beulich, Xen-devel

There's a typo in the subject line s/correctsion/correction/. 

On Fri, Sep 01, 2017 at 02:14:41PM +0100, Andrew Cooper wrote:
> VCPUOP_initialise and DOMCTL_setvcpucontext are not symetric.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Long term DOMCTL_setvcpucontext should only be used by PV guests and
gdbsx should instead use the vpcu context save/restore IMHO.

Roger.

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

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

end of thread, other threads:[~2017-09-01 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 13:14 [PATCH] x86/public: Further correctsion to vcpu context comments Andrew Cooper
2017-09-01 13:30 ` Jan Beulich
2017-09-01 14:36 ` Roger Pau Monné

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.