Hi,

> By the way: "kvm FSB clock is 1GHz" -- where is that constant set in
> KVM?
> 
> ... is it "target/i386/kvm/kvm.c" in QEMU:
> 
> > /* From arch/x86/kvm/lapic.h */
> > #define KVM_APIC_BUS_CYCLE_NS       1
> > #define KVM_APIC_BUS_FREQUENCY      (1000000000ULL / KVM_APIC_BUS_CYCLE_NS)
> 
> FWIW, APIC_BUS_CYCLE_NS=1 goes back to historical KVM commit
> 97222cc83163 ("KVM: Emulate local APIC in kernel", 2007-10-13). The
> commit does not say anything about this particular choice. (Maybe I
> should look at the QEMU source from 2007 -- perhaps the KVM commit was
> inspired by QEMU practice back then. And now we've come full circle: the
> definitive constant lives in the kernel, which is where QEMU is taking
> it from...)
> 
> ... I think these macros are pretty difficult to find, unless one knows
> already what they're looking for!

I know ;)

Did the same a while back, looking for a way to figure at runtime
what the frequency is (simliar to xen), only to find that it is not
needed on kvm because frequency is fixed.

> BTW is there a chance that TCG uses a different frequency?

Never noticed a difference.  Unlikely I'd say.  Maybe kvm uses 1GHz
because tcg does after all.  Didn't check the code though.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90000): https://edk2.groups.io/g/devel/message/90000
Mute This Topic: https://groups.io/mt/91288310/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to