Re: [SeaBIOS] [Qemu-devel] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-06-03 Thread Stefan Priebe - Profihost AG
Am 31.05.2013 13:02, schrieb Amos Kong:
>>
>> ...
>>
>> thanks for this great explanation. I've done what you sayd but it still
>> does not work.
>>
>> Here is the output of the seabis debug log where you see the loop:
>> http://pastebin.com/raw.php?i=e53rdW2b
> 
> | found virtio-scsi at 0:5
> | Searching bootorder for: /pci@i0cf8/*@5/*@0/*@0,0
> | virtio-scsi vendor='QEMU' product='QEMU HARDDISK' rev='1.5.' type=0 
> removable=0
> | virtio-scsi blksize=512 sectors=104857600
> 
> It mean the fixed fw_dev_path can be identified.
> 
> You problem is a disrelated issue. I didn't see handle_18 before restart, it
> means guest succeses to boot from second nic. How does the resume be
> caused?

No it def. does not succeed. Only the first nic gets a reply from a tftp
server. It shows a menu and then does:
  localboot -1

which causes to go to the next boot device (pxelinux.cfg).

It then tries to boot from the 2nd nic. But there it gets only an IP
through DHCP but no tftp details or even an answer.

PS: this was working fine with Qemu 1.4.2

> Please only aasign two nics for guest, let's see if restart occurs.

With one nic i see correctly - no bootable device restart in 1 sec.
With only two nics the "screen" just turns black and nothing happens at
all after trying PXE from 2nd nic. But no message and no restart.

> Did you config pxe+tftp service for second nic? did you set some rom
> that just reboot the system?
DHCP yes tftp service no.

Stefan

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] [Qemu-devel] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-31 Thread Stefan Priebe - Profihost AG
Am 31.05.2013 13:02, schrieb Amos Kong:
>>
>> ...
>>
>> thanks for this great explanation. I've done what you sayd but it still
>> does not work.
>>
>> Here is the output of the seabis debug log where you see the loop:
>> http://pastebin.com/raw.php?i=e53rdW2b
> 
> | found virtio-scsi at 0:5
> | Searching bootorder for: /pci@i0cf8/*@5/*@0/*@0,0
> | virtio-scsi vendor='QEMU' product='QEMU HARDDISK' rev='1.5.' type=0 
> removable=0
> | virtio-scsi blksize=512 sectors=104857600
> 
> It mean the fixed fw_dev_path can be identified.
> 
> You problem is a disrelated issue. I didn't see handle_18 before restart, it
> means guest succeses to boot from second nic. How does the resume be
> caused?

No it def. does not succeed. Only the first nic gets a reply from a tftp
server. It shows a menu and then does:
  localboot -1

which causes to go to the next boot device (pxelinux.cfg).

It then tries to boot from the 2nd nic. But there it gets only an IP
through DHCP but no tftp details or even an answer.

PS: this was working fine with Qemu 1.4.2

> Please only aasign two nics for guest, let's see if restart occurs.

With one nic i see correctly - no bootable device restart in 1 sec.
With only two nics the "screen" just turns black and nothing happens at
all after trying PXE from 2nd nic. But no message and no restart.

> Did you config pxe+tftp service for second nic? did you set some rom
> that just reboot the system?
DHCP yes tftp service no.

Stefan

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-30 Thread Stefan Priebe - Profihost AG
Am 31.05.2013 00:51, schrieb Amos Kong:
> On Thu, May 30, 2013 at 10:30:21PM +0200, Stefan Priebe wrote:
>> Am 30.05.2013 15:13, schrieb Amos Kong:
>>> On Thu, May 30, 2013 at 02:09:25PM +0200, Stefan Priebe - Profihost AG 
>>> wrote:
>>>> Am 29.05.2013 09:56, schrieb Amos Kong:
>>>>> Recent virtio refactoring in QEMU made virtio-bus become the parent bus
>>>>> of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,
>>>>> typename will be added to fw_dev_path by default, the new fw_dev_path
>>>>> could not be identified by seabios. It causes that bootindex parameter
>>>>> of scsi device doesn't work.
>>>>>
>>>>> This patch implements get_fw_dev_path() in BusClass, it will be called
>>>>> if bus doesn't implement the method, tyename will be added to
>>>>> fw_dev_path. If the implemented method returns NULL, nothing will be
>>>>> added to fw_dev_path.
>>>>>
>>>>> It also implements virtio_bus_get_fw_dev_path() to return NULL. Then
>>>>> QEMU will still pass original style of fw_dev_path to seabios.
>>>>>
>>>>> Signed-off-by: Amos Kong 
>>>>> --
>>>>> v2: only add nothing to fw_dev_path when get_fw_dev_path() is
>>>>> implemented and returns NULL. then it will not effect other devices
>>>>> don't have get_fw_dev_path() implementation.
>>>>> v3: implement default get_fw_dev_path() in BusClass
>>>>> ---
>>>>>  hw/core/qdev.c | 10 +-
>>>>>  hw/virtio/virtio-bus.c |  6 ++
>>>>>  2 files changed, 15 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
>>>>> index 6985ad8..9190a7e 100644
>>>>> --- a/hw/core/qdev.c
>>>>> +++ b/hw/core/qdev.c
>>>>> @@ -515,7 +515,7 @@ static int qdev_get_fw_dev_path_helper(DeviceState 
>>>>> *dev, char *p, int size)
>>>>>  l += snprintf(p + l, size - l, "%s", d);
>>>>>  g_free(d);
>>>>>  } else {
>>>>> -l += snprintf(p + l, size - l, "%s", 
>>>>> object_get_typename(OBJECT(dev)));
>>>>> +return l;
>>>>>  }
>>>>>  }
>>>>>  l += snprintf(p + l , size - l, "/");
>>>>> @@ -867,9 +867,17 @@ static void qbus_initfn(Object *obj)
>>>>>  QTAILQ_INIT(&bus->children);
>>>>>  }
>>>>>
>>>>> +static char *default_bus_get_fw_dev_path(DeviceState *dev)
>>>>> +{
>>>>> +return g_strdup(object_get_typename(OBJECT(dev)));
>>>>> +}
>>>>> +
>>>>>  static void bus_class_init(ObjectClass *class, void *data)
>>>>>  {
>>>>> +BusClass *bc = BUS_CLASS(class);
>>>>> +
>>>>>  class->unparent = bus_unparent;
>>>>> +bc->get_fw_dev_path = default_bus_get_fw_dev_path;
>>>>>  }
>>>>>
>>>>>  static void qbus_finalize(Object *obj)
>>>>> diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
>>>>> index ea2e11a..6849a01 100644
>>>>> --- a/hw/virtio/virtio-bus.c
>>>>> +++ b/hw/virtio/virtio-bus.c
>>>>> @@ -161,10 +161,16 @@ static char *virtio_bus_get_dev_path(DeviceState 
>>>>> *dev)
>>>>>  return qdev_get_dev_path(proxy);
>>>>>  }
>>>>>
>>>>> +static char *virtio_bus_get_fw_dev_path(DeviceState *dev)
>>>>> +{
>>>>> +return NULL;
>>>>> +}
>>>>> +
>>>>>  static void virtio_bus_class_init(ObjectClass *klass, void *data)
>>>>>  {
>>>>>  BusClass *bus_class = BUS_CLASS(klass);
>>>>>  bus_class->get_dev_path = virtio_bus_get_dev_path;
>>>>> +bus_class->get_fw_dev_path = virtio_bus_get_fw_dev_path;
>>>>>  }
>>>>>
>>>>>  static const TypeInfo virtio_bus_info = {
>>>>>
>>>>
>>>> To me booting VMs with more than one SCSI disk does still not work.
>>>
>>> Hi Stefan,
>>>
>>> Can you provide your full command-lines ?
>>>
>>>> net: bootindex=100
>>>> 

Re: [SeaBIOS] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-30 Thread Stefan Priebe - Profihost AG
Am 29.05.2013 09:56, schrieb Amos Kong:
> Recent virtio refactoring in QEMU made virtio-bus become the parent bus
> of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,
> typename will be added to fw_dev_path by default, the new fw_dev_path
> could not be identified by seabios. It causes that bootindex parameter
> of scsi device doesn't work.
> 
> This patch implements get_fw_dev_path() in BusClass, it will be called
> if bus doesn't implement the method, tyename will be added to
> fw_dev_path. If the implemented method returns NULL, nothing will be
> added to fw_dev_path.
> 
> It also implements virtio_bus_get_fw_dev_path() to return NULL. Then
> QEMU will still pass original style of fw_dev_path to seabios.
> 
> Signed-off-by: Amos Kong 
> --
> v2: only add nothing to fw_dev_path when get_fw_dev_path() is
> implemented and returns NULL. then it will not effect other devices
> don't have get_fw_dev_path() implementation.
> v3: implement default get_fw_dev_path() in BusClass
> ---
>  hw/core/qdev.c | 10 +-
>  hw/virtio/virtio-bus.c |  6 ++
>  2 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 6985ad8..9190a7e 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -515,7 +515,7 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev, 
> char *p, int size)
>  l += snprintf(p + l, size - l, "%s", d);
>  g_free(d);
>  } else {
> -l += snprintf(p + l, size - l, "%s", 
> object_get_typename(OBJECT(dev)));
> +return l;
>  }
>  }
>  l += snprintf(p + l , size - l, "/");
> @@ -867,9 +867,17 @@ static void qbus_initfn(Object *obj)
>  QTAILQ_INIT(&bus->children);
>  }
>  
> +static char *default_bus_get_fw_dev_path(DeviceState *dev)
> +{
> +return g_strdup(object_get_typename(OBJECT(dev)));
> +}
> +
>  static void bus_class_init(ObjectClass *class, void *data)
>  {
> +BusClass *bc = BUS_CLASS(class);
> +
>  class->unparent = bus_unparent;
> +bc->get_fw_dev_path = default_bus_get_fw_dev_path;
>  }
>  
>  static void qbus_finalize(Object *obj)
> diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
> index ea2e11a..6849a01 100644
> --- a/hw/virtio/virtio-bus.c
> +++ b/hw/virtio/virtio-bus.c
> @@ -161,10 +161,16 @@ static char *virtio_bus_get_dev_path(DeviceState *dev)
>  return qdev_get_dev_path(proxy);
>  }
>  
> +static char *virtio_bus_get_fw_dev_path(DeviceState *dev)
> +{
> +return NULL;
> +}
> +
>  static void virtio_bus_class_init(ObjectClass *klass, void *data)
>  {
>  BusClass *bus_class = BUS_CLASS(klass);
>  bus_class->get_dev_path = virtio_bus_get_dev_path;
> +bus_class->get_fw_dev_path = virtio_bus_get_fw_dev_path;
>  }
>  
>  static const TypeInfo virtio_bus_info = {
> 

To me booting VMs with more than one SCSI disk does still not work.

net: bootindex=100
scsi0: bootindex=201

does not work

this one works fine:
net: bootindex=200
scsi0: bootindex=101


Stefan



___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios