[Qemu-devel] [Qemu-ppc][PATCH v7 0/3] Add USB enablement and VGA enablement on sPAPR

2012-08-06 Thread Li Zhang
build Benjamin Herrenschmidt (1): spapr: Add support for -vga option Li Zhang (2): Add USB option in machine options Add one new file vga-pci.h and cleanup on all platforms hw/alpha_pci.c|1 + hw/cirrus_vga.c |2 +- hw/mips_malta.c |1 + hw/nseries.c |9

[Qemu-devel] [Qemu-ppc][PATCH v7 1/3] Add USB option in machine options

2012-08-06 Thread Li Zhang
plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang

[Qemu-devel] [Qemu-ppc][PATCH v7 2/3] Add one new file vga-pci.h and cleanup on all platforms

2012-08-06 Thread Li Zhang
platforms. Signed-off-by: Li Zhang --- hw/alpha_pci.c|1 + hw/cirrus_vga.c |2 +- hw/mips_malta.c |1 + hw/pc.c |1 + hw/pc.h |4 hw/ppc_newworld.c |2 +- hw/ppc_oldworld.c |2 +- hw/ppc_prep.c |1 + hw/sun4u.c|1 + hw

[Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-06 Thread Li Zhang
Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Li Zhang --- hw/spapr.c | 31 ++- 1 files changed, 30

Re: [Qemu-devel] [RFC] usb and s390

2012-08-07 Thread Li Zhang
hmp-commands.hx |6 + hw/Makefile.objs |5 ++- monitor.c|4 +++ qemu-options.hx |4 +++ sysemu.h |2 + vl.c |8 +- 7 files changed, 76 insertions(+), 19 deletions(-) -- Li Zhang IBM China Linux Technology Centre

Re: [Qemu-devel] [RFC/PATCH 1/1] USB code fenced for s390

2012-08-07 Thread Li Zhang
t usb_device_add(const char *devname) { const char *p; @@ -1122,7 +1122,7 @@ void do_usb_del(Monitor *mon, const QDict *qdict) error_report("could not delete USB device '%s'", devname); } } - +#endif /***/ /* PCMCIA/Cardbus */ @@ -2976,6 +2976,7 @@ int main(int argc, char **argv, char **envp) machine = machine_parse(optarg); } break; +#if defined(TARGET_HAS_USB) && (TARGET_HAS_USB == 1) case QEMU_OPTION_usb: usb_enabled = 1; This line will be replaced by the following in my patch: machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); if (machine_opts) { qemu_opt_set_bool(machine_opts, "usb", true); } BTW, does s390 use the same vl.c as other platforms? It seems that the code is not as the code I have seen in qemu. :) break; @@ -2983,6 +2984,7 @@ int main(int argc, char **argv, char **envp) usb_enabled = 1; This is the same as I mention above. add_device_config(DEV_USB, optarg); break; +#endif case QEMU_OPTION_device: if (!qemu_opts_parse(qemu_find_opts("device"), optarg, 1)) { exit(1); @@ -3525,11 +3527,13 @@ int main(int argc, char **argv, char **envp) current_machine = machine; +#if defined(TARGET_HAS_USB) && (TARGET_HAS_USB == 1) /* init USB devices */ if (usb_enabled) { usb_enabled is removed and it is replaced with usb_enabled() function. You can see my patch. if (foreach_device_config(DEV_USB, usb_parse) < 0) exit(1); } +#endif /* init generic devices */ if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0) -- Li Zhang IBM China Linux Technology Centre

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 0/3] Add USB enablement and VGA enablement on sPAPR

2012-08-07 Thread Li Zhang
Hi Alex and Andreas, Would you please help review the new version patches? We hope the patches can be merged into 1.2. 1.2 will be freezed soon. Thanks a lot. On Tue, Aug 7, 2012 at 10:41 AM, Li Zhang wrote: > v1 -> v2: > * Convert USB option from char to bool. > > v2 ->

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Tue, Aug 14, 2012 at 6:39 PM, Alexander Graf wrote: > On 08/07/2012 04:41 AM, Li Zhang wrote: >> >> When -usb option is used, global varible usb_enabled is set. >> And all the plafrom will create one USB controller according >> to this variable. In fact, global va

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Tue, Aug 14, 2012 at 6:46 PM, Alexander Graf wrote: > On 08/07/2012 04:41 AM, Li Zhang wrote: >> >> When -usb option is used, global varible usb_enabled is set. >> And all the plafrom will create one USB controller according >> to this variable. In fact, global va

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Li Zhang
On Tue, Aug 14, 2012 at 7:04 PM, Alexander Graf wrote: > On 08/07/2012 04:42 AM, Li Zhang wrote: >> >> Also instanciate the USB keyboard and mouse when that option is used >> (you can still use -device to create individual devices without all >> the defaults) &g

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Li Zhang
On Tue, Aug 14, 2012 at 8:13 PM, David Gibson wrote: > On Tue, Aug 14, 2012 at 10:04:03PM +1000, Benjamin Herrenschmidt wrote: >> On Tue, 2012-08-14 at 13:04 +0200, Alexander Graf wrote: >> > Thanks, applied to ppc-next without the USB bits. I also get the >> > following warning now: >> > >> > $ .

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Li Zhang
On Tue, Aug 14, 2012 at 11:13 PM, Li Zhang wrote: > On Tue, Aug 14, 2012 at 8:13 PM, David Gibson wrote: >> On Tue, Aug 14, 2012 at 10:04:03PM +1000, Benjamin Herrenschmidt wrote: >>> On Tue, 2012-08-14 at 13:04 +0200, Alexander Graf wrote: >>> > Thanks, applied to

[Qemu-devel] [Qemu-ppc][PATCH v8 1/2] Add USB option in machine options

2012-08-14 Thread Li Zhang
plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang

[Qemu-devel] [Qemu-ppc][PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-14 Thread Li Zhang
USB is enabled as default on sPAPR platform because it needs USB keyboard and USB mouse when VGA is enabled. This patch is to add USB controller on sPAPR platform. Signed-off-by: Li Zhang --- hw/spapr.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/spapr.c b

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread Li Zhang
On Wed, Aug 15, 2012 at 1:19 AM, Li Zhang wrote: > On Tue, Aug 14, 2012 at 11:13 PM, Li Zhang wrote: >> On Tue, Aug 14, 2012 at 8:13 PM, David Gibson wrote: >>> On Tue, Aug 14, 2012 at 10:04:03PM +1000, Benjamin Herrenschmidt wrote: >>>> On Tue, 2012-08-14 at 13:

Re: [Qemu-devel] [Qemu-ppc][PATCH v8 1/2] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Wed, Aug 15, 2012 at 2:08 AM, Alexander Graf wrote: > > > On 14.08.2012, at 19:49, Li Zhang wrote: > >> When -usb option is used, global varible usb_enabled is set. >> And all the plafrom will create one USB controller according >> to this variable. In fact,

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Wed, Aug 15, 2012 at 8:09 AM, Benjamin Herrenschmidt wrote: > On Wed, 2012-08-15 at 09:10 +1000, David Gibson wrote: >> > I see. I will redo this patch. Send out it later. :) >> > Thanks for your comments. >> >> When you do that, please also change the default to make spapr _not_ >> have usb. >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Wed, Aug 15, 2012 at 9:47 AM, David Gibson wrote: > On Wed, Aug 15, 2012 at 09:24:34AM +0800, Li Zhang wrote: >> On Wed, Aug 15, 2012 at 8:09 AM, Benjamin Herrenschmidt >> wrote: >> > On Wed, 2012-08-15 at 09:10 +1000, David Gibson wrote: >> >> > I s

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread Li Zhang
On Wed, Aug 15, 2012 at 10:57 AM, David Gibson wrote: > On Wed, Aug 15, 2012 at 10:50:04AM +0800, Li Zhang wrote: >> On Wed, Aug 15, 2012 at 9:47 AM, David Gibson wrote: >> > On Wed, Aug 15, 2012 at 09:24:34AM +0800, Li Zhang wrote: >> >> On Wed, Aug 15, 2012 at 8

Re: [Qemu-devel] [Qemu-ppc][PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-14 Thread Li Zhang
On 2012年08月15日 02:09, Alexander Graf wrote: On 14.08.2012, at 19:49, Li Zhang wrote: USB is enabled as default on sPAPR platform because it needs USB keyboard and USB mouse when VGA is enabled. This patch is to add USB controller on sPAPR platform. Signed-off-by: Li Zhang This looks a

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-15 Thread Li Zhang
On Wed, Aug 15, 2012 at 7:13 PM, David Gibson wrote: > On Wed, Aug 15, 2012 at 01:44:28PM +0800, Li Zhang wrote: >> On Wed, Aug 15, 2012 at 10:57 AM, David Gibson wrote: >> > On Wed, Aug 15, 2012 at 10:50:04AM +0800, Li Zhang wrote: >> >> On Wed, Aug 15, 2012 a

Re: [Qemu-devel] [Qemu-ppc][PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-15 Thread Li Zhang
On 2012年08月15日 15:02, Alexander Graf wrote: > > On 15.08.2012, at 08:00, Li Zhang wrote: > >> On 2012年08月15日 02:09, Alexander Graf wrote: >>> On 14.08.2012, at 19:49, Li Zhang wrote: >>> >>>> USB is enabled as default on sPAPR platform because it need

Re: [Qemu-devel] [Qemu-ppc][PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-15 Thread Li Zhang
On Thu, Aug 16, 2012 at 9:52 AM, Benjamin Herrenschmidt wrote: > On Thu, 2012-08-16 at 09:29 +0800, Li Zhang wrote: >> > Yes, that's pretty much what I was asking for (here and for the >> mac99 u3 machine). Just base your patch on ppc-next. My patches are in >> the

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-15 Thread Li Zhang
On Thu, Aug 16, 2012 at 10:06 AM, David Gibson wrote: > On Thu, Aug 16, 2012 at 11:52:11AM +1000, Benjamin Herrenschmidt wrote: >> On Thu, 2012-08-16 at 09:29 +0800, Li Zhang wrote: >> > > Yes, that's pretty much what I was asking for (here and for the >> > mac9

[Qemu-devel] [Qemu-ppc][PATCH v9 1/1] Add USB option in machine options

2012-08-22 Thread Li Zhang
plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang

Re: [Qemu-devel] [Qemu-ppc] [PATCHv3 1/1] Add usb option in machine options to enable/disable usb

2012-06-17 Thread Li Zhang
On Sat, Jun 16, 2012 at 6:51 AM, Benjamin Herrenschmidt wrote: > On Fri, 2012-06-15 at 22:40 -0400, Li Zhang wrote: >> For pseries machine, it needs to enable usb to add >> keyboard or usb mouse. -usb option won't be used in >> the future, and machine options is a b

Re: [Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-17 Thread Li Zhang
On Fri, Jun 15, 2012 at 10:34 PM, Markus Armbruster wrote: > Li Zhang writes: > >> On Fri, Jun 15, 2012 at 8:04 PM, Markus Armbruster wrote: >>> Li Zhang writes: >>> >>>> For pseries machine, it needs to enable usb to add >>>> keyboard or u

Re: [Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-18 Thread Li Zhang
On Mon, Jun 18, 2012 at 3:29 PM, Markus Armbruster wrote: > Li Zhang writes: > >> On Fri, Jun 15, 2012 at 10:34 PM, Markus Armbruster >> wrote: >>> Li Zhang writes: >>> >>>> On Fri, Jun 15, 2012 at 8:04 PM, Markus Armbruster >>>

Re: [Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-18 Thread Li Zhang
On Mon, Jun 18, 2012 at 3:54 PM, Peter Crosthwaite wrote: >> >> 3. Can't have USB: fail if the user tries to enable it. >> >> Code sketch: >> >>    /* init USB devices */ >>    if (!machine->has_usb) { >>        if (usb_enabled) >>            [report error; should point to the offending options] >

[Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-18 Thread Li Zhang
For specific machines, they will get the machine option and then create usb controller according to usb option. In this patch, usb is on by default on pseries. So, for -nodefault,usb should be set off in the command line as the following: -machine type=pseries,usb=off. Signed-off-by: Li Zhang --

[Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-18 Thread Li Zhang
Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Li Zhang --- hw/spapr.c | 43 ++- 1 files

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
Hi Andreas, I send out this patch with vga enablement on papr, which needs usb enabled. Is there any more suggestion about this patch? Who else need to ack it? Thank you very much. :) On Mon, Jun 18, 2012 at 5:22 PM, Li Zhang wrote: > For pseries machine, it needs to enable usb to

Re: [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-27 Thread Li Zhang
Hi Andreas, This patch is to enable vga which works well on our internal tree. Would you please help review it? Any suggestion is appreciated. Thanks a lot. :) On Mon, Jun 18, 2012 at 5:34 PM, Li Zhang wrote: > Also instanciate the USB keyboard and mouse when that option is used > (y

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
On Wed, Jun 27, 2012 at 8:00 PM, Andreas Färber wrote: > Am 18.06.2012 11:22, schrieb Li Zhang: >> For pseries machine, it needs to enable usb to add >> keyboard or usb mouse. -usb option won't be used in >> the future, and machine options is a better way to >> en

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
On Wed, Jun 27, 2012 at 9:22 PM, Peter Crosthwaite wrote: > On Wed, Jun 27, 2012 at 11:13 PM, Li Zhang wrote: >> On Wed, Jun 27, 2012 at 8:00 PM, Andreas Färber wrote: >>> Am 18.06.2012 11:22, schrieb Li Zhang: >>>> For pseries machine, it needs to enable usb to

Re: [Qemu-devel] [PATCH 1/2] Add usb option in machine options to enable/disable usb

2012-06-27 Thread Li Zhang
On Wed, Jun 27, 2012 at 9:24 PM, Andreas Färber wrote: > Am 27.06.2012 15:13, schrieb Li Zhang: >> On Wed, Jun 27, 2012 at 8:00 PM, Andreas Färber wrote: >>> Am 18.06.2012 11:22, schrieb Li Zhang: >>>> +    bool usb_on = false; >>> >>> Didn&#x

Re: [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-27 Thread Li Zhang
On Wed, Jun 27, 2012 at 9:47 PM, Andreas Färber wrote: > Am 18.06.2012 11:34, schrieb Li Zhang: >> Also instanciate the USB keyboard and mouse when that option is used >> (you can still use -device to create individual devices without all >> the defaults) >>

Re: [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-28 Thread Li Zhang
On Wed, Jun 27, 2012 at 10:37 PM, Alexander Graf wrote: > > On 27.06.2012, at 16:32, Andreas Färber wrote: > >> Am 27.06.2012 15:55, schrieb Li Zhang: >>> On Wed, Jun 27, 2012 at 9:47 PM, Andreas Färber wrote: >>>> Am 18.06.2012 11:34, schrieb Li Zhang: >

Re: [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option

2012-06-28 Thread Li Zhang
On Thu, Jun 28, 2012 at 7:03 PM, Alexander Graf wrote: > On 06/28/2012 09:34 AM, Li Zhang wrote: >> >> On Wed, Jun 27, 2012 at 10:37 PM, Alexander Graf  wrote: >>> >>> On 27.06.2012, at 16:32, Andreas Färber wrote: >>> >>>> Am 27.06.2012 15:

Re: [Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-28 Thread Li Zhang
On Thu, Jun 28, 2012 at 9:22 PM, Alexander Graf wrote: > On 06/15/2012 02:46 PM, Li Zhang wrote: >> >> On Fri, Jun 15, 2012 at 7:09 PM, Andreas Färber  wrote: >>> >>> >>> You don't seem to be getting what I'm saying: As discussed in great >&

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 0/4] Add USB option and enable vga on spapr

2012-06-29 Thread Li Zhang
Sorry, correct mailing list address. :) Add the prefix of the subject. On 06/29/2012 04:27 PM, Li Zhang wrote: From: Li Zhang v1 -> v2: * Convert USB option from char to bool. v2 -> v3: * Remove global USB option * Get USB option with qemu_opt_get_bool(). * Send vga

Re: [Qemu-devel] [Qemu-ppc][PATCH v4 1/4] Add usb option in machine options

2012-06-29 Thread Li Zhang
Sorry, correct mailing list address. :) On 06/29/2012 04:27 PM, Li Zhang wrote: From: Li Zhang pSeries machine needs to enable USB to add a USB keyboard or USB mouse. -usb option won't be used in the future, and machine options are a better way to enable USB. So this patch is to ad

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 2/4] Add one new file vga-pci.h

2012-06-29 Thread Li Zhang
Correct mailing list address. On 06/29/2012 04:27 PM, Li Zhang wrote: From: Li Zhang Functions pci_vga_init() and pci_cirrus_vga_init() are decleared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the decleartions to

Re: [Qemu-devel] [Qemu-ppc][PATCH v4 3/4] Cleanup pc.h on other platforms

2012-06-29 Thread Li Zhang
Correct mailing list address. On 06/29/2012 04:27 PM, Li Zhang wrote: From: Li Zhang Now that the declearations of pci_vga_init() and pci_cirrus_vga_init() are moved to vga-pci.h. So it's necessary to cleanup pc.h on the platforms which include the file and add vga-pci.h. This patch

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 4/4] spapr: Add support for -vga option

2012-06-29 Thread Li Zhang
Correct mailing list address. :) On 06/29/2012 04:27 PM, Li Zhang wrote: From: Li Zhang Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt Signed-off-by

Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 2/4] Add one new file vga-pci.h

2012-07-03 Thread Li Zhang
Hi Alex, Would you please help review these patches, if you have time? This patch should work with [3/4], which cleanup all the places where pci_vga_init() and pci_cirrus_vga_init() are used. Thanks. On Mon, Jul 2, 2012 at 1:25 PM, wrote: > From: Li Zhang > > Functions pci_vga_i

Re: [Qemu-devel] [Qemu-ppc][PATCH v5 1/4] Add usb option in machine options

2012-07-08 Thread Li Zhang
On Fri, Jul 6, 2012 at 9:43 PM, Alexander Graf wrote: > > On 02.07.2012, at 07:25, zhlci...@gmail.com wrote: > >> From: Li Zhang >> >> pSeries machine needs to enable USB to add a USB >> keyboard or USB mouse. -usb option won't be used in >> the fut

Re: [Qemu-devel] [Qemu-ppc][PATCH v5 1/4] Add usb option in machine options

2012-07-08 Thread Li Zhang
On Sat, Jul 7, 2012 at 12:03 AM, Alexander Graf wrote: > > On 06.07.2012, at 17:58, Andreas Färber wrote: > >> Am 06.07.2012 15:43, schrieb Alexander Graf: >>> >>> On 02.07.2012, at 07:25, zhlci...@gmail.com wrote: >>> >>>> From: Li Zhang

Re: [Qemu-devel] [Qemu-ppc][PATCH v5 1/4] Add usb option in machine options

2012-07-08 Thread Li Zhang
On Sun, Jul 8, 2012 at 10:45 PM, Alexander Graf wrote: > > > On 08.07.2012, at 16:21, Li Zhang wrote: > >> On Fri, Jul 6, 2012 at 9:43 PM, Alexander Graf wrote: >>> >>> On 02.07.2012, at 07:25, zhlci...@gmail.com wrote: >>> >>>> From: L

Re: [Qemu-devel] [Qemu-ppc][PATCH v5 4/4] spapr: Add support for -vga option

2012-07-08 Thread Li Zhang
On Fri, Jul 6, 2012 at 9:50 PM, Alexander Graf wrote: > > On 02.07.2012, at 07:25, zhlci...@gmail.com wrote: > >> From: Li Zhang >> >> Also instanciate the USB keyboard and mouse when that option is used >> (you can still use -device to create individual de

Re: [Qemu-devel] [Qemu-ppc][PATCH v5 1/4] Add usb option in machine options

2012-07-08 Thread Li Zhang
On Sun, Jul 8, 2012 at 11:02 PM, Alexander Graf wrote: > > > On 08.07.2012, at 16:46, Li Zhang wrote: > >> On Sat, Jul 7, 2012 at 12:03 AM, Alexander Graf wrote: >>> >>> On 06.07.2012, at 17:58, Andreas Färber wrote: >>> >>>> Am

[Qemu-devel] [qemu-devel]The problem of QMP command getfd.

2013-01-27 Thread Li Zhang
Hi all, I am trying to executing qmp command getfd according to qmp-commands.hx. { "execute": "getfd", "arguments": { "fdname": "fd1" } } Every time, it returns the error. { "error": { "class": "GenericError", "desc": "No file descriptor supplied via SCM_RIGHTS" } } Th

Re: [Qemu-devel] [qemu-devel]The problem of QMP command getfd.

2013-01-28 Thread Li Zhang
On 2013年01月28日 21:28, Stefan Hajnoczi wrote: On Mon, Jan 28, 2013 at 03:27:01PM +0800, Li Zhang wrote: Hi all, I am trying to executing qmp command getfd according to qmp-commands.hx. { "execute": "getfd", "arguments": { "fdname": "fd1" } }

Re: [Qemu-devel] [qemu-devel]The problem of QMP command getfd.

2013-01-29 Thread Li Zhang
On 2013年01月29日 00:30, Eric Blake wrote: On 01/28/2013 07:16 AM, Li Zhang wrote: The QMP client must send '{ "execute": "getfd", "arguments": { "fdname": "fd1" } }' together with SCM_RIGHTS CMSG. You are getting the error becau

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10 1/1] Add USB option in machine options

2012-09-24 Thread Li Zhang
Hi Gerd, Any suggestion? Many thanks. -:) On Wed, Sep 19, 2012 at 1:59 AM, Alexander Graf wrote: > On 09/18/2012 07:36 PM, Alexander Graf wrote: >> >> On 09/03/2012 07:25 AM, Li Zhang wrote: >>> >>> When -usb option is used, global varible usb_enabled is

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10 1/1] Add USB option in machine options

2012-09-26 Thread Li Zhang
Thanks Gerd. Hi Alex, Can this patch be pushed to upstream? Thanks. -:) On Wed, Sep 26, 2012 at 2:29 PM, Gerd Hoffmann wrote: > On 09/26/12 06:20, Li Zhang wrote: >> Would you please have a look at my patch when you have time? >> Because it is related with USB, so I hope to ge

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10 1/1] Add USB option in machine options

2012-10-07 Thread Li Zhang
On Wed, Sep 26, 2012 at 5:03 PM, Alexander Graf wrote: > > > On 26.09.2012, at 10:50, Li Zhang wrote: > >> Thanks Gerd. >> >> Hi Alex, >> Can this patch be pushed to upstream? > > Gerd, do you want to take this through the usb queue? If I get s formal a

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 1/1] Add USB option in machine options

2012-09-02 Thread Li Zhang
On Sat, Aug 25, 2012 at 3:43 PM, Blue Swirl wrote: > On Wed, Aug 22, 2012 at 10:31 AM, Li Zhang wrote: >> When -usb option is used, global varible usb_enabled is set. >> And all the plafrom will create one USB controller according >> to this variable. In fact, global va

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 1/1] Add USB option in machine options

2012-09-02 Thread Li Zhang
t;>>> On 25.08.2012, at 00:43, Blue Swirl wrote: >>>> >>>>> On Wed, Aug 22, 2012 at 10:31 AM, Li Zhang wrote: >>>>>> When -usb option is used, global varible usb_enabled is set. >>>>>> And all the plafrom will create one USB

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 1/1] Add USB option in machine options

2012-09-02 Thread Li Zhang
On Sun, Sep 2, 2012 at 10:45 PM, Alexander Graf wrote: > > > On 02.09.2012, at 09:50, Li Zhang wrote: > >> On Tue, Aug 28, 2012 at 2:08 AM, Blue Swirl wrote: >>> On Mon, Aug 27, 2012 at 1:59 AM, Alexander Graf wrote: >>>> >>>> >>>>

[Qemu-devel] [Qemu-ppc][PATCH v10 1/1] Add USB option in machine options

2012-09-02 Thread Li Zhang
plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang

Re: [Qemu-devel] [Qemu-ppc][PATCH v10 1/1] Add USB option in machine options

2012-09-16 Thread Li Zhang
Hi all, What should I do to improve this patch? Can anyone give more suggestions? Thanks. -:) On Mon, Sep 3, 2012 at 1:25 PM, Li Zhang wrote: > When -usb option is used, global varible usb_enabled is set. > And all the plaform will create one USB controller according > to this var

Re: [Qemu-devel] [Qemu-ppc][PATCH v10 1/1] Add USB option in machine options

2012-09-18 Thread Li Zhang
On Wed, Sep 19, 2012 at 1:36 AM, Alexander Graf wrote: > On 09/03/2012 07:25 AM, Li Zhang wrote: >> >> When -usb option is used, global varible usb_enabled is set. >> And all the plaform will create one USB controller according >> to this variable. In fact, global va

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10 1/1] Add USB option in machine options

2012-09-18 Thread Li Zhang
On Wed, Sep 19, 2012 at 1:59 AM, Alexander Graf wrote: > On 09/18/2012 07:36 PM, Alexander Graf wrote: >> >> On 09/03/2012 07:25 AM, Li Zhang wrote: >>> >>> When -usb option is used, global varible usb_enabled is set. >>> And all the plaform will creat

[Qemu-devel] [qemu-devel][RFC] Enable usb in the default configuration

2012-06-05 Thread Li Zhang
Hi all, For pseries, when creating VMs with default configuration, it requires usb mouse and usb kbd devices to be added. But in the default configuration of qemu, usb is disabled. So we when use the default configuration as the following command: $qemu -M pseries vga is enabled, but usb mouse

[Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-05 Thread Li Zhang
Hi all, For pseries, when creating VMs with "-vga std", it requires usb mouse and usb kbd devices to be added. But with default options, vga is enabled and usb is disabled. User may use default options as the following commands: $qemu -M pseries If vga is enabled, usb mouse and usb kbd is disa

[Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-05 Thread li zhang
Hi all, For pseries, when creating VMs with "-vga std", it requires usb mouse and usb kbd devices to be added. But with default options, vga is enabled and usb is disabled. User may use default options as the following commands: $qemu -M pseries If vga is enabled, usb mouse and usb kbd is disab

[Qemu-devel] test

2012-06-05 Thread Li Zhang
I can't send out my mail. -- Best Regards Li IBM LTC, China System&Technology Lab, Beijing

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-05 Thread li zhang
Hi Anthony, Any comment on this? Thanks. On Tue, Jun 5, 2012 at 5:48 PM, li zhang wrote: > Hi all, > > For pseries, when creating VMs with "-vga std", > it requires usb mouse and usb kbd devices to be added. > > But with default options, vga is enabled and usb

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-05 Thread li zhang
On Wed, Jun 6, 2012 at 1:42 PM, Anthony Liguori wrote: > On 06/06/2012 11:31 AM, Benjamin Herrenschmidt wrote: > >> On Wed, 2012-06-06 at 10:52 +0800, li zhang wrote: >> >>> Hi Anthony, >>> >>> >>> Any comment on this? >>> >>

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-06 Thread li zhang
On Thu, Jun 7, 2012 at 9:15 AM, Anthony Liguori wrote: > On 06/07/2012 05:13 AM, Benjamin Herrenschmidt wrote: > >> On Wed, 2012-06-06 at 13:42 +0800, Anthony Liguori wrote: >> >>> On 06/06/2012 11:31 AM, Benjamin Herrenschmidt wrote: >>> >>>> O

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-06 Thread li zhang
roller present all the time. > > > > > > That makes more sense I agree, I'm just annoyed by the whole libvirt > > > business which seems to have some pretty hard assumptions that with > > > -nodefault you don't get anything by default, and I t

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-06 Thread li zhang
On Thu, Jun 7, 2012 at 12:43 PM, Anthony Liguori wrote: > On 06/07/2012 12:39 PM, li zhang wrote: > >> On Thu, Jun 7, 2012 at 9:15 AM, Anthony Liguori >> wrote: >> >> Hi Anthony, >> >> I think we can add usb to machine option, and set usb on as default i

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

2012-06-07 Thread Li Zhang
On 06/07/2012 05:17 PM, Benjamin Herrenschmidt wrote: On Thu, 2012-06-07 at 11:05 +0200, Gerd Hoffmann wrote: We (me and Gerd Hoffmann) have investigated that, and experimented with it. It will work for simply devices, but isochronous devices break. The real solution at least for x86 vms is to g

Re: [Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-14 Thread Li Zhang
OK,sorry for my fault. best regards Li Zhang 在 2012-6-15 上午6:05,"Benjamin Herrenschmidt" 写道: > > On Thu, 2012-06-14 at 16:27 +0200, Andreas Färber wrote: > > Am 14.06.2012 07:17, schrieb zhlci...@gmail.com: > > > From: Li Zhang > > > > > > For

Re: [Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-14 Thread Li Zhang
On Thu, Jun 14, 2012 at 10:27 PM, Andreas Färber wrote: > Am 14.06.2012 07:17, schrieb zhlci...@gmail.com: > > From: Li Zhang > > > > For pseries machine, it needs to enable usb > > to add kbd or usb mouse. -usb option won't > > be used in the future, and

Re: [Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-14 Thread Li Zhang
On Fri, Jun 15, 2012 at 1:15 PM, Peter Crosthwaite < peter.crosthwa...@petalogix.com> wrote: > On Fri, Jun 15, 2012 at 1:06 PM, Li Zhang wrote: > > > > > > On Thu, Jun 14, 2012 at 10:27 PM, Andreas Färber > wrote: > >> > >> Am 14.06.2012 07:17, s

[Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-15 Thread Li Zhang
by default. So, for -nodefault, usb should be set off in the command line as the following: -machine type=pseries,usb=off. Signed-off-by: Li Zhang --- hw/spapr.c |5 + sysemu.h |1 + vl.c | 17 + 3 files changed, 23 insertions(+) diff --git a/hw/spapr.c b/h

Re: [Qemu-devel] [PATCH 1/1] Add usb option in machine options.

2012-06-15 Thread Li Zhang
On Fri, Jun 15, 2012 at 7:09 PM, Andreas Färber wrote: > > Am 15.06.2012 05:06, schrieb Li Zhang: > > > > > > On Thu, Jun 14, 2012 at 10:27 PM, Andreas Färber > <mailto:afaer...@suse.de>> wrote: > > > >     Am 14.06.2012 07:17, schrieb zhlci

Re: [Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-15 Thread Li Zhang
On Fri, Jun 15, 2012 at 8:04 PM, Markus Armbruster wrote: > Li Zhang writes: > >> For pseries machine, it needs to enable usb to add >> keyboard or usb mouse. -usb option won't be used in >> the future, and machine options is a better way to >> enable usb

Re: [Qemu-devel] [PATCHv2 1/1] Add usb option in machine options to enable/disable usb

2012-06-15 Thread Li Zhang
On Fri, Jun 15, 2012 at 8:30 PM, Andreas Färber wrote: > Am 15.06.2012 12:06, schrieb Li Zhang: >> For pseries machine, it needs to enable usb to add >> keyboard or usb mouse. -usb option won't be used in >> the future, and machine options is a better way to >> en

[Qemu-devel] [libvirt]virtio serial device problem

2013-05-07 Thread Li Zhang
Hi all, When we use the latest version of QEMU to build ovirt, we get this error reported from libvirt. qemu-system-ppc64: -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm: Bus 'virtio-serial0.0' is full qemu-system-ppc64: -device virts

Re: [Qemu-devel] [libvirt]virtio serial device problem

2013-05-07 Thread Li Zhang
On 2013年05月07日 17:50, Paolo Bonzini wrote: Il 07/05/2013 09:20, Li Zhang ha scritto: Hi all, When we use the latest version of QEMU to build ovirt, we get this error reported from libvirt. What QEMU commit is this? It might have been fixed already. You mean this is one bug of QEMU, right

Re: [Qemu-devel] [libvirt]virtio serial device problem

2013-05-07 Thread Li Zhang
On 2013年05月07日 21:05, Alexey Kardashevskiy wrote: On 05/07/2013 07:50 PM, Paolo Bonzini wrote: Il 07/05/2013 09:20, Li Zhang ha scritto: Hi all, When we use the latest version of QEMU to build ovirt, we get this error reported from libvirt. What QEMU commit is this

Re: [Qemu-devel] [libvirt]virtio serial device problem

2013-05-08 Thread Li Zhang
On 2013年05月08日 23:53, fred.kon...@greensocs.com wrote: On 05/07/2013 07:50 PM, Paolo Bonzini wrote: Il 07/05/2013 09:20, Li Zhang ha scritto: Hi all, Hi, When we use the latest version of QEMU to build ovirt, we get this error reported from libvirt. What QEMU commit is this

Re: [Qemu-devel] [libvirt]virtio serial device problem

2013-05-09 Thread Li Zhang
On 2013年05月09日 14:31, Alexey Kardashevskiy wrote: On 05/09/2013 04:07 PM, Li Zhang wrote: On 2013年05月08日 23:53, fred.kon...@greensocs.com wrote: On 05/07/2013 07:50 PM, Paolo Bonzini wrote: Il 07/05/2013 09:20, Li Zhang ha scritto: Hi all, Hi, When we use the latest version of QEMU to

Re: [Qemu-devel] [libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
Oops, correct libvirt mailing list address. :) Thanks. On 2013年05月21日 16:19, Li Zhang wrote: Hi all, Sorry to bring this problem up again. We encounter this problem in openstack which always use default machine type. Currently, QEMU sets mac99 as default setting for ppc64 but it doesn&#

[Qemu-devel] [qemu-devel][libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
Hi all, Sorry to bring this problem up again. We encounter this problem in openstack which always use default machine type. Currently, QEMU sets mac99 as default setting for ppc64 but it doesn't work on our platform at all. I tried to fix this in libvirt which it is not acceptable because libvi

Re: [Qemu-devel] [qemu-devel][libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 16:31, Peter Maydell wrote: On 21 May 2013 09:19, Li Zhang wrote: We encounter this problem in openstack which always use default machine type. Currently, QEMU sets mac99 as default setting for ppc64 but it doesn't work on our platform at all. I tried to fix this in li

Re: [Qemu-devel] [qemu-devel][libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 16:45, Peter Maydell wrote: On 21 May 2013 09:39, Daniel P. Berrange wrote: Libvirt has always had support for specifying what machine type to use. This discussion is simply about what machine type to default to, if the user hasn't explicitly asked for one. QEMU has the notion o

Re: [Qemu-devel] [qemu-devel][libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 17:25, Daniel P. Berrange wrote: On Tue, May 21, 2013 at 05:02:51PM +0800, Li Zhang wrote: On 2013年05月21日 16:45, Peter Maydell wrote: On 21 May 2013 09:39, Daniel P. Berrange wrote: Libvirt has always had support for specifying what machine type to use. This discussion is

Re: [Qemu-devel] [qemu-devel][libvirt] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 17:55, Paul Mackerras wrote: On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: On Tue, May 21, 2013 at 09:31:26AM +0100, Peter Maydell wrote: On 21 May 2013 09:19, Li Zhang wrote: We encounter this problem in openstack which always use default machine type

Re: [Qemu-devel] [libvirt] [qemu-devel] Default machine type setting for ppc64

2013-05-22 Thread Li Zhang
On 2013年05月22日 04:01, Anthony Liguori wrote: "Daniel P. Berrange" writes: On Tue, May 21, 2013 at 11:12:26AM -0600, Eric Blake wrote: I have also argued in the past that it would be useful for libvirt to support the idea of a template, where you can specify a domain XML that inherits defaults

Re: [Qemu-devel] commit 094b287 "Add USB option in machine options" broke i386 -usb

2012-11-22 Thread Li Zhang
is a regression. In particular it presumably means that trying to migrate a VM from 1.2 qemu that used USB will fail. -- PMM -- Li Zhang IBM China Linux Technology Centre

Re: [Qemu-devel] commit 094b287 "Add USB option in machine options" broke i386 -usb

2012-11-22 Thread Li Zhang
On 2012年11月23日 00:39, Peter Maydell wrote: On 22 November 2012 16:34, Li Zhang wrote: On 2012年11月23日 00:18, Peter Maydell wrote: On 29 October 2012 10:25, Alexander Graf wrote: From: zhlci...@gmail.com When -usb option is used, global varible usb_enabled is set. And all the plaform will

Re: [Qemu-devel] commit 094b287 "Add USB option in machine options" broke i386 -usb

2012-11-22 Thread Li Zhang
On 2012年11月23日 00:44, Alexander Graf wrote: On 22.11.2012, at 17:39, Peter Maydell wrote: On 22 November 2012 16:34, Li Zhang wrote: On 2012年11月23日 00:18, Peter Maydell wrote: On 29 October 2012 10:25, Alexander Graf wrote: From: zhlci...@gmail.com When -usb option is used, global

Re: [Qemu-devel] commit 094b287 "Add USB option in machine options" broke i386 -usb

2012-11-22 Thread Li Zhang
chine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); will return NULL if there are no user-set machine opts at this point, so we never go on to try to set the usb machine opt to true. Patch sent which fixes this bug. Thanks for fixing that. :) -- PMM -- Li Zhang IBM China Linux Technology Centre

Re: [Qemu-devel] [PATCH for-1.3] vl.c: Fix broken -usb option

2012-11-22 Thread Li Zhang
} +olist = qemu_find_opts("machine"); +qemu_opts_parse(olist, "usb=on", 0); add_device_config(DEV_USB, optarg); break; case QEMU_OPTION_device: Looks good to me. Thanks. -- Li Zhang IBM China Linux Technology Centre

Re: [Qemu-devel] [PATCH 2/5] pseries: Instantiate USB if requested

2012-08-04 Thread Li Zhang
On Tue, Jul 31, 2012 at 3:36 PM, Benjamin Herrenschmidt wrote: > On Tue, 2012-07-31 at 16:09 +1000, David Gibson wrote: >> The pseries machine currently ignores the -usb command line option. >> This patch corrects the problem by having it instantiate a PCI OHCI >> USB host controller when -usb is

Re: [Qemu-devel] [Qemu-ppc][PATCH v6 0/5] Add USB enablement and VGA enablement on sPAPR

2012-08-04 Thread Li Zhang
Sorry, it seems that I send this patchset twice. There are still some problems of my mail. The mailing list can't receive my mail. :) On 2012年08月05日 02:40, zhlci...@gmail.com wrote: From: Li Zhang v1 -> v2: * Convert USB option from char to bool. v2 -> v3: * Remove

  1   2   3   >