Hi,
Am 19.06.2012 11:02, schrieb 陳韋任 (Wei-Ren Chen):
>> Question is, what are you trying to do? In particular, of which CPU
>> (think SMP) are you trying to print ->some_field? :)
>
> Currently we only consider single CPU ARM guest, so there should be only one
> env we need to take care of. We add some fields into CPUState and want to
> print
> their value when the VM is terminated. For example,
>
> ---
> static void main_loop(void)
> {
> do {
> nonblocking = !kvm_enabled() && last_io > 0;
> last_io = main_loop_wait(nonblocking);
> } while (!main_loop_should_exit());
>
> // print env->some_field1
> // print env->some_field2
> }
> ---
>
> If we can access env in vl.c directly, it would make the task easier.
If you only have one CPU then using first_cpu->some_field1 should be
almost as easy. :)
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg