Skip to contentSkip to conversation

KVM: PPC: Pass through program interrupts

PATCH Applied Alexander Graf 3 participants 11 messages Jan 10, 2010 7 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 KVM: PPC: Pass through program interrupts

When we get a program interrupt in guest kernel mode, we try to emulate the instruction.

If that doesn't fail, we report to the user and try again - at the exact same instruction pointer. So if the guest kernel really does trigger an invalid instruction, we loop forever.

So let's better go and forward program exceptions to the guest when we don't know the instruction we're supposed to emulate.

---
 arch/powerpc/kvm/emulate.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/powerpc/kvm/emulate.c +1 -0
index 8b0ba0b..b905623 100644
@@ -476,6 +476,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
 			advance = 0;
 			printk(KERN_ERR "Couldn't emulate instruction 0x%08x "
 			       "(op %d xop %d)\n", inst, get_op(inst), get_xop(inst));
+			kvmppc_core_queue_program(vcpu, 0);
 		}
 	}
 
Signature · 1 line
1.6.0.2
Applied
#1 lore raw
Quoted 11 lines · Alexander Graf

When we get a program interrupt in guest kernel mode, we try to emulate the instruction.

If that doesn't fail, we report to the user and try again - at the exact same instruction pointer. So if the guest kernel really does trigger an invalid instruction, we loop forever.

So let's better go and forward program exceptions to the guest when we don't know the instruction we're supposed to emulate.

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

Signature · 1 line
error compiling committee.c: too many arguments to function

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Alexander Graf

When we get a program interrupt in guest kernel mode, we try to emulate the instruction.

If that doesn't fail, we report to the user and try again - at the exact same instruction pointer. So if the guest kernel really does trigger an invalid instruction, we loop forever.

Quoted 6 lines
Quoted 4 lines

So let's better go and forward program exceptions to the guest when we don't know the instruction we're supposed to emulate.

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

I'm not sure what to mention. From a stability point of view, all the Book3S patches should go in .33 because they all fix severe bugs.

But then again the question is what our goal for .33 is. If we only want to give out the message "KVM for Book3S is coming! Stay tuned!" then we shouldn't do any updates for .33. If we want to have something working to the best of our knowledge, all patches should go into .33.

Alex

A message that is not in the archive (sent off-list or not yet received): 3F51B03C-D36B-49F9-9AF3-EF5227DFAE3F-l3A5Bk7waGM@public.gmane.org

#5 lore raw
Quoted 8 lines · Alexander Graf
Quoted 4 lines

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

I'm not sure what to mention. From a stability point of view, all the Book3S patches should go in .33 because they all fix severe bugs.

But then again the question is what our goal for .33 is. If we only want to give out the message "KVM for Book3S is coming! Stay tuned!" then we shouldn't do any updates for .33. If we want to have something working to the best of our knowledge, all patches should go into .33.

Given the other 9-patch series, I'll regard .33 as a sneak preview (look but don't touch) and .34 will be the first really serious kvm ppc64 release.

Signature · 1 line
error compiling committee.c: too many arguments to function

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 11 lines · Avi Kivity
Quoted 8 lines · Alexander Graf
Quoted 4 lines

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

I'm not sure what to mention. From a stability point of view, all the Book3S patches should go in .33 because they all fix severe bugs.

But then again the question is what our goal for .33 is. If we only want to give out the message "KVM for Book3S is coming! Stay tuned!" then we shouldn't do any updates for .33. If we want to have something working to the best of our knowledge, all patches should go into .33.

Given the other 9-patch series, I'll regard .33 as a sneak preview (look but don't touch) and .34 will be the first really serious kvm ppc64 release.

That's what I figured too, so I didn't queue anything explicitly for .33 :-).

Alex

#8 lore raw
In reply to a message not in the archive
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Alexander Graf

When we get a program interrupt in guest kernel mode, we try to emulate the instruction.

If that doesn't fail, we report to the user and try again - at the exact same instruction pointer. So if the guest kernel really does trigger an invalid instruction, we loop forever.

Quoted 6 lines
Quoted 3 lines

So let's better go and forward program exceptions to the guest when we don't know the instruction we're supposed to emulate.

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

I get this building ppc32:

scripts/kconfig/conf -s arch/powerpc/Kconfig

  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh

<stdin>:1523:2: warning: #warning syscall recvmmsg not implemented
CC arch/powerpc/kvm/emulate.o
arch/powerpc/kvm/emulate.c: In function 'kvmppc_emulate_instruction':
arch/powerpc/kvm/emulate.c:467: error: too many arguments to function 'kvmppc_core_queue_program' make[1]: *** [arch/powerpc/kvm/emulate.o] Error 1

Signature · 1 line
error compiling committee.c: too many arguments to function

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw
Quoted 9 lines · Avi Kivity
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Alexander Graf

When we get a program interrupt in guest kernel mode, we try to emulate the instruction.

If that doesn't fail, we report to the user and try again - at the exact same instruction pointer. So if the guest kernel really does trigger an invalid instruction, we loop forever.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

So let's better go and forward program exceptions to the guest when we don't know the instruction we're supposed to emulate.

Applied both, and queued for .33. I was able to guess this from the description, but please mention it explicitly in the future.

I get this building ppc32:

PPC32? That shouldn't even allow enabling KVM O_o.

Alex--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): A5862364-1443-4A32-85B8-13B11B2E55DA-l3A5Bk7waGM@public.gmane.org

#12 lore raw
Quoted 6 lines · Alexander Graf
Quoted 3 lines

I get this building ppc32:

PPC32? That shouldn't even allow enabling KVM O_o.

You know, the embedded stuff.

Enabled config options:

VIRTUALIZATION=y
KVM=y
KVM_440=y
KVM_E500=n
KVM_EXIT_TIMING=n

Signature · 1 line
error compiling committee.c: too many arguments to function

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw
Quoted 9 lines · Avi Kivity
Quoted 6 lines · Alexander Graf
Quoted 3 lines

I get this building ppc32:

PPC32? That shouldn't even allow enabling KVM O_o.

You know, the embedded stuff.

Hm, that patch is based on the big patchset I sent earlier. Are you sure you have applied them in the correct order?

Alex--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): A21E3A8F-81D1-468A-BE37-9CB5718E1FB8-l3A5Bk7waGM@public.gmane.org

#16 lore raw
Quoted 3 lines · Alexander Graf

Hm, that patch is based on the big patchset I sent earlier. Are you sure you have applied them in the correct order?

Probably not. Will reorder and retry.

Signature · 1 line
error compiling committee.c: too many arguments to function
#17 lore raw
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Alexander Graf

Hm, that patch is based on the big patchset I sent earlier. Are you sure you have applied them in the correct order?

Probably not. Will reorder and retry.

No, still fails. Please take a look at kvm-updates/2.6.34 commit 7f31fad9aa, subject to git.kernel.org rsync delay (was doing bisectability testing).

Signature · 1 line
error compiling committee.c: too many arguments to function