* [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
@ 2010-08-18 7:36 Avi Kivity
2010-08-18 8:14 ` Avi Kivity
2010-08-18 12:46 ` Mohammed Gamal
0 siblings, 2 replies; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 7:36 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch/x86/kvm/x86.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f6a31a1..e2b0e36 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq)
vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
+ vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
ret = emulate_int_real(&vcpu->arch.emulate_ctxt, &emulate_ops, irq);
if (ret != X86EMUL_CONTINUE)
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 7:36 [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection Avi Kivity
@ 2010-08-18 8:14 ` Avi Kivity
2010-08-18 12:46 ` Mohammed Gamal
1 sibling, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 8:14 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
On 08/18/2010 10:36 AM, Avi Kivity wrote:
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
> arch/x86/kvm/x86.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index f6a31a1..e2b0e36 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq)
>
> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
> ret = emulate_int_real(&vcpu->arch.emulate_ctxt,&emulate_ops, irq);
>
> if (ret != X86EMUL_CONTINUE)
With this, the non-atomic-injection branch trips into an unemulated DAS
instruction (when it doesn't inject an interrupt at the wrong place).
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 7:36 [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection Avi Kivity
2010-08-18 8:14 ` Avi Kivity
@ 2010-08-18 12:46 ` Mohammed Gamal
2010-08-18 14:09 ` Avi Kivity
1 sibling, 1 reply; 9+ messages in thread
From: Mohammed Gamal @ 2010-08-18 12:46 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity <avi@redhat.com> wrote:
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
> arch/x86/kvm/x86.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index f6a31a1..e2b0e36 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq)
>
> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
I think it'd make more sense to make
vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
we already initlialize the emulation context eip. It's not going to
make any real difference, but it's more readable this way I suppose,
and is symmetric to the assignment of the emulation context eip value
after the call to emulate_int_real()
> ret = emulate_int_real(&vcpu->arch.emulate_ctxt, &emulate_ops, irq);
>
> if (ret != X86EMUL_CONTINUE)
> --
> 1.7.1
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 12:46 ` Mohammed Gamal
@ 2010-08-18 14:09 ` Avi Kivity
2010-08-18 14:11 ` Avi Kivity
0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 14:09 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
On 08/18/2010 03:46 PM, Mohammed Gamal wrote:
> On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity<avi@redhat.com> wrote:
>> Signed-off-by: Avi Kivity<avi@redhat.com>
>> ---
>> arch/x86/kvm/x86.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index f6a31a1..e2b0e36 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq)
>>
>> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
>> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
>> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
> I think it'd make more sense to make
> vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
> we already initlialize the emulation context eip. It's not going to
> make any real difference, but it's more readable this way I suppose,
> and is symmetric to the assignment of the emulation context eip value
> after the call to emulate_int_real()
Right, patch updated.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 14:09 ` Avi Kivity
@ 2010-08-18 14:11 ` Avi Kivity
2010-08-18 14:32 ` Mohammed Gamal
0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 14:11 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
On 08/18/2010 05:09 PM, Avi Kivity wrote:
> On 08/18/2010 03:46 PM, Mohammed Gamal wrote:
>> On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity<avi@redhat.com> wrote:
>>> Signed-off-by: Avi Kivity<avi@redhat.com>
>>> ---
>>> arch/x86/kvm/x86.c | 1 +
>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>> index f6a31a1..e2b0e36 100644
>>> --- a/arch/x86/kvm/x86.c
>>> +++ b/arch/x86/kvm/x86.c
>>> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct
>>> kvm_vcpu *vcpu, int irq)
>>>
>>> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
>>> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
>>> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
>> I think it'd make more sense to make
>> vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
>> we already initlialize the emulation context eip. It's not going to
>> make any real difference, but it's more readable this way I suppose,
>> and is symmetric to the assignment of the emulation context eip value
>> after the call to emulate_int_real()
>
> Right, patch updated.
>
btw, with the other fixes in non-atomic-injection the bios is able to
boot up to the "no bootable device" message.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 14:11 ` Avi Kivity
@ 2010-08-18 14:32 ` Mohammed Gamal
2010-08-18 14:46 ` Avi Kivity
0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Gamal @ 2010-08-18 14:32 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Wed, Aug 18, 2010 at 5:11 PM, Avi Kivity <avi@redhat.com> wrote:
> On 08/18/2010 05:09 PM, Avi Kivity wrote:
>>
>> On 08/18/2010 03:46 PM, Mohammed Gamal wrote:
>>>
>>> On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity<avi@redhat.com> wrote:
>>>>
>>>> Signed-off-by: Avi Kivity<avi@redhat.com>
>>>> ---
>>>> arch/x86/kvm/x86.c | 1 +
>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>>> index f6a31a1..e2b0e36 100644
>>>> --- a/arch/x86/kvm/x86.c
>>>> +++ b/arch/x86/kvm/x86.c
>>>> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu
>>>> *vcpu, int irq)
>>>>
>>>> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
>>>> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
>>>> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
>>>
>>> I think it'd make more sense to make
>>> vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
>>> we already initlialize the emulation context eip. It's not going to
>>> make any real difference, but it's more readable this way I suppose,
>>> and is symmetric to the assignment of the emulation context eip value
>>> after the call to emulate_int_real()
>>
>> Right, patch updated.
>>
>
> btw, with the other fixes in non-atomic-injection the bios is able to boot
> up to the "no bootable device" message.
Did u try running it with any actual guests?
>
> --
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 14:32 ` Mohammed Gamal
@ 2010-08-18 14:46 ` Avi Kivity
2010-08-18 15:32 ` Mohammed Gamal
0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 14:46 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
On 08/18/2010 05:32 PM, Mohammed Gamal wrote:
> On Wed, Aug 18, 2010 at 5:11 PM, Avi Kivity<avi@redhat.com> wrote:
>> On 08/18/2010 05:09 PM, Avi Kivity wrote:
>>> On 08/18/2010 03:46 PM, Mohammed Gamal wrote:
>>>> On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity<avi@redhat.com> wrote:
>>>>> Signed-off-by: Avi Kivity<avi@redhat.com>
>>>>> ---
>>>>> arch/x86/kvm/x86.c | 1 +
>>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>>
>>>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>>>> index f6a31a1..e2b0e36 100644
>>>>> --- a/arch/x86/kvm/x86.c
>>>>> +++ b/arch/x86/kvm/x86.c
>>>>> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu
>>>>> *vcpu, int irq)
>>>>>
>>>>> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
>>>>> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
>>>>> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
>>>> I think it'd make more sense to make
>>>> vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
>>>> we already initlialize the emulation context eip. It's not going to
>>>> make any real difference, but it's more readable this way I suppose,
>>>> and is symmetric to the assignment of the emulation context eip value
>>>> after the call to emulate_int_real()
>>> Right, patch updated.
>>>
>> btw, with the other fixes in non-atomic-injection the bios is able to boot
>> up to the "no bootable device" message.
> Did u try running it with any actual guests?
I did, the disk is not recognized, so something's still broken.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 14:46 ` Avi Kivity
@ 2010-08-18 15:32 ` Mohammed Gamal
2010-08-18 15:45 ` Avi Kivity
0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Gamal @ 2010-08-18 15:32 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Wed, Aug 18, 2010 at 5:46 PM, Avi Kivity <avi@redhat.com> wrote:
> On 08/18/2010 05:32 PM, Mohammed Gamal wrote:
>>
>> On Wed, Aug 18, 2010 at 5:11 PM, Avi Kivity<avi@redhat.com> wrote:
>>>
>>> On 08/18/2010 05:09 PM, Avi Kivity wrote:
>>>>
>>>> On 08/18/2010 03:46 PM, Mohammed Gamal wrote:
>>>>>
>>>>> On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity<avi@redhat.com> wrote:
>>>>>>
>>>>>> Signed-off-by: Avi Kivity<avi@redhat.com>
>>>>>> ---
>>>>>> arch/x86/kvm/x86.c | 1 +
>>>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>>>>> index f6a31a1..e2b0e36 100644
>>>>>> --- a/arch/x86/kvm/x86.c
>>>>>> +++ b/arch/x86/kvm/x86.c
>>>>>> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct
>>>>>> kvm_vcpu
>>>>>> *vcpu, int irq)
>>>>>>
>>>>>> vcpu->arch.emulate_ctxt.decode.op_bytes = 2;
>>>>>> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
>>>>>> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu);
>>>>>
>>>>> I think it'd make more sense to make
>>>>> vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as
>>>>> we already initlialize the emulation context eip. It's not going to
>>>>> make any real difference, but it's more readable this way I suppose,
>>>>> and is symmetric to the assignment of the emulation context eip value
>>>>> after the call to emulate_int_real()
>>>>
>>>> Right, patch updated.
>>>>
>>> btw, with the other fixes in non-atomic-injection the bios is able to
>>> boot
>>> up to the "no bootable device" message.
>>
>> Did u try running it with any actual guests?
>
> I did, the disk is not recognized, so something's still broken.
So far I get hard disk images recognized, but cdrom images aren't.
>
> --
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection
2010-08-18 15:32 ` Mohammed Gamal
@ 2010-08-18 15:45 ` Avi Kivity
0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2010-08-18 15:45 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm
On 08/18/2010 06:32 PM, Mohammed Gamal wrote:
>
>> I did, the disk is not recognized, so something's still broken.
> So far I get hard disk images recognized, but cdrom images aren't.
Try DEBUG_BIOS in pc.c and see why.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-08-18 15:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 7:36 [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection Avi Kivity
2010-08-18 8:14 ` Avi Kivity
2010-08-18 12:46 ` Mohammed Gamal
2010-08-18 14:09 ` Avi Kivity
2010-08-18 14:11 ` Avi Kivity
2010-08-18 14:32 ` Mohammed Gamal
2010-08-18 14:46 ` Avi Kivity
2010-08-18 15:32 ` Mohammed Gamal
2010-08-18 15:45 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).