Re: [Qemu-devel] Re: [PATCH 10/16] scsi: Use 'SCSIRequest' directly

2010-11-19 Thread Gerd Hoffmann
On 11/18/10 17:33, Hannes Reinecke wrote: Not sure if it makes sense to split it up into several patches; we need the ->get_req()/->put_req() callbacks to get the request in the first place. Point. And only then can we modify the other callbacks. However, splitting them off into two patchsets

[Qemu-devel] Re: [PATCH 7/7] pci bridge: implement secondary bus reset

2010-11-19 Thread Isaku Yamahata
On Thu, Nov 18, 2010 at 10:46:25AM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 04:29:10PM +0900, Isaku Yamahata wrote: > > On Thu, Nov 18, 2010 at 09:05:30AM +0200, Michael S. Tsirkin wrote: > > > On Wed, Nov 17, 2010 at 01:50:27PM +0900, Isaku Yamahata wrote: > > > > Emulates second

[Qemu-devel] macaddr doesn't work

2010-11-19 Thread 郭沐錫
Dear all I use the QEMU with Debian. When I want to assign mac address to the QEMU. sudo qemu-system-arm -M versatilepb -monitor stdio -kernel vmlinuz-2.6.26-2-versatile -initrd initrd.img-2.6.26-2-versatile -hda test.img -append "root=/dev/sda1" -net nic,macaddr=52:54:00:12:34:57 -net tap Howe

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Stefan Hajnoczi
On Thu, Nov 18, 2010 at 11:24 PM, Alexander Graf wrote: > linux-uztg:~ # dd if=/dev/sdc of=/dev/null bs=10M count=300 iflag=direct That's a big block size. bs=8k is interesting too because we see the per-request overhead. Since IDE, SATA, and virtio have different hardware interfaces that the g

[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-19 Thread Gerd Hoffmann
+static void ahci_check_irq(AHCIState *s) MSI support would be nice to have. Alrighty, I added MSI support. But I only have a single vector in use atm as nvec> 0 doesn't get written to the PCI config space so the code trips on that later on. For multiple vectors MSI-X is the best choice as

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Kevin Wolf
Am 18.11.2010 19:43, schrieb Alexander Graf: > > On 18.11.2010, at 14:26, Kevin Wolf wrote: > >> Hi Alex, >> >> Am 18.11.2010 04:27, schrieb Alexander Graf: >>> This patch adds support for AHCI emulation. I have tested and verified it >>> works >>> in Linux, OpenBSD, Windows Vista and Windows 7

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

2010-11-19 Thread Jes Sorensen
On 11/18/10 15:47, Hannes Reinecke wrote: > This patch adds an emulation for the LSI Megaraid SAS HBA. > > Signed-off-by: Hannes Reinecke > --- > Makefile.objs |2 +- > hw/megasas.c | 1826 > + > hw/mfi.h | 1197 +

Re: [Qemu-devel] [RFC][PATCH v3 03/21] virtproxy: add debug functions for virtproxy core

2010-11-19 Thread Stefan Hajnoczi
On Thu, Nov 18, 2010 at 5:17 PM, Michael Roth wrote: > On 11/18/2010 05:43 AM, Stefan Hajnoczi wrote: >> >> On Thu, Nov 18, 2010 at 11:09 AM, Jes Sorensen >>  wrote: >>> >>> On 11/16/10 02:15, Michael Roth wrote: Signed-off-by: Michael Roth ---  virtproxy.c |   17 +

[Qemu-devel] [Bug 427612] Re: kvm sends caps lock key up event twice

2010-11-19 Thread Benjamin Drung
You mean "press caps lock" with "capslock turning on" and "release caps lock" with "capslock turning off"? ** Description changed: Binary package hint: qemu-kvm I have set the keyboard layout to German NEO 2 [1] in the host and the client (both current karmic). The caps lock is used as m

[Qemu-devel] Re: [PATCH 0/2] Re: [PATCH v9 5/8] pcie/aer: helper functions for pcie aer capability

2010-11-19 Thread Isaku Yamahata
On Wed, Nov 17, 2010 at 04:06:38PM +0200, Michael S. Tsirkin wrote: > Please, try to address the TODO: I think the case of > PCIE device behind a pci bridge is not covered properly. Right, pci-to-pcie bridge case isn't covered. Although SERR bit can be set, the error can't be propagated up further

[Qemu-devel] [Bug 676029] [NEW] Silently fail with wrong vde socket dir

2010-11-19 Thread Étienne BERSAC
Public bug reported: Hi, Using qemu 0.12.5, kvm silently fail with exit code 1 when using -net vde and a wrong path for sock. Actually, the sock option is mean to be the socket dir of the vde_switch, not the socket itself. With -net vde,sock=/var/run/vde/vde0/ctl , strace ends with the following

Re: [Qemu-devel] [PATCH 1/6] Make the necessary changes in Makefile and configure file.

2010-11-19 Thread Stefan Hajnoczi
The commit message "Make the necessary changes in Makefile and configure file" provides no information, especially outside the context of your patch series. Please choose something more specific about what the patch is doing. CONFIG_POSIX=y excludes mingw32. Does this commit break Windows builds

[Qemu-devel] [PATCH v2 4/6] qdev: introduce a helper function which triggers reset from a given device

2010-11-19 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata Signed-off-by: Anthony Liguori --- hw/qdev.c |5 + hw/qdev.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index b76da07..b65b63e 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -322,6 +322,11 @@ static int qbus_res

[Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree

2010-11-19 Thread Isaku Yamahata
From: Anthony Liguori This patch changes the reset handling so that qdev has no knowledge of the global system reset. Instead, a new bus/device level function is introduced that allows all devices/buses on the bus/device to be reset using a depth first transversal. N.B. we have to expose the im

[Qemu-devel] [PATCH v2 6/6] pci bridge: implement secondary bus reset

2010-11-19 Thread Isaku Yamahata
Emulates secondary bus reset when secondary bus reset bit is written from 0 to 1. Signed-off-by: Isaku Yamahata Signed-off-by: Anthony Liguori --- hw/pci_bridge.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c index 58cc2e4

[Qemu-devel] [PATCH v2 1/6] qbus: add functions to walk both devices and busses

2010-11-19 Thread Isaku Yamahata
From: Anthony Liguori There are some cases where you want to walk the busses, in particular, when searching for a bus either by name or DeviceInfo. Paolo suggested that we model the return values on how GCC's walkers work which allows an actor to skip child transversal, or terminate walking with

[Qemu-devel] [PATCH v2 0/6] qdev reset refactoring and pci bus reset

2010-11-19 Thread Isaku Yamahata
Here is v2. I updated the comments, and dropped the pci qdev reset patch. Patch description: The goal of this patch series is to implement secondary bus reset emulation in pci-to-pci bridge. At first, this patch series refactors qdev reset, and then cleans up pci bus reset. Lastly implements pci b

[Qemu-devel] [PATCH v2 5/6] pci: make use of qdev reset frame work to pci bus reset.

2010-11-19 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata Signed-off-by: Anthony Liguori --- hw/pci.c | 33 + hw/pci.h |3 +++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 962886e..51b7857 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -43,12 +43,1

[Qemu-devel] [PATCH v2 3/6] qdev: introduce reset call back for qbus level

2010-11-19 Thread Isaku Yamahata
and make it called via qbus_reset_all(). The qbus reset callback will be used by pci bus reset. Signed-off-by: Isaku Yamahata Signed-off-by: Anthony Liguori --- hw/qdev.c | 10 +- hw/qdev.h |2 ++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.

Re: [Qemu-devel] [PATCH 2/6] Move paio_cancel() to new infrastructure.

2010-11-19 Thread Stefan Hajnoczi
On Thu, Nov 18, 2010 at 6:06 PM, Arun R Bharadwaj wrote: > Move paio_cancel() to new infrastructure and introduce > the necessary APIs for this. > > Signed-off-by: Arun R Bharadwaj > --- >  posix-aio-compat.c |   92 > ++-- >  1 files changed, 74 in

[Qemu-devel] Re: [PATCH 08/10] ahci: add ahci emulation

2010-11-19 Thread Roedel, Joerg
On Fri, Nov 19, 2010 at 04:12:43AM -0500, Gerd Hoffmann wrote: > >>> +static void ahci_check_irq(AHCIState *s) > >> > >> MSI support would be nice to have. > > > > Alrighty, I added MSI support. But I only have a single vector in use > > atm as nvec> 0 doesn't get written to the PCI config space s

Re: [Qemu-devel] [PATCH 6/6] Add helper functions to enable virtio-9p make use of the threadlets

2010-11-19 Thread Stefan Hajnoczi
On Thu, Nov 18, 2010 at 6:07 PM, Arun R Bharadwaj wrote: > From: Gautham R Shenoy > > infrastructure for offloading blocking tasks such as making posix calls on > to the helper threads and handle the post_posix_operations() from the > context of the iothread. This frees the vcpu thread to process

Re: [Qemu-devel] Re: [PATCH 0/2] v8 Decouple block device removal from device removal

2010-11-19 Thread Luiz Capitulino
On Fri, 12 Nov 2010 18:38:57 +0100 Kevin Wolf wrote: > Am 12.11.2010 18:07, schrieb Ryan Harper: > > details, details, v8 > > > > This patch series decouples the detachment of a block device from the > > removal of the backing pci-device. Removal of a hotplugged pci device > > requires the gues

[Qemu-devel] Re: [PATCH 7/7] pci bridge: implement secondary bus reset

2010-11-19 Thread Michael S. Tsirkin
On Fri, Nov 19, 2010 at 05:15:19PM +0900, Isaku Yamahata wrote: > On Thu, Nov 18, 2010 at 10:46:25AM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 18, 2010 at 04:29:10PM +0900, Isaku Yamahata wrote: > > > On Thu, Nov 18, 2010 at 09:05:30AM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Nov 17,

Re: [Qemu-devel] Re: [PATCH 09/16] scsi-disk: Allocate iovec dynamically

2010-11-19 Thread Kevin Wolf
Am 18.11.2010 17:28, schrieb Hannes Reinecke: > On 11/18/2010 04:33 PM, Gerd Hoffmann wrote: >> Hi, >> >>> +static size_t scsi_req_iov_len(SCSIDiskReq *r) >>> +{ >>> +size_t iov_len = 0; >>> +int i; >>> + >>> +for (i = 0; i< r->iov_num; i++) >>> +iov_len += r->iov[i].iov_len;

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Gerd Hoffmann
Hi, As I would rather have something working we can base on in the tree, so whoever volunteers for the refactoring (hint!) knows how to design the interfaces, I am not sure how much is reasonable within this patch set. I guess I have to read this as: You want to drop the code into the reposi

[Qemu-devel] Re: [PATCH v2 6/6] pci bridge: implement secondary bus reset

2010-11-19 Thread Michael S. Tsirkin
On Fri, Nov 19, 2010 at 06:56:03PM +0900, Isaku Yamahata wrote: > Emulates secondary bus reset when secondary bus reset bit > is written from 0 to 1. > Interesting. This is not exactly what happens on real hardware though: there, RST# stays asserted until bit is cleared. So for example attempts t

[Qemu-devel] Re: [PATCH 0/2] Re: [PATCH v9 5/8] pcie/aer: helper functions for pcie aer capability

2010-11-19 Thread Michael S. Tsirkin
On Fri, Nov 19, 2010 at 06:42:27PM +0900, Isaku Yamahata wrote: > On Wed, Nov 17, 2010 at 04:06:38PM +0200, Michael S. Tsirkin wrote: > > Please, try to address the TODO: I think the case of > > PCIE device behind a pci bridge is not covered properly. > > Right, pci-to-pcie bridge case isn't cover

[Qemu-devel] Re: [PATCH 7/7] pci bridge: implement secondary bus reset

2010-11-19 Thread Michael S. Tsirkin
On Fri, Nov 19, 2010 at 05:15:19PM +0900, Isaku Yamahata wrote: > On Thu, Nov 18, 2010 at 10:46:25AM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 18, 2010 at 04:29:10PM +0900, Isaku Yamahata wrote: > > > On Thu, Nov 18, 2010 at 09:05:30AM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Nov 17,

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Kevin Wolf
Am 19.11.2010 12:56, schrieb Gerd Hoffmann: >Hi, > >>> As I would rather have something working we can base on in the >>> tree, so whoever volunteers for the refactoring (hint!) knows how >>> to design the interfaces, I am not sure how much is reasonable >>> within this patch set. >> >> I gues

Re: [Qemu-devel] Re: [PATCH 09/16] scsi-disk: Allocate iovec dynamically

2010-11-19 Thread Hannes Reinecke
On 11/19/2010 12:43 PM, Kevin Wolf wrote: > Am 18.11.2010 17:28, schrieb Hannes Reinecke: >> On 11/18/2010 04:33 PM, Gerd Hoffmann wrote: >>> Hi, >>> +static size_t scsi_req_iov_len(SCSIDiskReq *r) +{ +size_t iov_len = 0; +int i; + +for (i = 0; i< r->iov

Re: [Qemu-devel] Re: [PATCH 09/16] scsi-disk: Allocate iovec dynamically

2010-11-19 Thread Kevin Wolf
Am 19.11.2010 13:30, schrieb Hannes Reinecke: > On 11/19/2010 12:43 PM, Kevin Wolf wrote: >> Am 18.11.2010 17:28, schrieb Hannes Reinecke: >>> On 11/18/2010 04:33 PM, Gerd Hoffmann wrote: Hi, > +static size_t scsi_req_iov_len(SCSIDiskReq *r) > +{ > +size_t iov_len = 0; >

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Alexander Graf
On 19.11.2010, at 10:15, Kevin Wolf wrote: > Am 18.11.2010 19:43, schrieb Alexander Graf: >> >> On 18.11.2010, at 14:26, Kevin Wolf wrote: >> >>> Hi Alex, >>> >>> Am 18.11.2010 04:27, schrieb Alexander Graf: This patch adds support for AHCI emulation. I have tested and verified it

Re: [Qemu-devel] Re: [PATCH 0/2] v8 Decouple block device removal from device removal

2010-11-19 Thread Luiz Capitulino
On Tue, 16 Nov 2010 15:01:12 +0100 Kevin Wolf wrote: > Am 16.11.2010 14:51, schrieb Luiz Capitulino: > > On Fri, 12 Nov 2010 18:38:57 +0100 > > Kevin Wolf wrote: > > > >> Am 12.11.2010 18:07, schrieb Ryan Harper: > >>> details, details, v8 > >>> > >>> This patch series decouples the detachment

[Qemu-devel] [PATCH] target-sparc: remove unused functions cpu_lock(), cpu_unlock()

2010-11-19 Thread Peter Maydell
--- target-sparc/cpu.h|2 -- target-sparc/helper.c | 14 -- 2 files changed, 0 insertions(+), 16 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 7e0d17c..3e93bbb 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -444,8 +444,6 @@ CPUSPARCStat

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Kevin Wolf
Am 19.11.2010 14:08, schrieb Alexander Graf: > > On 19.11.2010, at 10:15, Kevin Wolf wrote: > >> Am 18.11.2010 19:43, schrieb Alexander Graf: Then I believe that core.c is now a mixture of some generic ATA code (that is also used by SATA) and the Legacy IDE code. SATA doesn't seem

[Qemu-devel] [Bug 427612] Re: kvm sends caps lock key up event twice

2010-11-19 Thread Serge Hallyn
Sorry, Benjamin, I cut-pasted the wrong bit. When capslock is mapped to control on the host, then I get: key press: sdl_process_key({type=0x2,which=0x0,state=0x1,keysym={scancode=0x42,sym=0x132,mod=0x0,unicode=0x0}}) keycode = 0x3a kbd_put_keycode(0x3a) kbd_put_keycode(0xba) key up: sdl_proce

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

2010-11-19 Thread Markus Armbruster
Jes Sorensen writes: > On 11/18/10 15:47, Hannes Reinecke wrote: >> This patch adds an emulation for the LSI Megaraid SAS HBA. >> >> Signed-off-by: Hannes Reinecke >> --- >> Makefile.objs |2 +- >> hw/megasas.c | 1826 >> + >> hw/mf

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

2010-11-19 Thread Hannes Reinecke
On 11/19/2010 03:06 PM, Markus Armbruster wrote: > Jes Sorensen writes: > >> On 11/18/10 15:47, Hannes Reinecke wrote: >>> This patch adds an emulation for the LSI Megaraid SAS HBA. >>> >>> Signed-off-by: Hannes Reinecke >>> --- >>> Makefile.objs |2 +- >>> hw/megasas.c | 1826 >>> +++

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

2010-11-19 Thread Jes Sorensen
On 11/19/10 15:06, Markus Armbruster wrote: >> Only comment, as you are adding another SCSI driver, maybe it's time to >> make the driver selection configurable, rather than hard coding the build? > > What do you mean by that? > > We hardcode lsi53c895a in two places where we really mean "default

Re: [Qemu-devel] [PATCH 00/10] AHCI emulation support v2

2010-11-19 Thread Gerd Hoffmann
Hi, Also to catch up on Gerd's point - whatever refactoring we do, we will basically have to break migration. There is no way we can change all the internal state and structure and maintain binary compatibility with the old save states. On the other hand it would be a *real* pity to drag the

[Qemu-devel] [PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()

2010-11-19 Thread Peter Maydell
--- target-arm/cpu.h |2 -- target-arm/op_helper.c | 14 -- 2 files changed, 0 insertions(+), 16 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index b87c605..0284bad 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -227,8 +227,6 @@ int cpu_arm_handle

[Qemu-devel] [PATCH] ARM: enable XScale/iWMMXT in linux-user mode

2010-11-19 Thread Peter Maydell
In linux-user mode, the XScale/iWMMXT coprocessors must be enabled at reset so that we can run code that uses these instructions. Signed-off-by: Peter Maydell --- target-arm/helper.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/he

Re: [Qemu-devel] [PATCH] ARM: enable XScale/iWMMXT in linux-user mode

2010-11-19 Thread Peter Maydell
On 19 November 2010 15:36, Peter Maydell wrote: > In linux-user mode, the XScale/iWMMXT coprocessors must be enabled > at reset so that we can run code that uses these instructions. > > Signed-off-by: Peter Maydell This patch fixes the same issue as this patch submitted by Lars Munch back in May

[Qemu-devel] [PATCH]target-arm: fix semihosting commandline handling

2010-11-19 Thread Schildbach, Wolfgang
The ARM semihosting commandline handling does not work -- please see details in bug report 673613, https://bugs.launchpad.net/qemu/+bug/673613 . The following patch, suggested by Peter Maydell, fixes the problem. I have tested the patch on the latest development tree, on which it works (after one

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

2010-11-19 Thread Alexander Graf
On 19.11.2010, at 15:31, Jes Sorensen wrote: > On 11/19/10 15:06, Markus Armbruster wrote: >>> Only comment, as you are adding another SCSI driver, maybe it's time to >>> make the driver selection configurable, rather than hard coding the build? >> >> What do you mean by that? >> >> We hardcode

[Qemu-devel] [PATCH 1/1] NBD isn't used by qemu-img, so don't link qemu-img against NBD objects

2010-11-19 Thread Jes . Sorensen
From: Jes Sorensen Signed-off-by: Jes Sorensen --- Makefile |2 +- Makefile.objs | 12 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 747e47c..a503c1c 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ qemu-img.o qemu-tool

RE: [Qemu-devel] [PATCH]target-arm: fix semihosting commandline handling

2010-11-19 Thread Schildbach, Wolfgang
Oops. Being new to git, I now realize this patch is not what I have in my source tree. Please disregard the previous post, I will re-post with the proper patch. Sorry for the noise... - Wolfgang Schildbach From: qemu-devel-bounces+wschi=dolby@nongnu.org

Re: [Qemu-devel] Re: [PATCH] PCI: Bus number from the bridge, not the device

2010-11-19 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Tue, Nov 09, 2010 at 11:41:43AM +0900, Isaku Yamahata wrote: >> On Mon, Nov 08, 2010 at 06:26:33PM +0200, Michael S. Tsirkin wrote: >> > Replace bus number with slot numbers of parent bridges up to the root. >> > This works for root bridge in a compatible way bec

[Qemu-devel] Re: [PATCH v9 3/8] pci: clean up of pci status register

2010-11-19 Thread Michael S. Tsirkin
On Tue, Nov 16, 2010 at 05:26:07PM +0900, Isaku Yamahata wrote: > This patch refine the initialization/reset of > pci status registers. > > Signed-off-by: Isaku Yamahata This one seems good. Applied with some tweaks: I cut down the comment: we don't really need to repeat what code does IMO, rath

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

2010-11-19 Thread Jes Sorensen
On 11/19/10 17:36, Alexander Graf wrote: > > On 19.11.2010, at 15:31, Jes Sorensen wrote: >> What I mean is for most other device types we allow to specify a list of >> wanted devices at the configure line, which is what I am suggesting we >> added support for for SCSI as well. > > Oh, you mean s

[Qemu-devel] [Bug 668799] Re: qemu-arm segfaults executing msgmerge (gettext)

2010-11-19 Thread Peter Maydell
The following patch stops the segfault (which happens because cpu_unlink_tb() is fiddling with the links between tbs without taking the tb_lock, so another thread can come in via eg tb_add_jump() and cause corruption of the linked lists). However, there are a number of comments in the TB handling c

Re: [Qemu-devel] [PATCH 10/16] scsi: Use 'SCSIRequest' directly

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:28PM +0100, Hannes Reinecke wrote: > > Rather than to access a SCSIRequest via an abstract 'tag' we can > as well use it directly and save us the lookup. The get_put/buf methods are a bit misnamed. get/put generally implies refcounting while they are simple alloc/fr

Re: [Qemu-devel] [PATCH 02/16] scsi: Increase the number of possible devices

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:46:25PM +0100, Hannes Reinecke wrote: > > The SCSI parallel interface has a limite of 8 devices, but > not the SCSI stack in general. So we should be removing the > hard-coded limit and use MAX_SCSI_DEVS instead. > And we only need to scan those devices which are allocat

Re: [Qemu-devel] [PATCH 01/16] Allow zero alloc_hint in qemu_sglist_init()

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:44:34PM +0100, Hannes Reinecke wrote: > > qemu_malloc doesn't check for zero argument, so we need to > check ourselves. I'm not sure if it's a that good idea to remove the implicit ->sg != NULL assumption. Any reason you can't simply call qemu_sglist_init later?

[Qemu-devel] [PATCH] pci: Replace unneeded type casts in calls of pci_register_bar

2010-11-19 Thread Stefan Weil
There is no need for these type casts (as other existing code shows). So re-write the first argument without type cast (and remove a related TODO comment). Cc: Michael S. Tsirkin Signed-off-by: Stefan Weil --- hw/cirrus_vga.c |4 ++-- hw/e1000.c |4 ++-- hw/ide/via.c|2 +-

Re: [Qemu-devel] [PATCH 03/16] scsi: Return SAM status codes

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:46:32PM +0100, Hannes Reinecke wrote: > > The SCSI emulation is supposed to return status codes as defined > by SAM, not the linux ones which are shifted by one. When just looking at the patch the description is rather confusing as all places touched were already return

Re: [Qemu-devel] [PATCH 04/16] scsi: INQUIRY VPD fixes

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:00PM +0100, Hannes Reinecke wrote: > > We should announce and support the block device characterics page > only on block devices, not on CDROMs. And the VPD page 0x83 has > an off-by-one error. Looks good. This code would be a lot cleaner by splitting all vpd emulat

Re: [Qemu-devel] [PATCH 05/16] scsi: Move sense handling into the driver

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:04PM +0100, Hannes Reinecke wrote: > > The current sense handling in scsi-bus is only used by the > scsi-disk driver; the scsi-generic driver is using its own. > So we should move the current sense handling into the > scsi-disk driver. Looks good.

Re: [Qemu-devel] [PATCH 06/16] scsi-disk: Remove duplicate cdb parsing

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:09PM +0100, Hannes Reinecke wrote: > > We parse the CDB twice, which is completely unnecessary. > > Signed-off-by: Hannes Reinecke Looks good, Reviewed-by: Christoph Hellwig

Re: [Qemu-devel] [PATCH 07/16] scsi: Update sense code handling

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:14PM +0100, Hannes Reinecke wrote: > > The SCSI spec has a quite detailed list of sense codes available. > It even mandates the use of specific ones for some failure cases. > The current implementation just has one type of 'generic' error > which is actually a violati

Re: [Qemu-devel] [PATCH 12/16] scsi-generic: use plain ioctl

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:36PM +0100, Hannes Reinecke wrote: > > aio_ioctl is emulated anyway and currently broken. What's broken about it currently? > So better use 'normal' ioctl here as there are no benefits > on using the emulated async I/O call. There are huge benefits. Without it the

RE: [Qemu-devel] [PATCH]target-arm: fix semihosting commandline handling

2010-11-19 Thread Schildbach, Wolfgang
Please disregard my earlier patch. Due to my not being familiar with git, I posted a wrong version of my code. I'll follow up with a new version later. (My previous post seems to not have made it to the list. My apologies if you receive this twice.) - Wolfgang Schildbach

Re: [Qemu-devel] Re: [PATCH v2 0/4] use new vgabios.

2010-11-19 Thread Anthony Liguori
On 11/01/2010 11:03 AM, Gerd Hoffmann wrote: On 10/15/10 12:02, Gerd Hoffmann wrote: This patch series will put the new vgabios into use for stdvga and vmware_vga. The vgabios patches have been posted a while ago, they are also also available from git://anongit.freedesktop.org/~kraxel/vgabio

Re: [Qemu-devel] Re: [PATCH] PCI: Bus number from the bridge, not the device

2010-11-19 Thread Gleb Natapov
On Fri, Nov 19, 2010 at 06:02:58PM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Tue, Nov 09, 2010 at 11:41:43AM +0900, Isaku Yamahata wrote: > >> On Mon, Nov 08, 2010 at 06:26:33PM +0200, Michael S. Tsirkin wrote: > >> > Replace bus number with slot numbers of parent br

[Qemu-devel] [PATCH] ahci: fix lst+fis mapping

2010-11-19 Thread Gerd Hoffmann
The ahci map_page() function checks whenever it got a full page mapped. This is wrong. The data structures are much smaller: command list is 1k and fis is 256 bytes. Checking whenever we can access that much bytes without crossing a page border is good enougth. Signed-off-by: Gerd Hoffmann --

[Qemu-devel] [PATCH v3 0/9] PCI capability and device assignment improvements

2010-11-19 Thread Alex Williamson
v3: - Rework to avoid introducing conflicts with qemu.git hw/pci - Drop capability lookup table - Add back minimal device assignment PM, EXP, X, VPD, VNDR capabilities This version should do a much better job at not introducing new differences between qemu-kvm.git and qemu.git hw/pci. The

[Qemu-devel] [PATCH v3 1/9] pci: pci_default_cap_write_config ignores wmask

2010-11-19 Thread Alex Williamson
Make use of wmask, just like the rest of config space. This duplicates code in pci_default_write_config, but we plan to get rid of this function anyway, so avoid the code churn. Signed-off-by: Alex Williamson --- hw/pci.c | 19 --- 1 files changed, 8 insertions(+), 11 deletio

[Qemu-devel] [PATCH v3 2/9] pci: Remove pci_enable_capability_support()

2010-11-19 Thread Alex Williamson
This interface doesn't make much sense, adding a capability can take care of everything, just provide a means to register capability read/write handlers. Device assignment does it's own thing, so requires a couple ugly hacks that will be cleaned by subsequent patches. Signed-off-by: Alex Williams

[Qemu-devel] [PATCH v3 3/9] device-assignment: Use PCI capabilities support

2010-11-19 Thread Alex Williamson
Convert to use common pci_add_capabilities() rather than creating our own mess. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 112 +++- 1 files changed, 63 insertions(+), 49 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-

[Qemu-devel] [PATCH v3 8/9] device-assignment: Make use of config_map

2010-11-19 Thread Alex Williamson
We can figure out the capability being touched much more quickly and efficiently with the config_map. Use it. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 32 +++- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/hw/device-assignment

[Qemu-devel] [PATCH v3 4/9] pci: Replace used bitmap with config byte map

2010-11-19 Thread Alex Williamson
Capabilities are allocated in bytes, so we can track both whether a byte is used and by what capability in the same structure. Remove pci_reserve_capability() as there are no users, remove pci_access_cap_config() since it's now a trivial lookup. Signed-off-by: Alex Williamson --- hw/device-ass

[Qemu-devel] [PATCH v3 6/9] device-assignment: Move PCI capabilities to match physical hardware

2010-11-19 Thread Alex Williamson
Now that common PCI code doesn't have a hangup on capabilities being contiguous, move assigned device capabilities to match their offset on physical hardware. This helps for drivers that assume a capability configuration and don't bother searching. We can also remove several calls to assigned_dev

[Qemu-devel] [PATCH v3 7/9] pci: Remove capability specific handlers

2010-11-19 Thread Alex Williamson
Drivers can break these out on their own if they need to. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 16 - hw/pci.c | 61 ++-- hw/pci.h | 19 --- 3 files changed, 13 insertions

[Qemu-devel] [PATCH v3 5/9] pci: Remove cap.length, cap.start, cap.supported

2010-11-19 Thread Alex Williamson
Capabilities aren't required to be contiguous, so cap.length never really made much sense. Likewise, cap.start is mostly meaningless too. Both of these are better served by the capability map. We can also get rid of cap.supported, since it's really now unused and redundant with flag in the statu

[Qemu-devel] [PATCH v3 9/9] device-assignment: pass through and stub more PCI caps

2010-11-19 Thread Alex Williamson
Some drivers depend on finding capabilities like power management, PCI express/X, vital product data, or vendor specific fields. Now that we have better capability support, we can pass more of these tables through to the guest. Note that VPD and VNDR are direct pass through capabilies, the rest a

[Qemu-devel] [Bug 661696] Re: incomplete emulation of fstenv under TCG

2010-11-19 Thread Chalkerx
Any news on this bug? -- incomplete emulation of fstenv under TCG https://bugs.launchpad.net/bugs/661696 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: Steps to reproduce: 1) Install Windows (trie

[Qemu-devel] [Bug 661696] Re: incomplete emulation of fstenv under TCG

2010-11-19 Thread Chalkerx
The full testcase: #include extern void *x; int main() { int a; asm volatile ("x: fldz\n\ push %%edx\n\ fnstenv -0xc(%%esp)\n\ pop %%edx\n" : "=d" (a) : : "memory"); printf ("%x %x\n", a, &x); return 0; } $ gcc -m32 test.c -o test $ ./test 80483ae 80483ae $ ./qemu/i386-linux

[Qemu-devel] Re: [PATCH v2] pc: disable the BOCHS BIOS panic port

2010-11-19 Thread Paolo Bonzini
On 11/16/2010 01:28 PM, Bernhard Kohl wrote: We have an OS which writes to port 0x400 when probing for special hardware. This causes an exit of the VM. With SeaBIOS this port isn't used anyway. Signed-off-by: Bernhard Kohl --- Changes v1 -> v2: Keep the ports silent. Don't print debug output if

Re: [Qemu-devel] [PATCH 12/16] scsi-generic: use plain ioctl

2010-11-19 Thread Nicholas A. Bellinger
On Fri, 2010-11-19 at 19:39 +0100, Christoph Hellwig wrote: > On Thu, Nov 18, 2010 at 03:47:36PM +0100, Hannes Reinecke wrote: > > > > aio_ioctl is emulated anyway and currently broken. > > What's broken about it currently? Mm, I do not recall this being broken in the first place..? There w

Re: [Qemu-devel] [PATCH 12/16] scsi-generic: use plain ioctl

2010-11-19 Thread adq
On 20 November 2010 00:41, Nicholas A. Bellinger wrote: > On Fri, 2010-11-19 at 19:39 +0100, Christoph Hellwig wrote: >> On Thu, Nov 18, 2010 at 03:47:36PM +0100, Hannes Reinecke wrote: >> > >> > aio_ioctl is emulated anyway and currently broken. >> >> What's broken about it currently? > > Mm,

[Qemu-devel] Has the 'clone' bug been fixed?

2010-11-19 Thread Jin Guojie
I just downloaded qemu-0.12.5, compiled as i386-linux-user, and tried to run a simple "fork" test. Qemu failed to emulate fork(), only left an "Invalid argument" message. I checked linux-user/system.c, and noticed the "~(CSIGNAL | CLONE_NPTL_FLAGS2))" flags. But, since I'm not very professional in

[Qemu-devel] [Bug 661696] Re: incomplete emulation of fstenv under TCG

2010-11-19 Thread Chalkerx
Example patch. Works only for FLDZ and only in -singlestep mode. Based on version 0.12.5. ** Patch added: "Patch. Works only for FLDZ and only in -singlestep mode . Based on 0.12.5." https://bugs.launchpad.net/qemu/+bug/661696/+attachment/1738944/+files/patch.diff -- incomplete emulation of

[Qemu-devel] [Bug 661696] Re: incomplete emulation of fstenv under TCG

2010-11-19 Thread Chalkerx
This was just an example of how it could be done. $ ./qemu-0.12.5/i386-linux-user/qemu-i386 -singlestep ./test 80483b4 80483b4 -- incomplete emulation of fstenv under TCG https://bugs.launchpad.net/bugs/661696 You received this bug notification because you are a member of qemu- devel-ml, which i

Re: [Qemu-devel] [PULL] vhost, netdev, e1000, pci

2010-11-19 Thread Anthony Liguori
On 11/16/2010 07:16 AM, Michael S. Tsirkin wrote: Here are some fixes I collected in my tree. Please merge. The following changes since commit 5fc9cfedfa09199e10b5f9b67dcd286bfeae4f7a: Fold send_all() wrapper unix_write() into one function (2010-11-03 12:48:09 -0500) Pulled. Thanks.