Re: [SeaBIOS] How much RAM is required?

2012-08-09 Thread Fred .
But QEMU may use other firmware/payload than SeaBIOS which might require less than 1 MB of RAM. On Thu, Aug 9, 2012 at 10:15 AM, Markus Armbruster arm...@redhat.com wrote: Kevin O'Connor ke...@koconnor.net writes: On Wed, Aug 08, 2012 at 01:50:13PM +0200, Markus Armbruster wrote: Watch this:

Re: [SeaBIOS] [Qemu-devel] [PULL 0/1] update qemu seabios / seabios release?

2012-08-09 Thread Kevin O'Connor
On Tue, Aug 07, 2012 at 05:45:07PM +0200, Gerd Hoffmann wrote: Hi, This pull updates seabios in qemu to the latest bits from seabios master, so the upcoming 1.2 qemu release gets all the new shiny stuff added recently. I'd like to have a new seabios release for inclusion into qemu 1.2

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Avi Kivity
On 08/09/2012 02:57 PM, Gerd Hoffmann wrote: Use kvmclock for tsc calibration when running on kvm. Without this the tsc frequency calibrated by seabios can be *way* off in case the virtual machine is booted on a loaded host. I've seen seabios calibrating 27 instead of ca. 2800 MHz, resulting

Re: [SeaBIOS] How much RAM is required?

2012-08-09 Thread Fred .
No, I am not. But I believe QEMU does have the functionality to load an arbitrary firmware. So the firmware doesn't necessarily have to be SeaBIOS. Don't know if its possible to make QEMU use an UEFI or OpenFirmware image instead, or if such an image exists. On Thu, Aug 9, 2012 at 2:59 PM, Peter

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Gerd Hoffmann
Hi, +u64 kvm_tsc_khz(void) +{ +u32 eax, ebx, ecx, edx, msr; +struct pvclock_vcpu_time_info time; +u32 addr = (u32)(time); +u64 khz; + +/* check presence and figure msr number */ +cpuid(KVM_CPUID_FEATURES, eax, ebx, ecx, edx); +if (eax

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Avi Kivity
On 08/09/2012 05:12 PM, Gerd Hoffmann wrote: Hi, er, the documentation says 4 bytes (so stack alignment works). I distinctly remember having a large alignment requirement so we don't cross a page or slot boundary... something's wrong here. case MSR_KVM_SYSTEM_TIME: { [ ... ]

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Gerd Hoffmann
Hi, So what do you suggest? The options I see are: (1) Use this patch (with alignment issue fixed of course). (2) Do a full kvmclock implementation. Feels a bit like overkill. (3) SeaBIOS can fallback to the PIT for timing on machines which have no TSC. We could do that too

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Avi Kivity
On 08/09/2012 05:18 PM, Gerd Hoffmann wrote: Hi, So what do you suggest? The options I see are: (1) Use this patch (with alignment issue fixed of course). (2) Do a full kvmclock implementation. Feels a bit like overkill. (3) SeaBIOS can fallback to the PIT for timing on machines

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Avi Kivity
On 08/09/2012 04:57 PM, Gerd Hoffmann wrote: Hi, +u64 kvm_tsc_khz(void) +{ +u32 eax, ebx, ecx, edx, msr; +struct pvclock_vcpu_time_info time; +u32 addr = (u32)(time); +u64 khz; + +/* check presence and figure msr number */ +cpuid(KVM_CPUID_FEATURES, eax, ebx,

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Fred .
It should be kHz not khz. -msr, (u32)khz / 1000); +msr, (u32)kHz / 1000); On Thu, Aug 9, 2012 at 2:53 PM, Avi Kivity a...@redhat.com wrote: On 08/09/2012 02:57 PM, Gerd Hoffmann wrote: Use kvmclock for tsc calibration when running on kvm. Without this the tsc

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Marcelo Tosatti
On Thu, Aug 09, 2012 at 05:01:34PM +0300, Avi Kivity wrote: On 08/09/2012 04:57 PM, Gerd Hoffmann wrote: Hi, +u64 kvm_tsc_khz(void) +{ +u32 eax, ebx, ecx, edx, msr; +struct pvclock_vcpu_time_info time; +u32 addr = (u32)(time); +u64 khz; + +/* check

Re: [SeaBIOS] [PATCH] tsc: use kvmclock for calibration

2012-08-09 Thread Marcelo Tosatti
On Thu, Aug 09, 2012 at 03:53:24PM +0300, Avi Kivity wrote: On 08/09/2012 02:57 PM, Gerd Hoffmann wrote: Use kvmclock for tsc calibration when running on kvm. Without this the tsc frequency calibrated by seabios can be *way* off in case the virtual machine is booted on a loaded host. I've