Re: [Qemu-devel] virtio scsi host draft specification, v3

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 08:41 AM, Paolo Bonzini wrote: On 06/29/2011 11:39 AM, Stefan Hajnoczi wrote: > > Of course, when doing so we would be lose the ability to freely remap > > LUNs. But then remapping LUNs doesn't gain you much imho. > > Plus you could always use qemu block backend here if you want >

Re: [Qemu-devel] [PATCH 2/3] block: drive_init(): Simplify interface type setting

2011-07-01 Thread Markus Armbruster
Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 3/3] block: drive_init(): Improve CHS setting error message

2011-07-01 Thread Markus Armbruster
Luiz Capitulino writes: > The current media doesn't clearly say the error cause. > > Signed-off-by: Luiz Capitulino > --- > blockdev.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/blockdev.c b/blockdev.c > index 0a90ae8..2dbdd1b 100644 > --- a/blockdev.c > +++

Re: [Qemu-devel] [PATCH 1/3] block: drive_init(): Fix indentation

2011-07-01 Thread Markus Armbruster
Luiz Capitulino writes: > Some constructions in that function have broken indentation. Fix them. > > Signed-off-by: Luiz Capitulino > --- > blockdev.c | 52 ++-- > 1 files changed, 26 insertions(+), 26 deletions(-) > > diff --git a/blockdev.c b/

[Qemu-devel] [PATCH 0/3] [v4] Megasas HBA emulation

2011-07-01 Thread Hannes Reinecke
Hi all, thanks to Paolo and Stefan most of the SCSI patches are now in, so I've made the next attempt of submitting my Megaraid SAS HBA emulation. To do so, I've done two additional patches, both should be valid cleanups. - Replace 'tag' by 'hba_private' The SCSIRequest structure has a 'tag',

[Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. Signed-off-by: Hannes Reinecke --- hw/virtio-net.c|2 +- hw/virtio-serial-bus.c |2 +- iov.c | 23 ++- iov.h |

[Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. Signed-off-by: Hannes Reinecke --- hw/esp.c |

Re: [Qemu-devel] [PATCH v3] xen: implement unplug protocol in xen_platform

2011-07-01 Thread Kevin Wolf
Am 30.06.2011 16:16, schrieb Stefano Stabellini: > On Thu, 30 Jun 2011, Kevin Wolf wrote: >>> +static int pci_piix3_xen_ide_unplug(DeviceState *dev) >>> +{ >>> +PCIDevice *pci_dev; >>> +PCIIDEState *pci_ide; >>> +DriveInfo *di; >>> +int i = 0; >>> + >>> +pci_dev = DO_UPCAST(PCID

Re: [Qemu-devel] [PATCH] virtio-blk: Turn drive serial into a qdev property

2011-07-01 Thread Kevin Wolf
Am 20.06.2011 11:35, schrieb Markus Armbruster: > It needs to be a qdev property, because it belongs to the drive's > guest part. Precedence: commit a0fef654 and 6ced55a5. > > Bonus: info qtree now shows the serial number. > > Signed-off-by: Markus Armbruster > --- > hw/s390-virtio-bus.c |

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, -const void *buf, size_t size) +const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Paolo

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:02 AM, Alexander Graf wrote: On 01.07.2011, at 09:42, Hannes Reinecke wrote: Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense > to also modify iov_

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 09:42, Hannes Reinecke wrote: > Occasionally, the buffer needs to be placed at a offset within > the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense to also modify iov_to_buf respectively then, so the API stays simi

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:03 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, - const void *buf, size_t size) + const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Bummer. Cheers, Hannes -

Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. This makes

Re: [Qemu-devel] virtio scsi host draft specification, v3

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:14 AM, Hannes Reinecke wrote: Actually, the kernel does _not_ do a LUN remapping. Not the kernel, the in-kernel target. The in-kernel target can and will map hardware LUNs (target_lun in drivers/target/*) to arbitrary LUNs (mapped_lun). Put in another way: the virtio-scsi de

Re: [Qemu-devel] [PATCH] sheepdog: add data preallocation support

2011-07-01 Thread Kevin Wolf
Am 21.05.2011 14:35, schrieb MORITA Kazutaka: > This introduces a qemu-img create option for sheepdog which allows the > data to be preallocated (note that sheepdog always preallocates > metadata). This is necessary to use Sheepdog volumes as a backend > storage for iSCSI target. More information

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 10:07, Hannes Reinecke wrote: > On 07/01/2011 10:02 AM, Alexander Graf wrote: >> >> On 01.07.2011, at 09:42, Hannes Reinecke wrote: >> >>> Occasionally, the buffer needs to be placed at a offset within >>> the iovec when copying the buffer to the iovec. >> >> So this is a buf

Re: [Qemu-devel] [PATCH] [PowerPC][RFC] booke timers

2011-07-01 Thread Fabien Chouteau
On 30/06/2011 21:26, Scott Wood wrote: > On Thu, 30 Jun 2011 17:51:10 +0200 > Fabien Chouteau wrote: > >> On 28/06/2011 19:49, Scott Wood wrote: >>> On Tue, 28 Jun 2011 15:35:00 +0200 >>> Fabien Chouteau wrote: >>> On 27/06/2011 22:28, Scott Wood wrote: > On Mon, 27 Jun 2011 18:14:06 +02

Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handl

Re: [Qemu-devel] [PATCH 3/3] megasas: LSI Megaraid SAS emulation

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 09:42, Hannes Reinecke wrote: > This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. > > Signed-off-by: Hannes Reinecke > --- > Makefile.objs |1 + > default-configs/pci.mak |1 + > hw/megasas.c| 1923 ++

[Qemu-devel] qemu crashes on Mac OS X

2011-07-01 Thread Damjan Marion (damarion)
Hi, I have an issue when I try to run qemu-system-arm on Mac OS X. Sometime between 1 and 15 secs after qemu is started it crashes as shown bellow. Same thing on linux host works fine. Is anybody else experiencing this? Any Hints? Thanks, Damjan (gdb) run Starting program: /opt/arm-qemu/b

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Jakub Jermar
Hi Artyom, On 1.7.2011 11:15, Artyom Tarasenko wrote: > Hi Jakub, > 2011/6/30 Jakub Jermar : >> Hi, >> >> we have been observing a problem with HelenOS running on the latest git >> Qemu/sparc64. The gist of the problem is that the following computation >> of minimum of 64 and 512 surprisingly give

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
Hi Jakub, 2011/6/30 Jakub Jermar : > Hi, > > we have been observing a problem with HelenOS running on the latest git > Qemu/sparc64. The gist of the problem is that the following computation > of minimum of 64 and 512 surprisingly gives 512: > >  bytes = min(len, BPS(bs) - pos % BPS(bs)); >  bytes

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
On Fri, Jul 1, 2011 at 11:36 AM, Jakub Jermar wrote: > Hi Artyom, > > On 1.7.2011 11:15, Artyom Tarasenko wrote: >> Hi Jakub, >> 2011/6/30 Jakub Jermar : >>> Hi, >>> >>> we have been observing a problem with HelenOS running on the latest git >>> Qemu/sparc64. The gist of the problem is that the fo

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Paul Brook
> One feature we need for QEMU/KVM on embedded Power Architecture is the > ability to do passthru assignment of SoC I/O devices and memory. An > important use case in embedded is creating static partitions-- > taking physical memory and I/O devices (non-PCI) and partitioning > them between the hos

[Qemu-devel] PCI: how handle multifunction / compound devices best?

2011-07-01 Thread Gerd Hoffmann
Hi folks, I'm still looking for a sane way to handle multifunction pci devices, specifically a EHCI USB controller with UHCI companion controllers. Here comes a small (incomplete[1]) two patch series to make the issue more clear. The first patch adds a function which creates all devices with t

[Qemu-devel] [PATCH 1/2] usb: add ich9_ehci_with_companion_init()

2011-07-01 Thread Gerd Hoffmann
Add convinience function which creates a ehci controller with three companion uhci controllers, with all properties are setup correctly. The guest will see this: [root@fedora64 ~]# lspci -s2 00:02.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:02.1 US

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 13:16, Paul Brook wrote: >> One feature we need for QEMU/KVM on embedded Power Architecture is the >> ability to do passthru assignment of SoC I/O devices and memory. An >> important use case in embedded is creating static partitions-- >> taking physical memory and I/O devices

[Qemu-devel] [PATCH 2/2] usb: windup ich9_ehci_with_companion_init via -usb2 switch.

2011-07-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pc_piix.c| 14 ++ qemu-options.hx | 13 +++-- vl.c|3 +++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index c5c16b4..c9aed67 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 02:58, Benjamin Herrenschmidt wrote: > On Thu, 2011-06-30 at 15:59 +, Yoder Stuart-B08248 wrote: >> One feature we need for QEMU/KVM on embedded Power Architecture is the >> ability to do passthru assignment of SoC I/O devices and memory. An >> important use case in embed

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 13:55, Paul Brook wrote: > >> But the real challenge is how to expose the device to the guest device >> tree. Especially when it comes to links between dt nodes, interrupt maps, >> etc. We basically have 3 choices there: >> >> * take the host device tree pieces and modify the

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Paul Brook
> But the real challenge is how to expose the device to the guest device > tree. Especially when it comes to links between dt nodes, interrupt maps, > etc. We basically have 3 choices there: > > * take the host device tree pieces and modify them > * provide device tree chunks for each device

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Anthony Liguori
On 07/01/2011 06:40 AM, Alexander Graf wrote: On 01.07.2011, at 02:58, Benjamin Herrenschmidt wrote: On Thu, 2011-06-30 at 15:59 +, Yoder Stuart-B08248 wrote: One feature we need for QEMU/KVM on embedded Power Architecture is the ability to do passthru assignment of SoC I/O devices and me

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Anthony Liguori
On 06/30/2011 07:58 PM, Benjamin Herrenschmidt wrote: On Thu, 2011-06-30 at 15:59 +, Yoder Stuart-B08248 wrote: This avoids needing to pass the host device tree, but could get awkward-- the i2c example above is very simple, some device nodes are very large with a complex hierarch

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Anthony Liguori
On 07/01/2011 07:02 AM, Alexander Graf wrote: On 01.07.2011, at 13:55, Paul Brook wrote: But the real challenge is how to expose the device to the guest device tree. Especially when it comes to links between dt nodes, interrupt maps, etc. We basically have 3 choices there: * take the host

Re: [Qemu-devel] PCI: how handle multifunction / compound devices best?

2011-07-01 Thread Anthony Liguori
On 07/01/2011 06:27 AM, Gerd Hoffmann wrote: Hi folks, I'm still looking for a sane way to handle multifunction pci devices, specifically a EHCI USB controller with UHCI companion controllers. Here comes a small (incomplete[1]) two patch series to make the issue more clear. The first patch

Re: [Qemu-devel] [PATCH v6 01/12] VMDK: introduce VmdkExtent

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 06:55, schrieb Fam Zheng: > Introduced VmdkExtent array into BDRVVmdkState, enable holding multiple > image extents for multiple file image support. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 355 > +- > 1 files cha

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Paul Brook
> > So, from a qemu command line perspective, all you should have to do is > > pass qemu the device-tree -path- to the device you want to pass-trough > > (you may support passing a full hierarchy here). > > I agree in principle but I think it should be done in a slightly > different way. > > I th

Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format version

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 06:55, schrieb Fam Zheng: > Separate vmdk_open by subformats to: > * vmdk_open_vmdk3 > * vmdk_open_vmdk4 > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 197 ++--- > 1 files changed, 131 insertions(+), 66 deletions(-) > > di

Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format version

2011-07-01 Thread Fam Zheng
> > bdrv_pread only ever returns 0 for success or -errno for errors. So you > can simplify the code like this: > > ret = bdrv_pread(...); > if (ret < 0) { >    goto fail_l1; > } > > You have the same pattern in other places, too. > I think bdrv_pead do return the read bytes, did you mean bdrv_read

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Jakub Jermar
On 1.7.2011 12:41, Artyom Tarasenko wrote: > Looks like it's a pretty nice test case. > > The test case scenario is to load the initial values into the > registers (you already know them), > calculate the mins, cmp the result with expected and jump somewhere. > Since it happens with interrupts dis

Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format version

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 15:06, schrieb Fam Zheng: >> >> bdrv_pread only ever returns 0 for success or -errno for errors. So you >> can simplify the code like this: >> >> ret = bdrv_pread(...); >> if (ret < 0) { >>goto fail_l1; >> } >> >> You have the same pattern in other places, too. > > I think bdrv_p

Re: [Qemu-devel] [PATCH 1/3] block: drive_init(): Fix indentation

2011-07-01 Thread Luiz Capitulino
On Fri, 01 Jul 2011 09:16:38 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > Some constructions in that function have broken indentation. Fix them. > > > > Signed-off-by: Luiz Capitulino > > --- > > blockdev.c | 52 ++-- > > 1 f

Re: [Qemu-devel] [PATCH v6 05/12] VMDK: add field BDRVVmdkState.desc_offset

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 06:55, schrieb Fam Zheng: > There are several occurrence of magic number 0x200 as the descriptor > offset within mono sparse image file. This is not the case for images > with separate descriptor file. So a field is added to BDRVVmdkState to > hold the correct value. > > Signed-off-b

Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handl

[Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting

2011-07-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- blockdev.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7d579d6..470be71 100644 --- a/blockdev.c +++ b/blockdev.c @@ -240,14 +240,6 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Anthony Liguori
On 07/01/2011 07:52 AM, Paul Brook wrote: So, from a qemu command line perspective, all you should have to do is pass qemu the device-tree -path- to the device you want to pass-trough (you may support passing a full hierarchy here). I agree in principle but I think it should be done in a slight

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Jakub Jermar
On 1.7.2011 14:57, Jakub Jermar wrote: > On 1.7.2011 12:41, Artyom Tarasenko wrote: >> Looks like it's a pretty nice test case. >> >> The test case scenario is to load the initial values into the >> registers (you already know them), >> calculate the mins, cmp the result with expected and jump some

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Laurent Desnogues
On Fri, Jul 1, 2011 at 2:57 PM, Jakub Jermar wrote: [...] > When _not_ singlestepping via GDB's `stepi`, the testcase will fail and > crash Qemu like this: > > qemu: fatal: Trap 0x0101 while trap level (5) >= MAXTL (5), Error state > > > On the other hand, when I attach GDB to Qemu and step throu

[Qemu-devel] [PATCH V2] [PowerPC][RFC] booke timers

2011-07-01 Thread Fabien Chouteau
While working on the emulation of the freescale p2010 (e500v2) I realized that there's no implementation of booke's timers features. Currently mpc8544 uses ppc_emb (ppc_emb_timers_init) which is close but not exactly like booke (for example booke uses different SPR). This is a first attempt for a

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Laurent Desnogues
On Fri, Jul 1, 2011 at 4:11 PM, Jakub Jermar wrote: [...] > Actually, the testcase can be further reduced into: > > .global _start > > .text > > .space 0x20 > > _start: >        set 110393, %i1 >        set 0x40, %i2 > >        cmp  %i1, %i2 >        udivx  %g0, 1, %g0 >        movgu  %xcc, %i2, %

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Jakub Jermar
On 1.7.2011 16:15, Laurent Desnogues wrote: > You don't have to use gdb to reproduce the issue, just add -singlestep > when running qemu. This is strange, -singlestep does not work for me here as the testcase still ends with trap 0x101. The only way how the testcase can succeed for me is via GDB's

[Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements

2011-07-01 Thread Luiz Capitulino
Please, see individual patches for details. v1 -> v2: - o Drop indentation patch o Use error message suggested by Markus blockdev.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-)

Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 03:11 PM, Hannes Reinecke wrote: On 07/01/2011 10:27 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_

[Qemu-devel] [PATCH 2/2] block: drive_init(): Improve CHS setting error message

2011-07-01 Thread Luiz Capitulino
The current message doesn't clearly communicate the error cause. Signed-off-by: Luiz Capitulino --- blockdev.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index 470be71..a97a801 100644 --- a/blockdev.c +++ b/blockdev.c @@ -310,7 +310,7 @@ Dri

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
On Fri, Jul 1, 2011 at 4:15 PM, Laurent Desnogues wrote: > On Fri, Jul 1, 2011 at 2:57 PM, Jakub Jermar wrote: > [...] >> When _not_ singlestepping via GDB's `stepi`, the testcase will fail and >> crash Qemu like this: >> >> qemu: fatal: Trap 0x0101 while trap level (5) >= MAXTL (5), Error state

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Jakub Jermar
On 1.7.2011 16:24, Laurent Desnogues wrote: > On Fri, Jul 1, 2011 at 4:11 PM, Jakub Jermar wrote: > [...] >> Actually, the testcase can be further reduced into: >> >> .global _start >> >> .text >> >> .space 0x20 >> >> _start: >>set 110393, %i1 >>set 0x40, %i2 >> >>cmp %i1,

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
On Fri, Jul 1, 2011 at 4:28 PM, Jakub Jermar wrote: > On 1.7.2011 16:24, Laurent Desnogues wrote: >> On Fri, Jul 1, 2011 at 4:11 PM, Jakub Jermar wrote: >> [...] >>> Actually, the testcase can be further reduced into: >>> >>> .global _start >>> >>> .text >>> >>> .space 0x20 >>> >>> _start: >>>  

Re: [Qemu-devel] [PATCH] Add e500 instructions dcblc, dcbtls and dcbtstl as no-op

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 16:59, Fabien Chouteau wrote: > On 01/07/2011 00:38, Alexander Graf wrote: >> >> On 01.07.2011, at 00:32, Scott Wood wrote: >> >>> On Fri, 1 Jul 2011 00:28:19 +0200 >>> Alexander Graf wrote: >>> On 01.07.2011, at 00:23, Scott Wood wrote: > On Fri, 1 Jul

Re: [Qemu-devel] [PATCH] Add e500 instructions dcblc, dcbtls and dcbtstl as no-op

2011-07-01 Thread Fabien Chouteau
On 01/07/2011 00:38, Alexander Graf wrote: > > On 01.07.2011, at 00:32, Scott Wood wrote: > >> On Fri, 1 Jul 2011 00:28:19 +0200 >> Alexander Graf wrote: >> >>> >>> On 01.07.2011, at 00:23, Scott Wood wrote: >>> On Fri, 1 Jul 2011 00:18:22 +0200 Alexander Graf wrote: > >

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Laurent Desnogues
On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko wrote: [...] >> I find it odd that udivx is using cpu_cc_src and cpu_cc_src2.  Using >> dedicated local temps seems to fix the issue. > > Do we need to copy cpu_src* to further temps at all? IMHO > > -                        tcg_gen_mov_tl(cpu_cc_sr

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-01 Thread Damjan Marion
On Jul 1, 2011, at 11:17 AM, Damjan Marion (damarion) wrote: > > Hi, > > I have an issue when I try to run qemu-system-arm on Mac OS X. > Sometime between 1 and 15 secs after qemu is started it crashes > as shown bellow. > > Same thing on linux host works fine. > > Is anybody else experienci

[Qemu-devel] [PATCH 0/3] [v5] Megasas HBA Emulation

2011-07-01 Thread Hannes Reinecke
Hi all, after getting various feedback from Paolo, Stefan, and Alexander I've respun the patches. Chances since the previous version: - iov: Update parameter usage in iov_(to|from)_buf() Updated description for the first patch and clarified the usage Renamed arguments for io_XXX for clarifica

[Qemu-devel] [PATCH 1/3] iov: Update parameter usage in iov_(to|from)_buf()

2011-07-01 Thread Hannes Reinecke
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't. This patch adds the missing parameter to iov_from_buf(). It also renames the 'offset' parameter to 'iov_off' to emphasize it's the offset into the iovec and not the buffer. Signed-off-by: Hannes Reinecke --- hw/virtio-net.c|

[Qemu-devel] [PATCH 2/3] scsi: Add 'hba_private' to SCSIRequest

2011-07-01 Thread Hannes Reinecke
'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. 'tag' is still being kept for tracing purposes. Signed-off-b

Re: [Qemu-devel] [PATCH] Add e500 instructions dcblc, dcbtls and dcbtstl as no-op

2011-07-01 Thread Fabien Chouteau
On 01/07/2011 17:05, Alexander Graf wrote: > > On 01.07.2011, at 16:59, Fabien Chouteau wrote: > >> On 01/07/2011 00:38, Alexander Graf wrote: >>> >>> On 01.07.2011, at 00:32, Scott Wood wrote: >>> On Fri, 1 Jul 2011 00:28:19 +0200 Alexander Graf wrote: > > On 01.07.2011, at

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
On Fri, Jul 1, 2011 at 5:20 PM, Laurent Desnogues wrote: > On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko wrote: > [...] >>> I find it odd that udivx is using cpu_cc_src and cpu_cc_src2.  Using >>> dedicated local temps seems to fix the issue. >> >> Do we need to copy cpu_src* to further temps

Re: [Qemu-devel] [PATCH 2/3] scsi: Add 'hba_private' to SCSIRequest

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 05:35 PM, Hannes Reinecke wrote: 'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel. 'tag' is sti

Re: [Qemu-devel] [PATCH] Add e500 instructions dcblc, dcbtls and dcbtstl as no-op

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 17:39:49 +0200 Fabien Chouteau wrote: > No, I just implemented these no-oped instructions to get rid of an illegal > instruction exception while running u-boot on my emulated p2010. > Heh, so someone *is* trying to run firmware. :-) It would take a lot of low-level hardware

Re: [Qemu-devel] SPARC64 support on FreeBSD, has it improved as of yet?

2011-07-01 Thread Super Bisquit
On Wed, Jun 29, 2011 at 9:46 PM, Super Bisquit wrote: > > > On Wed, Jun 29, 2011 at 1:10 AM, Bob Breuer wrote: > >> Super Bisquit wrote: >> > >> ... >> > >> > It builds, doesn't run. More like it runs and hangs. >> > >> > $ qemu-system-sparc -cpu LEON3 -hda test.img -cdrom >> Downloads/debian-6.0

Re: [Qemu-devel] [PATCH 1/3] iov: Update parameter usage in iov_(to|from)_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 17:35, Hannes Reinecke wrote: > iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't. > This patch adds the missing parameter to iov_from_buf(). > It also renames the 'offset' parameter to 'iov_off' to > emphasize it's the offset into the iovec and not the buffer. > >

Re: [Qemu-devel] [HelenOS-devel] [sparc64] Miscomputed minimum of a group of numbers in sparc64 emulation

2011-07-01 Thread Artyom Tarasenko
On Fri, Jul 1, 2011 at 5:53 PM, Artyom Tarasenko wrote: > On Fri, Jul 1, 2011 at 5:20 PM, Laurent Desnogues > wrote: >> On Fri, Jul 1, 2011 at 5:03 PM, Artyom Tarasenko wrote: >> [...] I find it odd that udivx is using cpu_cc_src and cpu_cc_src2.  Using dedicated local temps seems to f

Re: [Qemu-devel] [PATCH] Add e500 instructions dcblc, dcbtls and dcbtstl as no-op

2011-07-01 Thread Fabien Chouteau
On 01/07/2011 18:00, Scott Wood wrote: > On Fri, 1 Jul 2011 17:39:49 +0200 > Fabien Chouteau wrote: > >> No, I just implemented these no-oped instructions to get rid of an illegal >> instruction exception while running u-boot on my emulated p2010. >> > > Heh, so someone *is* trying to run firmwa

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 10:58:14 +1000 Benjamin Herrenschmidt wrote: > So, from a qemu command line perspective, all you should have to do is > pass qemu the device-tree -path- to the device you want to pass-trough > (you may support passing a full hierarchy here). > > That is for normal MMIO mapped

Re: [Qemu-devel] [PATCH 0/9] PPC patch queue 2011-06-17

2011-07-01 Thread Alexander Graf
On 17.06.2011, at 16:43, Alexander Graf wrote: > The following changes since commit eb47d7c5d96060040931c42773ee07e61e547af9: > Peter Maydell (1): >hw/9118.c: Implement active-low interrupt support > > are available in the git repository at: > > git://repo.or.cz/qemu/agraf.git ppc-nex

Re: [Qemu-devel] [PATCH 3/3] megasas: LSI Megaraid SAS emulation

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 17:35, Hannes Reinecke wrote: > This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. Have you tried to execute the current version of megasas and actually do something with it? I just booted up openSUSE 11.4 rescue from DVD with a megasas adapter that contained

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 07:10:45 -0500 Anthony Liguori wrote: > I agree in principle but I think it should be done in a slightly > different way. > > I think we ought to support composing a device by passthrough. For > instance, something like: > > [physical-device "mydev"] > region[0].file = "/d

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 18:03:01 +0100 Paul Brook wrote: > Basically you should start by implementing full emulation of a device with > similar characteristics to the one you want to passthrough. That's not going to happen. > Once you've done all the above, host device passthrough should be relativ

Re: [Qemu-devel] [PATCH v6 08/12] VMDK: change get_cluster_offset return type

2011-07-01 Thread Kevin Wolf
Am 01.07.2011 06:55, schrieb Fam Zheng: > The return type of get_cluster_offset was an offset that use 0 to denote > 'not allocated', this will be no longer true for flat extents, as we see > flat extent file as a single huge cluster whose offset is 0 and length > is the whole file length. > So now

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Paul Brook
> > irq[0].guest_irq = "10" > > > > This should be independent of anything to do with device tree. This > > would be useful for x86 too to assign platform devices (like the HPET). > > That's fine, as long as there's something layered on top of it for the case > where we do want to reference some

Re: [Qemu-devel] [PATCH V3] Support logging xen-guest console

2011-07-01 Thread Stefano Stabellini
On Fri, 1 Jul 2011, Chun Yan Liu wrote: > On Thursday, June 30, 2011 07:18:54 PM you wrote: > > On 06/30/2011 11:39 AM, Chun Yan Liu wrote: > > > On Thursday, June 30, 2011 03:58:57 PM Alexander Graf wrote: > > >> On 30.06.2011, at 09:08, Chunyan Liu wrote: > > >>> Add code to support logging xen-d

Re: [Qemu-devel] [PATCH v3] xen: implement unplug protocol in xen_platform

2011-07-01 Thread Stefano Stabellini
On Fri, 1 Jul 2011, Kevin Wolf wrote: > Am 30.06.2011 16:16, schrieb Stefano Stabellini: > > On Thu, 30 Jun 2011, Kevin Wolf wrote: > >>> +static int pci_piix3_xen_ide_unplug(DeviceState *dev) > >>> +{ > >>> +PCIDevice *pci_dev; > >>> +PCIIDEState *pci_ide; > >>> +DriveInfo *di; > >>> +

Re: [Qemu-devel] qemu-user[armel/mips] and debian-rootfs

2011-07-01 Thread Lisandro Damián Nicanor Pérez Meyer
Hi! First of all, sorry for breaking the thread [0] (although it is too old maybe). [0] As I have stumbled upon this bug, I would like to know if there is something I can do to try to help fixing it. I have never seen qemu's c

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 12:16:35 +0100 Paul Brook wrote: > > One feature we need for QEMU/KVM on embedded Power Architecture is the > > ability to do passthru assignment of SoC I/O devices and memory. An > > important use case in embedded is creating static partitions-- > > taking physical memory and

[Qemu-devel] [PATCH][sparc64] fix cpu_cc_src and cpu_cc_src2 corruption in udivx and sdivx

2011-07-01 Thread Artyom Tarasenko
udivx and sdvix don't modify condition flags, so they shall not overwrite cpu_cc_* Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 32 ++-- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/transl

Re: [Qemu-devel] Benchmarking activities

2011-07-01 Thread Blue Swirl
2011/6/27 Ben Vogler : > Hi QEMU devel team, > > > > I work for Toyota Technical Centre Australia in the software department. We > are currently conducting benchmarking on a broad spectrum of virtual > platform simulators. I was wondering if I could ask you guys a few question > about QEMU, however

Re: [Qemu-devel] 80-column rule and breaking output statements

2011-07-01 Thread Blue Swirl
On Mon, Jun 27, 2011 at 12:48 PM, Amit Shah wrote: > On (Sun) 26 Jun 2011 [20:43:16], Blue Swirl wrote: >> On Wed, Jun 22, 2011 at 7:53 AM, Amit Shah wrote: > > [snip] > >> > From dec93d9eccd639f7bfd1343dca65fa112eb19e3e Mon Sep 17 00:00:00 2001 >> > Message-Id: >> > >> > From: Amit Shah >> >

[Qemu-devel] simulation paper with Blackfin and QEMU + GNU sim

2011-07-01 Thread Mike Frysinger
Robin and i wrote a paper on simulation that focused on QEMU and the GNU sim with the Blackfin architecture. it covers implementation, testing, and benchmarking. maybe some people will find it useful. maybe not. http://docs.blackfin.uclinux.org/lib/exe/fetch.php?media=presentations:ols-2011-sim.p

Re: [Qemu-devel] [PATCHv2] Add compat eventfd header

2011-07-01 Thread Blue Swirl
On Thu, Jun 30, 2011 at 6:57 PM, Michael S. Tsirkin wrote: > Support build on rhel 5.X where we have syscall for eventfd but not > userspace wrapper. > > (cherry-picked from commit 9e3269181e9bc56feb43bcd4e8ce0b82cd543e65 >  in qemu-kvm.git). > > Signed-off-by: Michael S. Tsirkin > --- > > Change

[Qemu-devel] [Bug 804517] Re: qemu crashes on Darwin in qemu_iohandler_poll

2011-07-01 Thread Damjan Marion
fter bisection seems that this starts happening after following patch: commit 09716e45a05cc0c93bcf55bd0c0888dd678e490f Author: Alexander Graf Date: Thu Jun 9 00:55:37 2011 +0200 sigfd: use pthread_sigmask diff --git a/compatfd.c b/compatfd.c index bd377c4..41586ce 100644 --- a/compatfd.c

[Qemu-devel] [Bug 804517] [NEW] qemu crashes on Darwin in qemu_iohandler_poll

2011-07-01 Thread Damjan Marion
Public bug reported: I have an issue when I try to run qemu-system-arm on Mac OS X. Sometime between 1 and 15 secs after qemu is started it crashes as shown bellow. Same thing on linux host works fine. Is anybody else experiencing this? Any Hints? Thanks, Damjan (gdb) run Starting program:

Re: [Qemu-devel] [PATCH V2] [PowerPC][RFC] booke timers

2011-07-01 Thread Scott Wood
On Fri, 1 Jul 2011 16:13:41 +0200 Fabien Chouteau wrote: > +uint64_t cpu_ppc_get_tb(ppc_tb_t *tb_env, uint64_t vmclk, int64_t tb_offset) > { > /* TB time in tb periods */ > return muldiv64(vmclk, tb_env->tb_freq, get_ticks_per_sec()) + tb_offset; > @@ -678,18 +661,23 @@ static void __c

Re: [Qemu-devel] SPARC64 support on FreeBSD, has it improved as of yet?

2011-07-01 Thread Blue Swirl
On Fri, Jul 1, 2011 at 7:03 PM, Super Bisquit wrote: > > > On Wed, Jun 29, 2011 at 9:46 PM, Super Bisquit > wrote: >> >> >> On Wed, Jun 29, 2011 at 1:10 AM, Bob Breuer wrote: >>> >>> Super Bisquit wrote: >>> > >>> ... >>> > >>> > It builds, doesn't run. More like it runs and hangs. >>> > >>> > $

Re: [Qemu-devel] "cpu-exec.c: avoid AREG0 use" breaks x86 emulation on x86-64

2011-07-01 Thread Blue Swirl
On Fri, Jul 1, 2011 at 4:44 AM, TeLeMan wrote: > On Fri, Jul 1, 2011 at 00:47, Jan Kiszka wrote: >> Hi Blue, >> >> commit cea5f9a28f breaks here, just starting qemu without any >> parameters: >> >> Starting program: qemu-system-x86_64 >> [Thread debugging using libthread_db enabled] >> >> Program

Re: [Qemu-devel] device assignment for embedded Power

2011-07-01 Thread Paul Brook
> On Fri, 1 Jul 2011 18:03:01 +0100 > > Paul Brook wrote: > > Basically you should start by implementing full emulation of a device > > with similar characteristics to the one you want to passthrough. > > That's not going to happen. Why is your device so unique? How does it interact with the gu

Re: [Qemu-devel] [PATCH 08/12] TCG/PPC: use TCG_REG_CALL_STACK instead of TCG_REG_R1

2011-07-01 Thread Blue Swirl
On Tue, Jun 28, 2011 at 1:51 AM, malc wrote: > On Sun, 26 Jun 2011, Blue Swirl wrote: > >> Use TCG_REG_CALL_STACK instead of TCG_REG_R1 etc. for consistency. >> > > This i'd rather avoid. Why? In addition to the consistency among targets, a magic constant is replaced with a symbol which improves

Re: [Qemu-devel] [PATCH 08/12] TCG/PPC: use TCG_REG_CALL_STACK instead of TCG_REG_R1

2011-07-01 Thread malc
On Sat, 2 Jul 2011, Blue Swirl wrote: > On Tue, Jun 28, 2011 at 1:51 AM, malc wrote: > > On Sun, 26 Jun 2011, Blue Swirl wrote: > > > >> Use TCG_REG_CALL_STACK instead of TCG_REG_R1 etc. for consistency. > >> > > > > This i'd rather avoid. > > Why? In addition to the consistency among targets, a

Re: [Qemu-devel] [PATCH] hppa: Fix printf warnings in hppa-dis.c.

2011-07-01 Thread Blue Swirl
Thanks, applied. On Tue, Jun 21, 2011 at 1:02 AM, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- >  hppa-dis.c |    6 +++--- >  1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hppa-dis.c b/hppa-dis.c > index a5760a9..435da73 100644 > --- a/hppa-dis.c > +++ b/

Re: [Qemu-devel] [PATCH 01/12] TCG/HPPA: use TCG_REG_CALL_STACK instead of TCG_REG_SP

2011-07-01 Thread Blue Swirl
On Mon, Jun 27, 2011 at 12:02 AM, Richard Henderson wrote: > On 06/26/2011 12:20 PM, Blue Swirl wrote: >> Use TCG_REG_CALL_STACK instead of TCG_REG_SP for consistency. >> >> Signed-off-by: Blue Swirl > > Acked-by: Richard Henderson Thanks for the Ack, applied both patches.

Re: [Qemu-devel] [PATCH][sparc64] fix cpu_cc_src and cpu_cc_src2 corruption in udivx and sdivx

2011-07-01 Thread Laurent Desnogues
On Fri, Jul 1, 2011 at 9:28 PM, Artyom Tarasenko wrote: > udivx and sdvix don't modify condition flags, so they shall not > overwrite cpu_cc_* Looks good to me. Laurent > Signed-off-by: Artyom Tarasenko > --- >  target-sparc/translate.c |   32 ++-- >  1 files chang

  1   2   >