Bug 674514

Summary: xenctx shows nonsensical values for 32-on-64 and HVM domains
Product: Red Hat Enterprise Linux 5 Reporter: Paolo Bonzini <pbonzini>
Component: kernel-xenAssignee: Michal Novotny <minovotn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: areis, drjones, jarod, jlv, jzheng, leiwang, minovotn, mjenner, mrezanin, mshao, pbonzini, qwan, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 626806
: 674516 (view as bug list) Environment:
Last Closed: 2011-07-21 10:27:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 514490, 626806, 674516    
Attachments:
Description Flags
Patch to implement new domctl to get partial HVM context
none
New version of the patch to implement new domctl to get partial HVM context none

Description Paolo Bonzini 2011-02-02 09:37:44 UTC
This requires backporting:

- c/s 19168 and 19169 for the hypervisor

- c/s 19170 for libxc 

- c/s 18962, c/s 18963, c/s 19171, c/s 19453 for xenctx.

This is also required to block 32-on-64 ballooning while it's not implemented

Comment 2 RHEL Program Management 2011-02-02 12:30:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Michal Novotny 2011-02-02 14:46:55 UTC
Created attachment 476584 [details]
Patch to implement new domctl to get partial HVM context

Upstream status: c/s 19168 and c/s 19169

Hi,
this is the backport of commits 19168 and 19169 from upstream
to support a new domctl to get a single record from HVM save
context. This is necessary to create a patch for bug 674516.

Michal

Comment 4 Michal Novotny 2011-02-23 12:09:54 UTC
Created attachment 480433 [details]
New version of the patch to implement new domctl to get partial HVM context

New version of the patch to implement new domctl to get partial HVM context

Upstream status: c/s 19168 and c/s 19169

Hi,
this is the backport of commits 19168 and 19169 from upstream
to support a new domctl to get a single record from HVM save
context. This is necessary to create a patch for bug 674516.

Michal

Comment 6 Jarod Wilson 2011-03-03 20:34:43 UTC
in kernel-2.6.18-246.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 8 Jinxin Zheng 2011-05-09 08:17:36 UTC
Would repeating the steps in bug 626806 be correct to verify this and bug 674516?

Comment 9 Paolo Bonzini 2011-05-09 08:29:38 UTC
You can try running /usr/lib64/xen/bin/xenctx for a 32-on-64 guest, both PV and HVM.  It should print 32-bit register values, not 64-bit.

Comment 10 Jinxin Zheng 2011-05-09 11:13:56 UTC
This is the xenctx output for 32 bit PV and HVM on kernel-xen -238 and xen -120:

PV:

rip: 00010000 
rsp: c04057280061000b
rax: 00010000	rbx: 69c0708fbc	rcx: c062157c00610703	rdx: c04056ec00610304
rsi: c04056f800610005	rdi: c040570400610006	rbp: 124600000061
 r8: c062155800610401	 r9: c040556800610000	r10: 00000000	r11: 7b0000007b
r12: c04013a701000000	r13: 00000020	r14: 00000001	r15: 00000000
 cs: 00000009	 ds: 0000040e	 fs: 0000000f	 gs: 00000010

HVM:

rip: c0403c4b 
rsp: c0708fd4
rax: 00000000	rbx: 00000000	rcx: c0403c1a	rdx: c0708000
rsi: c0638c23	rdi: c18088c4	rbp: 00000020
 r8: 00000000	 r9: 00000000	r10: 00000000	r11: 00000000
r12: 00000000	r13: 00000000	r14: 00000000	r15: 00000000
 cs: 00000060	 ds: 00000000	 fs: 00000000	 gs: 00000000

We can see the 64-bit register (rip,rsp,...) values are printed.

After upgrade to kernel-xen -259 and xen -130, the xenctx outputs 32-bit registers (eax,ebx,...) now:

PV:

cs:eip: 0061:c0456b68 
flags: 00001246 i z p
ss:esp: 0069:c0e55e34
eax: 00000012	ebx: c0697000	ecx: c069700c	edx: 00000003
esi: c1600a40	edi: c069700c	ebp: 00000000
 ds:     007b	 es:     007b	 fs:     0000	 gs:     0000

Stack:
--

HVM:

cs:eip: 0060:c0403c4b 
flags: 00000246 i z p
ss:esp: 0068:c0708fd4
eax: 00000000	ebx: 00000000	ecx: c0403c1a	edx: c0708000
esi: c0638c23	edi: c18088c4	ebp: 00000020
 ds:     0000	 es:     0000	 fs:     0000	 gs:     0000

Stack:
 c0403d12 c0638c45 c070d9fa 00006e44 00000000 c078ce20 02010800 00099800
 c06fa800 00880007 00000000

Code:
Code (instr addr c0403c4b)
0c fd eb 14 fa 89 e0 25 00 f0 ff ff 8b 40 08 a8 08 75 04 fb f4 <eb> 01 fb 89 e2 81 e2 00 f0 ff ff 

Call Trace:
  [<c0403c4b>]  <--
  [<c0403d12>] 
  [<c0638c45>] 
  [<c070d9fa>] 
  [<c078ce20>] 
  [<c06fa800>] 


so this is verified together with bug 674516.

Comment 11 errata-xmlrpc 2011-07-21 10:27:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1065.html