* [Qemu-devel] [PATCH] xics-kvm: fix reset function
@ 2014-02-13 1:08 Alexey Kardashevskiy
2014-03-04 7:03 ` Alexey Kardashevskiy
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Kardashevskiy @ 2014-02-13 1:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf
Currently interrupt priorities are set to 0 (highest) at the very
beginning of the guest execution which is not correct and makes the guest
produce random interrupt error messages such as:
"Interrupt 0x1001 (real) is invalid, disabling it".
This also prevents interrupt states from correct migration.
This initializes priority to 0xFF as the emulated XICS does.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/intc/xics_kvm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index c203646..eaf94d9 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -269,6 +269,15 @@ static void ics_kvm_set_irq(void *opaque, int srcno, int val)
static void ics_kvm_reset(DeviceState *dev)
{
+ ICSState *ics = ICS(dev);
+ int i;
+
+ memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
+ for (i = 0; i < ics->nr_irqs; i++) {
+ ics->irqs[i].priority = 0xff;
+ ics->irqs[i].saved_priority = 0xff;
+ }
+
ics_set_kvm_state(ICS(dev), 1);
}
--
1.8.4.rc4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] xics-kvm: fix reset function
2014-02-13 1:08 [Qemu-devel] [PATCH] xics-kvm: fix reset function Alexey Kardashevskiy
@ 2014-03-04 7:03 ` Alexey Kardashevskiy
2014-03-12 14:42 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-04 7:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Paul Mackerras, qemu-ppc, Alexander Graf
On 02/13/2014 12:08 PM, Alexey Kardashevskiy wrote:
> Currently interrupt priorities are set to 0 (highest) at the very
> beginning of the guest execution which is not correct and makes the guest
> produce random interrupt error messages such as:
> "Interrupt 0x1001 (real) is invalid, disabling it".
> This also prevents interrupt states from correct migration.
>
> This initializes priority to 0xFF as the emulated XICS does.
Ping? Pretty simple patch suggested by Paul Mackerras.
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> hw/intc/xics_kvm.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index c203646..eaf94d9 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -269,6 +269,15 @@ static void ics_kvm_set_irq(void *opaque, int srcno, int val)
>
> static void ics_kvm_reset(DeviceState *dev)
> {
> + ICSState *ics = ICS(dev);
> + int i;
> +
> + memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
> + for (i = 0; i < ics->nr_irqs; i++) {
> + ics->irqs[i].priority = 0xff;
> + ics->irqs[i].saved_priority = 0xff;
> + }
> +
> ics_set_kvm_state(ICS(dev), 1);
> }
>
>
--
Alexey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] xics-kvm: fix reset function
2014-03-04 7:03 ` Alexey Kardashevskiy
@ 2014-03-12 14:42 ` Andreas Färber
2014-03-12 23:00 ` Alexey Kardashevskiy
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2014-03-12 14:42 UTC (permalink / raw)
To: Alexey Kardashevskiy, qemu-devel; +Cc: qemu-ppc, Paul Mackerras, Alexander Graf
Am 04.03.2014 08:03, schrieb Alexey Kardashevskiy:
> On 02/13/2014 12:08 PM, Alexey Kardashevskiy wrote:
>> Currently interrupt priorities are set to 0 (highest) at the very
>> beginning of the guest execution which is not correct and makes the guest
>> produce random interrupt error messages such as:
>> "Interrupt 0x1001 (real) is invalid, disabling it".
>> This also prevents interrupt states from correct migration.
>>
>> This initializes priority to 0xFF as the emulated XICS does.
>
>
> Ping? Pretty simple patch suggested by Paul Mackerras.
Is this one still needed? Can we document a Suggested-by?
Andreas
>
>
>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>> hw/intc/xics_kvm.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
>> index c203646..eaf94d9 100644
>> --- a/hw/intc/xics_kvm.c
>> +++ b/hw/intc/xics_kvm.c
>> @@ -269,6 +269,15 @@ static void ics_kvm_set_irq(void *opaque, int srcno, int val)
>>
>> static void ics_kvm_reset(DeviceState *dev)
>> {
>> + ICSState *ics = ICS(dev);
>> + int i;
>> +
>> + memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
>> + for (i = 0; i < ics->nr_irqs; i++) {
>> + ics->irqs[i].priority = 0xff;
>> + ics->irqs[i].saved_priority = 0xff;
>> + }
>> +
>> ics_set_kvm_state(ICS(dev), 1);
>> }
>>
>>
>
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] xics-kvm: fix reset function
2014-03-12 14:42 ` Andreas Färber
@ 2014-03-12 23:00 ` Alexey Kardashevskiy
2014-03-12 23:45 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-12 23:00 UTC (permalink / raw)
To: Andreas Färber, qemu-devel; +Cc: qemu-ppc, Paul Mackerras, Alexander Graf
On 03/13/2014 01:42 AM, Andreas Färber wrote:
> Am 04.03.2014 08:03, schrieb Alexey Kardashevskiy:
>> On 02/13/2014 12:08 PM, Alexey Kardashevskiy wrote:
>>> Currently interrupt priorities are set to 0 (highest) at the very
>>> beginning of the guest execution which is not correct and makes the guest
>>> produce random interrupt error messages such as:
>>> "Interrupt 0x1001 (real) is invalid, disabling it".
>>> This also prevents interrupt states from correct migration.
>>>
>>> This initializes priority to 0xFF as the emulated XICS does.
>>
>>
>> Ping? Pretty simple patch suggested by Paul Mackerras.
>
> Is this one still needed? Can we document a Suggested-by?
Yes.
Suggested-by: Paul Mackerras <paulus@samba.org>
> Andreas
>
>>
>>
>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>> hw/intc/xics_kvm.c | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
>>> index c203646..eaf94d9 100644
>>> --- a/hw/intc/xics_kvm.c
>>> +++ b/hw/intc/xics_kvm.c
>>> @@ -269,6 +269,15 @@ static void ics_kvm_set_irq(void *opaque, int srcno, int val)
>>>
>>> static void ics_kvm_reset(DeviceState *dev)
>>> {
>>> + ICSState *ics = ICS(dev);
>>> + int i;
>>> +
>>> + memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
>>> + for (i = 0; i < ics->nr_irqs; i++) {
>>> + ics->irqs[i].priority = 0xff;
>>> + ics->irqs[i].saved_priority = 0xff;
>>> + }
>>> +
>>> ics_set_kvm_state(ICS(dev), 1);
>>> }
>>>
>>>
>>
>>
>
>
--
Alexey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] xics-kvm: fix reset function
2014-03-12 23:00 ` Alexey Kardashevskiy
@ 2014-03-12 23:45 ` Andreas Färber
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2014-03-12 23:45 UTC (permalink / raw)
To: Alexey Kardashevskiy, qemu-devel; +Cc: qemu-ppc, Paul Mackerras, Alexander Graf
Am 13.03.2014 00:00, schrieb Alexey Kardashevskiy:
> On 03/13/2014 01:42 AM, Andreas Färber wrote:
>> Am 04.03.2014 08:03, schrieb Alexey Kardashevskiy:
>>> On 02/13/2014 12:08 PM, Alexey Kardashevskiy wrote:
>>>> Currently interrupt priorities are set to 0 (highest) at the very
>>>> beginning of the guest execution which is not correct and makes the guest
>>>> produce random interrupt error messages such as:
>>>> "Interrupt 0x1001 (real) is invalid, disabling it".
>>>> This also prevents interrupt states from correct migration.
>>>>
>>>> This initializes priority to 0xFF as the emulated XICS does.
>>>
>>>
>>> Ping? Pretty simple patch suggested by Paul Mackerras.
>>
>> Is this one still needed? Can we document a Suggested-by?
>
> Yes.
>
> Suggested-by: Paul Mackerras <paulus@samba.org>
Thanks, queuing with optimization on my ppc-next:
https://github.com/afaerber/qemu-cpu/commits/ppc-next
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 04e4e61..c93dae0 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -278,7 +278,7 @@ static void ics_kvm_reset(DeviceState *dev)
ics->irqs[i].saved_priority = 0xff;
}
- ics_set_kvm_state(ICS(dev), 1);
+ ics_set_kvm_state(ics, 1);
}
static void ics_kvm_realize(DeviceState *dev, Error **errp)
Testing TBD.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-12 23:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 1:08 [Qemu-devel] [PATCH] xics-kvm: fix reset function Alexey Kardashevskiy
2014-03-04 7:03 ` Alexey Kardashevskiy
2014-03-12 14:42 ` Andreas Färber
2014-03-12 23:00 ` Alexey Kardashevskiy
2014-03-12 23:45 ` Andreas Färber
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).