qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Wu <wudxw@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: aliguori@amazon.com, agraf@suse.de, nikunj@linux.vnet.ibm.com,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v2 2/2] Fix return value of vga initlization on ppc
Date: Mon, 10 Mar 2014 22:39:48 +0800	[thread overview]
Message-ID: <531DCEB4.9050109@linux.vnet.ibm.com> (raw)
In-Reply-To: <531994DF.4000503@redhat.com>

On 03/07/2014 05:43 PM, Paolo Bonzini wrote:
> Il 07/03/2014 10:37, Mark Wu ha scritto:
>> Before spapr_vga_init will returned false if the vga is specified by
>> the command '-device VGA' because vga_interface_type was evaluated to
>> VGA_NONE. With the change in previous patch of this series,
>> spapr_vga_init should return true if it's told that the vga will be
>> initialized in flow of the generic devices initialization.
>>
>> This patch also makes two cleanups:
>> 1. skip initialization for VGA_NONE
>> 2. remove the useless 'break'
> I think that after this patch, "-nodefaults -device VGA" will get a USB
> controller that it didn't get before.
>
> Perhaps this in vl.c:
>
> bool usb_enabled(bool default_usb)
> {
>      return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", default_usb);
> }
>
> should be
>
> bool usb_enabled(bool default_usb)
> {
>      return qemu_opt_get_bool(qemu_get_machine_opts(), "usb",
>                               !no_defaults && default_usb);
> }
Yes, it changes the semantics of 'nodefaults'.  I will fix it in v3 and 
let the management app add usb controller.
> ?
>
> Thanks,
>
> Paolo
>
>> Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
>> ---
>>   hw/ppc/spapr.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index 93d02c1..4d0ac56 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -765,13 +765,15 @@ static int spapr_vga_init(PCIBus *pci_bus)
>>   {
>>       switch (vga_interface_type) {
>>       case VGA_NONE:
>> +        return false;
>> +    case VGA_DEVICE:
>> +        return true;
>>       case VGA_STD:
>>           return pci_vga_init(pci_bus) != NULL;
>>       default:
>>           fprintf(stderr, "This vga model is not supported,"
>>                   "currently it only supports -vga std\n");
>>           exit(0);
>> -        break;
>>       }
>>   }
>>   
>>

      parent reply	other threads:[~2014-03-10 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  9:37 [Qemu-devel] [PATCH v2 1/2] Fix vga_interface_type for command '-device VGA' Mark Wu
2014-03-07  9:37 ` [Qemu-devel] [PATCH v2 2/2] Fix return value of vga initlization on ppc Mark Wu
2014-03-07  9:43   ` Paolo Bonzini
2014-03-08 13:26     ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2014-03-09 18:07       ` Paolo Bonzini
2014-03-10 12:23         ` Alexey Kardashevskiy
2014-03-10 12:26           ` Paolo Bonzini
2014-03-10 12:45             ` Alexey Kardashevskiy
2014-03-10 13:01               ` Paolo Bonzini
2014-03-10 14:39     ` Mark Wu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531DCEB4.9050109@linux.vnet.ibm.com \
    --to=wudxw@linux.vnet.ibm.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aliguori@amazon.com \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).