qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to sa


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state
Date: Tue, 11 Jan 2011 06:55:55 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Am 11.01.2011 00:04, Anthony Liguori wrote:
>>>   kvmclock should be created with
>>> kvm_state as a parameter and kvm_vm_ioctl() is passed the stored
>>> reference.   Taking a global reference to kvm_state in machine_init is
>>> not a bad thing, obviously the machine initialization function needs
>>> access to the kvm_state.
>>>      
>> This would also require changing sysbus interfaces for the sake of KVM's
>> "abstraction". If this is the only way forward, I could look into this.
>>
>> Still, I do not see any benefit for the affected code. You then either
>> need to "steal" a kvm_state reference from the first cpu or introduce a
>> marvelous interface like kvm_get_state() to make this work from outside
>> of the KVM core.
>>    
> 
> Or move kvm_init() to pc_init() and then pc_init() has the kvm_state
> reference.

Or pass the reference to the machine_init service to avoid duplicating
kvm_init logic for every KVM arch.

That alone would still be consistent. But as long as we do not pass a
kvm_state to each and every memory registration (for
kvm_setup_guest_memory), this all is like putting a fence around half of
your yard and only declaring it closed.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]