[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Any better way to access CPUArchState in vl.c?
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] Any better way to access CPUArchState in vl.c? |
Date: |
Tue, 19 Jun 2012 11:54:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
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