error while loading state for instance 0x0 of device 'kvmclock'
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance 0x0 of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?
Jan
Quoted 5 lines · Jan Kiszka
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance
0x0of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?
OK, this is due to "KVM: add flags to kvm_clock_data" (958b0c5497): the flags field is not cleared on KVM_SET_CLOCK. Will post a fix.
But the above kernel commit is also broken: KVM_GET_CLOCK checks uninitialized user_ns.flags (probably instead of the user's value). This raises the question if the caller of KVM_GET_CLOCK is also supposed to pass kvm_clock_data with flags cleared down to the kernel. Could someone clarify this so I could fix it accordingly?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Jan Kiszka
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance
0x0of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?
Quoted 9 lines
OK, this is due to "KVM: add flags to
kvm_clock_data" (958b0c5497): the flags field is not cleared onKVM_SET_CLOCK. Will post a fix.But the above kernel commit is also broken:
KVM_GET_CLOCKchecks uninitialized user_ns.flags (probably instead of the user's value). This raises the question if the caller ofKVM_GET_CLOCKis also supposed to passkvm_clock_datawith flags cleared down to the kernel. Could someone clarify this so I could fix it accordingly?
I'd make KVM_GET_CLOCK set the flags, not get them. So if we add new fields, we just set a new bit and userspace can read it.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 7 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance
0x0of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?
Quoted 8 lines
OK, this is due to "KVM: add flags to
kvm_clock_data" (958b0c5497): the flags field is not cleared onKVM_SET_CLOCK. Will post a fix.But the above kernel commit is also broken:
KVM_GET_CLOCKchecks uninitialized user_ns.flags (probably instead of the user's value). This raises the question if the caller ofKVM_GET_CLOCKis also supposed to passkvm_clock_datawith flags cleared down to the kernel. Could someone clarify this so I could fix it accordingly?
Yes userspace is supposed to clear flags. My bad.
Quoted 19 lines · Avi Kivity
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Jan Kiszka
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance
0x0of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?Quoted 9 lines
OK, this is due to "KVM: add flags to
kvm_clock_data" (958b0c5497): the flags field is not cleared onKVM_SET_CLOCK. Will post a fix.But the above kernel commit is also broken:
KVM_GET_CLOCKchecks uninitialized user_ns.flags (probably instead of the user's value). This raises the question if the caller ofKVM_GET_CLOCKis also supposed to passkvm_clock_datawith flags cleared down to the kernel. Could someone clarify this so I could fix it accordingly?
Quoted 2 lines
I'd make
KVM_GET_CLOCKset the flags, not get them. So if we add new fields, we just set a new bit and userspace can read it.
This makes sense and actually fixes the issue completely. Patch on its way...
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Avi Kivity
Quoted 17 lines · Jan Kiszka
Quoted 6 lines · Jan Kiszka
Hi,
current qemu-kvm.git gives me the message "qemu: warning: error while loading state for instance
0x0of device 'kvmclock'" when I run a simple "savevm" followed by a "loadvm 1". What's broken here?OK, this is due to "KVM: add flags to
kvm_clock_data" (958b0c5497): the flags field is not cleared onKVM_SET_CLOCK. Will post a fix.But the above kernel commit is also broken:
KVM_GET_CLOCKchecks uninitialized user_ns.flags (probably instead of the user's value). This raises the question if the caller ofKVM_GET_CLOCKis also supposed to passkvm_clock_datawith flags cleared down to the kernel. Could someone clarify this so I could fix it accordingly?
Quoted 5 lines
Quoted 2 lines
I'd make
KVM_GET_CLOCKset the flags, not get them. So if we add new fields, we just set a new bit and userspace can read it.This makes sense and actually fixes the issue completely. Patch on its way...
agreed. This is the best behaviour I can devise, indeed.