Skip to contentSkip to conversation

alpha-softmmu updates

GIT PULL Richard Henderson 3 participants 7 messages Jul 18, 2013

lore
Share & tools
lore
#0 lore raw

For reasons that are probably obvious in retrospect, the paravirtual alarm clocks should run on VM time, not wall clock time. Resume the guest and it'll spin like mad trying to make up for lost ticks.

Please pull.

r~

The following changes since commit 6453a3a69488196f26d12654c6b148446abdf3d6:

Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-15 14:49:16 -0500)

are available in the git repository at:

git://github.com/rth7680/qemu.git axp-next

for you to fetch changes up to f41f3a764dd1423035edd3f2bc140ce88459fed9:

pc-bios: Update palcode-clipper (2013-07-18 06:44:55 -0700)

----------------------------------------------------------------
Richard Henderson (2):
target-alpha: Move alarm to vm_clock
pc-bios: Update palcode-clipper

 hw/alpha/typhoon.c        |   2 +-
 pc-bios/README            |   2 +-
 pc-bios/palcode-clipper   | Bin 185703 -> 133550 bytes
 target-alpha/helper.h     |   3 ++-
 target-alpha/sys_helper.c |   7 ++++++-
 target-alpha/translate.c  |  12 ++++++++----
 6 files changed, 18 insertions(+), 8 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/2] target-alpha: Move alarm to vm_clock

Basing the alarm off the rtc_clock was silly. It leads to horrible spinning in the guest after being suspended and resumed, as it tries to catch up with lost ticks.

This requires adding an accessor for reading the vm_clock too.

---
 hw/alpha/typhoon.c        |  2 +-
 target-alpha/helper.h     |  3 ++-
 target-alpha/sys_helper.c |  7 ++++++-
 target-alpha/translate.c  | 12 ++++++++----
 4 files changed, 17 insertions(+), 7 deletions(-)
hw/alpha/typhoon.c +1 -1
index 3d7a1cd..b7fb044 100644
@@ -693,7 +693,7 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,
         AlphaCPU *cpu = cpus[i];
         s->cchip.cpu[i] = cpu;
         if (cpu != NULL) {
-            cpu->alarm_timer = qemu_new_timer_ns(rtc_clock,
+            cpu->alarm_timer = qemu_new_timer_ns(vm_clock,
                                                  typhoon_alarm_timer,
                                                  (void *)((uintptr_t)s + i));
         }
target-alpha/helper.h +2 -1
index 3321fde..0e425cf 100644
@@ -114,7 +114,8 @@ DEF_HELPER_FLAGS_2(tbis, TCG_CALL_NO_RWG, void, env, i64)
 
 DEF_HELPER_1(halt, void, i64);
 
-DEF_HELPER_FLAGS_0(get_time, TCG_CALL_NO_RWG, i64)
+DEF_HELPER_FLAGS_0(get_vmtime, TCG_CALL_NO_RWG, i64)
+DEF_HELPER_FLAGS_0(get_walltime, TCG_CALL_NO_RWG, i64)
 DEF_HELPER_FLAGS_2(set_alarm, TCG_CALL_NO_RWG, void, env, i64)
 #endif
 
target-alpha/sys_helper.c +6 -1
index 339501a..bd94597 100644
@@ -70,7 +70,12 @@ void helper_halt(uint64_t restart)
     }
 }
 
-uint64_t helper_get_time(void)
+uint64_t helper_get_vmtime(void)
+{
+    return qemu_get_clock_ns(vm_clock);
+}
+
+uint64_t helper_get_walltime(void)
 {
     return qemu_get_clock_ns(rtc_clock);
 }
target-alpha/translate.c +8 -4
index dd7f0fb..5558b72 100644
@@ -1634,15 +1634,19 @@ static ExitStatus gen_mfpr(int ra, int regno)
         return NO_EXIT;
     }
 
-    if (regno == 250) {
-        /* WALL_TIME */
+    /* Special help for VMTIME and WALLTIME.  */
+    if (regno == 250 || regno == 249) {
+	void (*helper)(TCGv) = gen_helper_get_walltime;
+	if (regno == 249) {
+		helper = gen_helper_get_vmtime;
+	}
         if (use_icount) {
             gen_io_start();
-            gen_helper_get_time(cpu_ir[ra]);
+            helper(cpu_ir[ra]);
             gen_io_end();
             return EXIT_PC_STALE;
         } else {
-            gen_helper_get_time(cpu_ir[ra]);
+            helper(cpu_ir[ra]);
             return NO_EXIT;
         }
     }
Signature · 1 line
1.8.1.4
#2 lore raw

[Qemu-devel] [PULL 2/2] pc-bios: Update palcode-clipper

In reply to Richard Henderson

Update image to c87a92639b28ac42bc8f6c67443543b405dc479b, incorporating changes for vm_time.

---
 pc-bios/README          |   2 +-
 pc-bios/palcode-clipper | Bin 185703 -> 133550 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
pc-bios/README +1 -1
index 030d92a..53b5289 100644
@@ -40,4 +40,4 @@
   git://repo.or.cz/s390-tools.git
 
 - The sources for the Alpha palcode image is available from:
-  git://repo.or.cz/qemu-palcode.git
+  git://github.com/rth7680/qemu-palcode.git
pc-bios/palcode-clipper binary +0 -0
index a92372c107af72071e265e1ca94b9ae5573bd317..9956340cd18552a1f694ee2fa1f1986cd0650b13 100755
GIT binary patch
Signature · 1 line
1.8.1.4
#3 lore raw

Re: [Qemu-devel] [PULL 2/2] pc-bios: Update palcode-clipper

Il 18/07/2013 15:50, Richard Henderson ha scritto:

Quoted 8 lines

Update image to c87a92639b28ac42bc8f6c67443543b405dc479b, incorporating changes for vm_time.

---
 pc-bios/README          |   2 +-
 pc-bios/palcode-clipper | Bin 185703 -> 133550 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)

Can you add a submodule in roms/ too?

Paolo

Quoted 1,230 lines
pc-bios/README +1 -1
index 030d92a..53b5289 100644
@@ -40,4 +40,4 @@
   git://repo.or.cz/s390-tools.git
 
 - The sources for the Alpha palcode image is available from:
-  git://repo.or.cz/qemu-palcode.git
+  git://github.com/rth7680/qemu-palcode.git
pc-bios/palcode-clipper binary +0 -0
index a92372c107af72071e265e1ca94b9ae5573bd317..9956340cd18552a1f694ee2fa1f1986cd0650b13 100755
GIT binary patch
#4 lore raw

Re: [Qemu-devel] [PULL 2/2] pc-bios: Update palcode-clipper

Quoted 11 lines · Paolo Bonzini

Il 18/07/2013 15:50, Richard Henderson ha scritto:

Quoted 8 lines

Update image to c87a92639b28ac42bc8f6c67443543b405dc479b, incorporating changes for vm_time.

---
 pc-bios/README          |   2 +-
 pc-bios/palcode-clipper | Bin 185703 -> 133550 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)

Can you add a submodule in roms/ too?

And can we have it and the existing qemu-palcode.git live on git.qemu.org like all our other rom submodules?

thanks
-- PMM

#5 lore raw

Re: [Qemu-devel] [PULL 2/2] pc-bios: Update palcode-clipper

Quoted 2 lines · Peter Maydell

And can we have it and the existing qemu-palcode.git live on git.qemu.org like all our other rom submodules?

That I can't help you with. I did at least move it to github...

r~

#6 lore raw

Re: [Qemu-devel] [PULL 2/2] pc-bios: Update palcode-clipper

In reply to Paolo Bonzini
Quoted 1 line · Paolo Bonzini

Can you add a submodule in roms/ too?

I forgot we already had one. I'll update and re-send.

r~