[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [BUGFIX][PATCH 0/4] hvm_save_one: return correct data.



From: Don Slutz <dslutz@xxxxxxxxxxx>

Without this xenctx can return incorrect register values.  Also
xc_translate_foreign_address might do the wrong thing.

Patch #1 is unit test code.
Patch #2 is quick and dirty linux kernel module to offline some cpus
Patch #3 fixes the offline VCPU handling.
Patch #4 fixes hvm_save_one to be able to return PIC instance 1.


State:

# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2048     8     r-----      58.0
P-8-0                                        1  3080     8     r-----      27.1
# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2048     8     r-----      66.8
P-8-0                                        1  3080     1     ------      45.0


Before:

# ./check-hvmctx 1
Check HVM save record vs partial for domain 1
Error: entry 1: type 2 instance 2, length 1024 mismatch!
    CPU:    rax 0x0000000000000000     rbx 0xffffffff8006b287

(And PIC issue:)

# ./check-hvmctx 1
Check HVM save record vs partial for domain 1
Error: entry 1: type 2 instance 2, length 1024 mismatch!
    CPU:    rax 0x0000000000000000     rbx 0xffffffff8006b287
Error: xc_domain_hvm_getcontext_partial: entry 3: type 3 instance 1, length 8: 
Invalid argument
Error: entry 3: type 3 instance 1, length 8 mismatch!
    PIC: IRQ base 0x28, irr 0x11, imr 0xff, isr 0


After:

# ./check-hvmctx 1
Check HVM save record vs partial for domain 1


Don Slutz (4):
  tools/test: Add check-hvmctx
  Add tools/tests/offline_module
  hvm_save_one: return correct data.
  hvm_save_one: allow the 2nd instance to be fetched for PIC.

 tools/tests/check-hvmctx/.gitignore     |   1 +
 tools/tests/check-hvmctx/Makefile       |  34 ++
 tools/tests/check-hvmctx/README         |  21 +
 tools/tests/check-hvmctx/check-hvmctx.c | 661 ++++++++++++++++++++++++++++++++
 tools/tests/offline_module/.gitignore   |   8 +
 tools/tests/offline_module/Makefile     |  10 +
 tools/tests/offline_module/README       |  37 ++
 tools/tests/offline_module/offline.c    |  89 +++++
 xen/common/hvm/save.c                   |  31 +-
 9 files changed, 882 insertions(+), 10 deletions(-)
 create mode 100644 tools/tests/check-hvmctx/.gitignore
 create mode 100644 tools/tests/check-hvmctx/Makefile
 create mode 100644 tools/tests/check-hvmctx/README
 create mode 100644 tools/tests/check-hvmctx/check-hvmctx.c
 create mode 100644 tools/tests/offline_module/.gitignore
 create mode 100644 tools/tests/offline_module/Makefile
 create mode 100644 tools/tests/offline_module/README
 create mode 100644 tools/tests/offline_module/offline.c

-- 
1.8.4


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.