On 2013年04月15日 18:16, Daniel P. Berrange wrote:
On Mon, Apr 15, 2013 at 10:55:07AM +0800, Li Zhang wrote:
> On 2013年04月12日 18:11, Daniel P. Berrange wrote:
>> On Thu, Apr 11, 2013 at 05:53:41PM +0800, Li Zhang wrote:
>>> On 2013年04月11日 17:41, Daniel P. Berrange wrote:
>>>> On Sun, Apr 07, 2013 at 05:00:06PM +0800, Li Zhang wrote:
>>>>> On 2013年03月14日 14:54, Li Zhang wrote:
>>>>>> From: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
>>>>>>
>>>>>> Currently, -device xxx still can't work well for ppc64
platform.
>>>>>> It's better use legacy USB option with default for ppc64.
>>>>>>
>>>>>> This patch is to legacy USB option with default for ppc64.
>>>>>>
>>>>>> Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
>>>>>> ---
>>>>>> src/qemu/qemu_command.c | 3 ++-
>>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>>>>>> index 1c9bfc9..618dfb1 100644
>>>>>> --- a/src/qemu/qemu_command.c
>>>>>> +++ b/src/qemu/qemu_command.c
>>>>>> @@ -5783,7 +5783,8 @@ qemuBuildCommandLine(virConnectPtr conn,
>>>>>> }
>>>>>> } else if (cont->type ==
VIR_DOMAIN_CONTROLLER_TYPE_USB &&
>>>>>> cont->model == -1 &&
>>>>>> - !virQEMUCapsGet(qemuCaps,
QEMU_CAPS_PIIX3_USB_UHCI)) {
>>>>>> + (!virQEMUCapsGet(qemuCaps,
QEMU_CAPS_PIIX3_USB_UHCI) ||
>>>>>> + def->os.arch == VIR_ARCH_PPC64))
{
>>>> I think you ought to modify qemu_capabilities.c to clear the
>>>> QEMU_CAPS_PIIX3_USB_UHCI flag when arch == ppc, instead of
>>>> trying to modify every place which checks that cap.
>>> Actually, PPC also can support PIIX3_USB_UHCI.
>>> I think this patch is to set the default USB controller as in QEMU,
>>> which can work correctly with USB keyboard and USB mouse.
>> Can you explain what difference you're expecting ? This patch does not
>> change the way the command line args are generated. It merely prevents
>> you from listing multiple <controller> elements in the XML. If you're
>> expecting any kind of functional change, you need more than what you
>> have there.
> Let me explain this.
>
> If USB controller is not sepcified, libvirt adds one implicit
> controller and model = -1.
> This patch is to change command line to '-usb' for this situation for PPC64.
> And QEMU will create one USB controller for it on PPC64.
Please update your patch to provide a test case to prove that
this actually works as you describe.
Sure, I will send out later.
Thanks. :)
Daniel