Patchwork [1/4] vga: improve VGA logic

login
register
mail settings
Submitter Blue Swirl
Date Jan. 24, 2012, 5:29 p.m.
Message ID <CAAu8pHsgrq8KOkm+GCt8+EJuAWLsaHRzjYMw2Hmu1oPx8R+nQQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/137601/
State New
Headers show

Comments

Blue Swirl - Jan. 24, 2012, 5:29 p.m.
On Tue, Jan 24, 2012 at 15:57, Markus Armbruster <armbru@redhat.com> wrote:
> Current master dies for me:
>
> $ upstream-qemu -nodefaults -S -m 384 -vnc :0 -device cirrus-vga
> RAMBlock "vga.vram" already registered, abort!
> Aborted (core dumped)
>
> git-bisect blames this one:
>
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> Improve VGA selection logic, push check for device availabilty to vl.c.
>> Create the devices at board level unconditionally.
>>
>> Remove now unused pci_try_create*() functions.
>>
>> Make PCI VGA devices optional.
>>
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

I think this would fix it:

commit 07e11c4222c93e4b2e615ad1dbf17f325f354c02
Author: Blue Swirl <blauwirbel@gmail.com>
Date:   Tue Jan 24 17:27:35 2012 +0000

    vga: fix -nodefaults -device VGA

    Flag -nodefaults should also imply no VGA. This was broken in
    a369da5f31ddbdeb32a7f76622e480d3995fbb00.

    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Markus Armbruster - Jan. 24, 2012, 6:29 p.m.
Blue Swirl <blauwirbel@gmail.com> writes:

> On Tue, Jan 24, 2012 at 15:57, Markus Armbruster <armbru@redhat.com> wrote:
>> Current master dies for me:
>>
>> $ upstream-qemu -nodefaults -S -m 384 -vnc :0 -device cirrus-vga
>> RAMBlock "vga.vram" already registered, abort!
>> Aborted (core dumped)
>>
>> git-bisect blames this one:
>>
>> Blue Swirl <blauwirbel@gmail.com> writes:
>>
>>> Improve VGA selection logic, push check for device availabilty to vl.c.
>>> Create the devices at board level unconditionally.
>>>
>>> Remove now unused pci_try_create*() functions.
>>>
>>> Make PCI VGA devices optional.
>>>
>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>
> I think this would fix it:
>
> commit 07e11c4222c93e4b2e615ad1dbf17f325f354c02
> Author: Blue Swirl <blauwirbel@gmail.com>
> Date:   Tue Jan 24 17:27:35 2012 +0000
>
>     vga: fix -nodefaults -device VGA
>
>     Flag -nodefaults should also imply no VGA. This was broken in
>     a369da5f31ddbdeb32a7f76622e480d3995fbb00.
>
>     Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>
> diff --git a/vl.c b/vl.c
> index 57378b6..d88a18c 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3006,6 +3006,7 @@ int main(int argc, char **argv, char **envp)
>                  default_floppy = 0;
>                  default_cdrom = 0;
>                  default_sdcard = 0;
> +                vga_model = "none";
>                  break;
>              case QEMU_OPTION_xen_domid:
>                  if (!(xen_available())) {

Fixes my test case.  Thanks!
Blue Swirl - Jan. 25, 2012, 6:01 p.m.
On Tue, Jan 24, 2012 at 18:29, Markus Armbruster <armbru@redhat.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> On Tue, Jan 24, 2012 at 15:57, Markus Armbruster <armbru@redhat.com> wrote:
>>> Current master dies for me:
>>>
>>> $ upstream-qemu -nodefaults -S -m 384 -vnc :0 -device cirrus-vga
>>> RAMBlock "vga.vram" already registered, abort!
>>> Aborted (core dumped)
>>>
>>> git-bisect blames this one:
>>>
>>> Blue Swirl <blauwirbel@gmail.com> writes:
>>>
>>>> Improve VGA selection logic, push check for device availabilty to vl.c.
>>>> Create the devices at board level unconditionally.
>>>>
>>>> Remove now unused pci_try_create*() functions.
>>>>
>>>> Make PCI VGA devices optional.
>>>>
>>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>
>> I think this would fix it:
>>
>> commit 07e11c4222c93e4b2e615ad1dbf17f325f354c02
>> Author: Blue Swirl <blauwirbel@gmail.com>
>> Date:   Tue Jan 24 17:27:35 2012 +0000
>>
>>     vga: fix -nodefaults -device VGA
>>
>>     Flag -nodefaults should also imply no VGA. This was broken in
>>     a369da5f31ddbdeb32a7f76622e480d3995fbb00.
>>
>>     Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>
>> diff --git a/vl.c b/vl.c
>> index 57378b6..d88a18c 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -3006,6 +3006,7 @@ int main(int argc, char **argv, char **envp)
>>                  default_floppy = 0;
>>                  default_cdrom = 0;
>>                  default_sdcard = 0;
>> +                vga_model = "none";
>>                  break;
>>              case QEMU_OPTION_xen_domid:
>>                  if (!(xen_available())) {
>
> Fixes my test case.  Thanks!

Thanks for testing, applied.

Patch

diff --git a/vl.c b/vl.c
index 57378b6..d88a18c 100644
--- a/vl.c
+++ b/vl.c
@@ -3006,6 +3006,7 @@  int main(int argc, char **argv, char **envp)
                 default_floppy = 0;
                 default_cdrom = 0;
                 default_sdcard = 0;
+                vga_model = "none";
                 break;
             case QEMU_OPTION_xen_domid:
                 if (!(xen_available())) {