adding fields to vcpu_info_t
I've been trying to add a field into vcpu_info_t for some per-vcpu flags. Attached is a small patch that does nothing more than add the field. However, it causes problems when booting dom0 smp, so I obviously need to update some code elsewhere to account for the change. Can anyone give me a pointer to where I should making additional changes when adding a new field to vcpu_info_t ?
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
[email protected]
xen/include/public/xen.h +3 -2
@@ -335,8 +335,9 @@u8 evtchn_upcall_mask;/* 1 */ u8 pad0, pad1;u32 evtchn_pending_sel;/* 4 */ -arch_vcpu_info_t arch;/* 8 */ -}PACKED vcpu_info_t;/* 8 + arch */ +u32 v_flags;/* 8 */ +arch_vcpu_info_t arch;/* 12 */ +}PACKED vcpu_info_t;/* 12 + arch */ /* * Xen/kernel shared data -- pointer provided in start_info.
------------[ cut here ]------------ kernel BUG at <bad filename>:5097! invalid operand: 0000 [#2] PREEMPT SMP DEBUG_PAGEALLOC Modules linked in: CPU: 1 EIP: 0061:[<c015d769>] Not tainted VLI EFLAGS: 00010202 (2.6.11-xen0-smp)
EIP is at __find_get_block+0x119/0x120
eax: fbffc00c ebx: fbffc000 ecx: de2ee000 edx: dff59df8
esi: decfae2c edi: 00180205 ebp: 00000000 esp: de2efe1c
ds: 007b es: 007b ss: 0069
Process rcS (pid: 1025, threadinfo=de2ee000 task=de2b1af0)
Stack: 00000012 00000000 00000000 00001000 00180205 decfae2c 00000000 c015d79b
decfae2c 00180205 00001000 de2eff14 00000000 ddfabea0 c01c16a3 decfae2c
00180205 00001000 de2efe74 00000000 00000001 de47dd8c 00000010 08101038
Call Trace:
[<c015d79b>] __getblk+0x2b/0x60
[<c01c16a3>] ext3_getblk+0x93/0x260
[<c014b7f4>] do_no_page+0x64/0x380
[<c01c18a3>] ext3_bread+0x33/0xb0
[<c01be85e>] ext3_readdir+0x13e/0x4f0
[<c0114d5c>] do_page_fault+0x19c/0x6a7
[<c014ec66>] do_brk+0x256/0x2e0
[<c016d879>] vfs_readdir+0x79/0xa0
[<c016db80>] filldir64+0x0/0x100
[<c016dcf4>] sys_getdents64+0x74/0xca
[<c016db80>] filldir64+0x0/0x100
[<c014cc8e>] sys_brk+0xee/0x120
[<c0109aef>] syscall_call+0x7/0xb_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Ryan Harper
I've been trying to add a field into
vcpu_info_tfor some per-vcpu flags. Attached is a small patch that does nothing more than add the field. However, it causes problems when booting dom0 smp, so I obviously need to update some code elsewhere to account for the change. Can anyone give me a pointer to where I should making additional changes when adding a new field tovcpu_info_t?
If you can fit in the two existing bytes of padding then nothing will need changing. Otherwise there is asm code in Linux (entry.S) that probably needs adjusting.
-- Keir