* [Qemu-devel] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
@ 2014-05-07 10:16 BALATON Zoltan
2014-05-08 17:55 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 1 reply; 7+ messages in thread
From: BALATON Zoltan @ 2014-05-07 10:16 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev, Gerd Hoffmann
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
v2: resubmission after pc-2.1 is added with the multiport case
hw/char/serial-pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 991c99f..f3f5e07 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
return -1;
}
+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
s->irq = pci_allocate_irq(&pci->dev);
@@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
assert(pci->ports > 0);
assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-07 10:16 [Qemu-devel] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible BALATON Zoltan
@ 2014-05-08 17:55 ` Michael Tokarev
2014-05-13 23:39 ` BALATON Zoltan
0 siblings, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2014-05-08 17:55 UTC (permalink / raw)
To: BALATON Zoltan, qemu-devel
Cc: qemu-trivial, Paolo Bonzini, Gerd Hoffmann, Michael S. Tsirkin
27.02.2014 05:05, BALATON Zoltan wrote:
Shoudl we actually make it machine-specific, to keep even prog-if value
of these things the same as before for older machine types? I dunno.
mst says we should, I think this is not a very important property to keep.
Thanks,
/mjt
> v2: resubmission after pc-2.1 is added with the multiport case
>
> hw/char/serial-pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
> index 991c99f..f3f5e07 100644
> --- a/hw/char/serial-pci.c
> +++ b/hw/char/serial-pci.c
> @@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
> return -1;
> }
>
> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> s->irq = pci_allocate_irq(&pci->dev);
>
> @@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
> assert(pci->ports > 0);
> assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
>
> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
> pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-08 17:55 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2014-05-13 23:39 ` BALATON Zoltan
2014-05-14 3:28 ` Michael S. Tsirkin
0 siblings, 1 reply; 7+ messages in thread
From: BALATON Zoltan @ 2014-05-13 23:39 UTC (permalink / raw)
To: Michael Tokarev
Cc: qemu-trivial, Paolo Bonzini, Michael S. Tsirkin, qemu-devel,
Gerd Hoffmann
On Thu, 8 May 2014, Michael Tokarev wrote:
> 27.02.2014 05:05, BALATON Zoltan wrote:
>
> Shoudl we actually make it machine-specific, to keep even prog-if value
> of these things the same as before for older machine types? I dunno.
> mst says we should, I think this is not a very important property to keep.
So what's the decision? Can it be taken as it is now or do you want any
more changes? (If you want it version specific then please tell me how to
do that or show me an example because I don't know how to do that.)
Regards,
BALATON Zoltan
>
> Thanks,
>
> /mjt
>
>> v2: resubmission after pc-2.1 is added with the multiport case
>>
>> hw/char/serial-pci.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
>> index 991c99f..f3f5e07 100644
>> --- a/hw/char/serial-pci.c
>> +++ b/hw/char/serial-pci.c
>> @@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
>> return -1;
>> }
>>
>> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
>> s->irq = pci_allocate_irq(&pci->dev);
>>
>> @@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
>> assert(pci->ports > 0);
>> assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
>>
>> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
>> memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
>> pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-13 23:39 ` BALATON Zoltan
@ 2014-05-14 3:28 ` Michael S. Tsirkin
2014-05-14 10:59 ` BALATON Zoltan
0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2014-05-14 3:28 UTC (permalink / raw)
To: BALATON Zoltan
Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev, qemu-devel,
Gerd Hoffmann
On Wed, May 14, 2014 at 01:39:03AM +0200, BALATON Zoltan wrote:
> On Thu, 8 May 2014, Michael Tokarev wrote:
> >27.02.2014 05:05, BALATON Zoltan wrote:
> >
> >Shoudl we actually make it machine-specific, to keep even prog-if value
> >of these things the same as before for older machine types? I dunno.
> >mst says we should, I think this is not a very important property to keep.
>
> So what's the decision? Can it be taken as it is now or do you want
> any more changes? (If you want it version specific then please tell
> me how to do that or show me an example because I don't know how to
> do that.)
>
> Regards,
> BALATON Zoltan
If you change it migration to old qemu breaks.
See
commit aa93200b88fb1071eaf21bf766711762ed4630e2
Author: Gabriel L. Somlo <gsomlo@gmail.com>
Date: Mon May 5 10:52:51 2014 -0400
apic: use emulated lapic version 0x14 on pc machines >= 2.1
as an example on how to do it.
> >
> >Thanks,
> >
> >/mjt
> >
> >> v2: resubmission after pc-2.1 is added with the multiport case
> >>
> >> hw/char/serial-pci.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >>diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
> >>index 991c99f..f3f5e07 100644
> >>--- a/hw/char/serial-pci.c
> >>+++ b/hw/char/serial-pci.c
> >>@@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
> >> return -1;
> >> }
> >>
> >>+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> >> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> >> s->irq = pci_allocate_irq(&pci->dev);
> >>
> >>@@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
> >> assert(pci->ports > 0);
> >> assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
> >>
> >>+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> >> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> >> memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
> >> pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
> >>
> >
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-14 3:28 ` Michael S. Tsirkin
@ 2014-05-14 10:59 ` BALATON Zoltan
2014-05-14 11:06 ` Paolo Bonzini
2014-05-14 11:08 ` Michael S. Tsirkin
0 siblings, 2 replies; 7+ messages in thread
From: BALATON Zoltan @ 2014-05-14 10:59 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev, qemu-devel,
Gerd Hoffmann
On Wed, 14 May 2014, Michael S. Tsirkin wrote:
> On Wed, May 14, 2014 at 01:39:03AM +0200, BALATON Zoltan wrote:
>> On Thu, 8 May 2014, Michael Tokarev wrote:
>>> 27.02.2014 05:05, BALATON Zoltan wrote:
>>>
>>> Shoudl we actually make it machine-specific, to keep even prog-if value
>>> of these things the same as before for older machine types? I dunno.
>>> mst says we should, I think this is not a very important property to keep.
>>
>> So what's the decision? Can it be taken as it is now or do you want
>> any more changes? (If you want it version specific then please tell
>> me how to do that or show me an example because I don't know how to
>> do that.)
>>
>
> If you change it migration to old qemu breaks.
This is unlikely as this pci serial card is not used by default in any
machine version AFAIK. Is it still desired to keep backward compatibility
for a device that can only be added by users explicitely?
Regards,
BALATON Zoltan
> See
> commit aa93200b88fb1071eaf21bf766711762ed4630e2
> Author: Gabriel L. Somlo <gsomlo@gmail.com>
> Date: Mon May 5 10:52:51 2014 -0400
>
> apic: use emulated lapic version 0x14 on pc machines >= 2.1
> as an example on how to do it.
>>>
>>> Thanks,
>>>
>>> /mjt
>>>
>>>> v2: resubmission after pc-2.1 is added with the multiport case
>>>>
>>>> hw/char/serial-pci.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
>>>> index 991c99f..f3f5e07 100644
>>>> --- a/hw/char/serial-pci.c
>>>> +++ b/hw/char/serial-pci.c
>>>> @@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
>>>> return -1;
>>>> }
>>>>
>>>> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
>>>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
>>>> s->irq = pci_allocate_irq(&pci->dev);
>>>>
>>>> @@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
>>>> assert(pci->ports > 0);
>>>> assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
>>>>
>>>> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
>>>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
>>>> memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
>>>> pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
>>>>
>>>
>>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-14 10:59 ` BALATON Zoltan
@ 2014-05-14 11:06 ` Paolo Bonzini
2014-05-14 11:08 ` Michael S. Tsirkin
1 sibling, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2014-05-14 11:06 UTC (permalink / raw)
To: BALATON Zoltan, Michael S. Tsirkin
Cc: qemu-trivial, Michael Tokarev, qemu-devel, Gerd Hoffmann
Il 14/05/2014 12:59, BALATON Zoltan ha scritto:
> On Wed, 14 May 2014, Michael S. Tsirkin wrote:
>> On Wed, May 14, 2014 at 01:39:03AM +0200, BALATON Zoltan wrote:
>>> On Thu, 8 May 2014, Michael Tokarev wrote:
>>>> 27.02.2014 05:05, BALATON Zoltan wrote:
>>>>
>>>> Shoudl we actually make it machine-specific, to keep even prog-if value
>>>> of these things the same as before for older machine types? I dunno.
>>>> mst says we should, I think this is not a very important property to
>>>> keep.
>>>
>>> So what's the decision? Can it be taken as it is now or do you want
>>> any more changes? (If you want it version specific then please tell
>>> me how to do that or show me an example because I don't know how to
>>> do that.)
>>>
>>
>> If you change it migration to old qemu breaks.
>
> This is unlikely as this pci serial card is not used by default in any
> machine version AFAIK. Is it still desired to keep backward
> compatibility for a device that can only be added by users explicitely?
Yes, after all not even virtio-blk is used by default.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible
2014-05-14 10:59 ` BALATON Zoltan
2014-05-14 11:06 ` Paolo Bonzini
@ 2014-05-14 11:08 ` Michael S. Tsirkin
1 sibling, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2014-05-14 11:08 UTC (permalink / raw)
To: BALATON Zoltan
Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev, qemu-devel,
Gerd Hoffmann
On Wed, May 14, 2014 at 12:59:15PM +0200, BALATON Zoltan wrote:
> On Wed, 14 May 2014, Michael S. Tsirkin wrote:
> >On Wed, May 14, 2014 at 01:39:03AM +0200, BALATON Zoltan wrote:
> >>On Thu, 8 May 2014, Michael Tokarev wrote:
> >>>27.02.2014 05:05, BALATON Zoltan wrote:
> >>>
> >>>Shoudl we actually make it machine-specific, to keep even prog-if value
> >>>of these things the same as before for older machine types? I dunno.
> >>>mst says we should, I think this is not a very important property to keep.
> >>
> >>So what's the decision? Can it be taken as it is now or do you want
> >>any more changes? (If you want it version specific then please tell
> >>me how to do that or show me an example because I don't know how to
> >>do that.)
> >>
> >
> >If you change it migration to old qemu breaks.
>
> This is unlikely as this pci serial card is not used by default in
> any machine version AFAIK. Is it still desired to keep backward
> compatibility for a device that can only be added by users
> explicitely?
>
> Regards,
> BALATON Zoltan
Yes.
> >See
> >commit aa93200b88fb1071eaf21bf766711762ed4630e2
> >Author: Gabriel L. Somlo <gsomlo@gmail.com>
> >Date: Mon May 5 10:52:51 2014 -0400
> >
> > apic: use emulated lapic version 0x14 on pc machines >= 2.1
> >as an example on how to do it.
> >>>
> >>>Thanks,
> >>>
> >>>/mjt
> >>>
> >>>>v2: resubmission after pc-2.1 is added with the multiport case
> >>>>
> >>>>hw/char/serial-pci.c | 2 ++
> >>>>1 file changed, 2 insertions(+)
> >>>>
> >>>>diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
> >>>>index 991c99f..f3f5e07 100644
> >>>>--- a/hw/char/serial-pci.c
> >>>>+++ b/hw/char/serial-pci.c
> >>>>@@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev)
> >>>> return -1;
> >>>> }
> >>>>
> >>>>+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> >>>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> >>>> s->irq = pci_allocate_irq(&pci->dev);
> >>>>
> >>>>@@ -101,6 +102,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
> >>>> assert(pci->ports > 0);
> >>>> assert(pci->ports <= PCI_SERIAL_MAX_PORTS);
> >>>>
> >>>>+ pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */
> >>>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01;
> >>>> memory_region_init(&pci->iobar, OBJECT(pci), "multiserial", 8 * pci->ports);
> >>>> pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->iobar);
> >>>>
> >>>
> >>>
> >
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-14 11:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 10:16 [Qemu-devel] [PATCH v2] serial-pci: Set prog interface field of pci config to 16550 compatible BALATON Zoltan
2014-05-08 17:55 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-05-13 23:39 ` BALATON Zoltan
2014-05-14 3:28 ` Michael S. Tsirkin
2014-05-14 10:59 ` BALATON Zoltan
2014-05-14 11:06 ` Paolo Bonzini
2014-05-14 11:08 ` Michael S. Tsirkin
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).