[Qemu-devel] [PATCH] usb-net: use qdev for -usbdevice

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb-net.c | 78 +++-- hw/usb.h |3 -- vl.c | 18 - 3 files changed, 48 insertions(+), 51 deletions(-) diff --git a/hw/usb-net.c b/hw/usb-net.c index 9c6549c..b2d01b6 100644 --

[Qemu-devel] Re: [PATCH] megasas: LSI MegaRAID SAS HBA emulation

2009-11-17 Thread Gerd Hoffmann
On 11/12/09 12:48, Hannes Reinecke wrote: This patch adds an emulation for the LSI MegaRAID SAS HBA. It is build on top of kraxel's scsi.v7 tree. This is just a rough implementation, many of the more advanced topics (like Windows booting :-) are missing. Signed-off-by: Hannes Reinecke Added,

[Qemu-devel] [PATCH 11/15] scsi: add xfer mode

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 46 ++ hw/scsi-generic.c | 40 ++-- hw/scsi.h |7 +++ 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-

[Qemu-devel] [PATCH 13/15] scsi: move dinfo to SCSIDevice

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c| 63 ++--- hw/scsi-generic.c | 23 +-- hw/scsi.h |1 + 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index c0c407

[Qemu-devel] [PATCH 07/15] scsi: add scsi-defs.h

2009-11-17 Thread Gerd Hoffmann
Largely based on from linux. Added into the tree so we can use the defines everywhere, not just in scsi-generic.c (which is linux-specific). Signed-off-by: Gerd Hoffmann --- hw/scsi-defs.h| 156 + hw/scsi-disk.c| 41 ++

[Qemu-devel] [PATCH 15/15] scsi: add scsi_req_print()

2009-11-17 Thread Gerd Hoffmann
Handy for debugging. Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 114 + hw/scsi.h |1 + 2 files changed, 115 insertions(+), 0 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index edfe099..50fc03a 100644 --- a/hw/scsi

[Qemu-devel] [PATCH 14/15] scsi: move status to SCSIRequest.

2009-11-17 Thread Gerd Hoffmann
Also add and use the scsi_req_complete() helper function for calling the completion callback. Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c |9 + hw/scsi-disk.c| 13 - hw/scsi-generic.c | 18 -- hw/scsi.h |2 ++ 4 files changed, 27

[Qemu-devel] [PATCH 10/15] scsi: use command defines in scsi-disk.c

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c | 40 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 25f8eaa..2068187 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -398,16 +398,16 @@ static i

[Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 164 + hw/scsi-generic.c | 156 -- hw/scsi.h |3 + 3 files changed, 191 insertions(+), 132 deletions(-) diff --git a/hw/scsi-bus

[Qemu-devel] [PATCH 12/15] scsi: move sense to SCSIDevice, create SCSISense struct.

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 10 ++ hw/scsi-disk.c |8 hw/scsi.h |8 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 77409de..493e220 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @

[Qemu-devel] [PATCH 05/15] scsi: move scsi command from SCSIGenericReq to SCSIRequest.

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c |1 + hw/scsi-generic.c | 17 ++--- hw/scsi.h |6 ++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index c74d085..73cfe58 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi

[Qemu-devel] [PATCH 08/15] scsi: move type from SCSIGenericState to SCSIDevice

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c|1 + hw/scsi-generic.c | 13 ++--- hw/scsi.h |1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index a01a786..25f8eaa 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c

[Qemu-devel] [PATCH 02/15] scsi: create common SCSIRequest structure.

2009-11-17 Thread Gerd Hoffmann
Rename the SCSIRequest structs in scsi-disk.c and scsi-generic.c to SCSIDiskReq and SCSIGenericReq. Create a SCSIRequest struct and move the common elements over. Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c| 109 ++--- hw/scsi-generic.c |

[Qemu-devel] [PATCH 06/15] scsi: move blocksize from SCSIGenericState to SCSIDevice

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c|1 + hw/scsi-generic.c | 23 +++ hw/scsi.h |1 + 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index bb2d68c..00d2944 100644 --- a/hw/scsi-disk.c +++ b/hw/

[Qemu-devel] [PATCH 03/15] scsi: move request lists to QTAILQ.

2009-11-17 Thread Gerd Hoffmann
Changes: * Move from open-coded lists to QTAILQ macros. * Move the struct elements to the common data structures (SCSIDevice + SCSIRequest). * Fix request cleanup in the destroy callback. Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c |1 + hw/scsi-disk.c| 58

[Qemu-devel] [PATCH 01/15] scsi: add/fix header protection.

2009-11-17 Thread Gerd Hoffmann
Also delete the leftover and unused scsi-disk.h file. Signed-off-by: Gerd Hoffmann --- hw/esp.h |5 hw/scsi-disk.h | 67 hw/scsi.h |4 +- 3 files changed, 7 insertions(+), 69 deletions(-) delete mode 100644 hw/sc

[Qemu-devel] [PATCH 04/15] scsi: add scsi_req_init()

2009-11-17 Thread Gerd Hoffmann
Helper function to init SCSIRequest, so scsi-disk and scsi-generic don't duplicate init code for the common bits. Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c |9 + hw/scsi-disk.c|9 +++-- hw/scsi-generic.c |9 +++-- hw/scsi.h |3 +++ 4 files cha

[Qemu-devel] [PATCH 00/15] scsi: data structures and cleanups.

2009-11-17 Thread Gerd Hoffmann
Hi, First batch of scsi patches. They bring some data structure unification and a bunch of fixes and cleanups. In preparation for the other scsi patches, but also useful on its own IMHO, so I'm hoping for a quick and painless merge. The major rewrite which needs more discussion and regression

Re: [Qemu-devel] [PATCH 2/2] [RFC] add emulation of at91sam9263 cpu

2009-11-17 Thread Filip Navara
I'd say it is preferable to split the individual devices and model them using the QDEV infrastructure instead of putting it all together into one "system controller" device. I've QDEV-based implementation of these devices already: PMC, DBGU, PIO, PITC, AIC. That leaves the "bus matrix", SDRAM cont

[Qemu-devel] [PATCH 6/9] default devices: vga

2009-11-17 Thread Gerd Hoffmann
Switch over vga to the new default device system. Disable default vga for both '-vga' and '-device VGA|Cirrus VGA|QEMUware SVGA)' cases. '-device VGA' still doesn't work though due to a initialization order issue (vga must init before calling i440fx_init_memory_mappings). Signed-off-by: Gerd Ho

[Qemu-devel] [PATCH 9/9] default devices: global switch.

2009-11-17 Thread Gerd Hoffmann
Add global switch to turn off all default devices. Signed-off-by: Gerd Hoffmann --- qemu-options.hx |5 + vl.c|8 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index b65fd74..70929fa 100644 --- a/qemu-options.hx

[Qemu-devel] [PATCH 5/9] zap serial_monitor_mux

2009-11-17 Thread Gerd Hoffmann
The logic in this code obviously predates the multiple monitor capability of qemu and looks increasingly silly these days. I think the intention of this piece of code is to get a reasonable default for the -nographic case: have monitor and serial line muxed on stdio. Doing just that is alot easie

[Qemu-devel] [PATCH 7/9] default devices: net

2009-11-17 Thread Gerd Hoffmann
Switch over network to the new defaults system. Signed-off-by: Gerd Hoffmann --- net.c |5 - net.h |1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index 9ea66e3..9375351 100644 --- a/net.c +++ b/net.c @@ -112,6 +112,8 @@ static QTAILQ_HEAD(, VLANSt

[Qemu-devel] [PATCH 8/9] default devices: drives

2009-11-17 Thread Gerd Hoffmann
Add defaults variable for drives. Signed-off-by: Gerd Hoffmann --- vl.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index 23afcc9..eb07a5b 100644 --- a/vl.c +++ b/vl.c @@ -275,6 +275,7 @@ static int default_serial = 1; static int default_pa

[Qemu-devel] [PATCH 4/9] default devices: monitor

2009-11-17 Thread Gerd Hoffmann
Switch over monitor to the new defaults system. Signed-off-by: Gerd Hoffmann --- vl.c | 90 + 1 files changed, 46 insertions(+), 44 deletions(-) diff --git a/vl.c b/vl.c index 739c3a7..4edc4a3 100644 --- a/vl.c +++ b/vl.c @@ -210

[Qemu-devel] [PATCH 1/9] chardev: add greeting

2009-11-17 Thread Gerd Hoffmann
Add a greeting string to CharDriverState which is printed after initialization. Used to have the qemu vc consoles labeled. This way we can avoid walking all the chardevs a second time after initialization just to print the greeting. Signed-off-by: Gerd Hoffmann --- qemu-char.c |2 ++ qemu-

[Qemu-devel] [PATCH 3/9] default devices: parallel port

2009-11-17 Thread Gerd Hoffmann
Switch over parallel ports to the new default device system. Disable default parallel port for both '-parallel' and '-device isa-parallel' cases. Signed-off-by: Gerd Hoffmann --- vl.c | 68 +- 1 files changed, 34 insertions(+), 3

[Qemu-devel] [PATCH 0/9] fixup default device handling.

2009-11-17 Thread Gerd Hoffmann
Hi, qemu silently creates default devices for you if you didn't specify one on the command line, i.e. you'll get a vga, a serial port, a nic, ... created by default. Right now this doesn't integrate with qdev at all, i.e. if you try to add -- for example -- a serial line the new qdev way using

[Qemu-devel] [PATCH 2/9] default devices: core code & serial lines.

2009-11-17 Thread Gerd Hoffmann
Qemu creates a default serial line for you in case you didn't specify one on the command line. Right now this is tied to the '-serial ' command line switch, which in turn causes trouble if you are creating your serial line via '-device isa-serial,'. This patch adds a variable default_serial which

Re: [Qemu-devel] [PATCH 1/2] [RFC] add emulation of atmel pflash memory

2009-11-17 Thread Filip Navara
Interesting, I have been working on AT91SAM7X implementation. Most of the stuff is in the GIT repository at http://repo.or.cz/w/qemu/navara.git Any way to merge the efforts? I'd love to merge both mine and your patches to the mainline (minus the overlapping parts of the system controller). In fact

Re: [Qemu-devel] virtio-rng

2009-11-17 Thread Amit Shah
On (Mon) Nov 16 2009 [17:58:22], Ian Molton wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Gerd Hoffmann wrote: > > > Maybe ... > > > >-chardev socket,id=egd,host=egd.domain.tld,port=whatever > >-device virtio-rng,chardev=egd > > I've had a go at modifying virtio-console.c

Re: [Qemu-devel] virtio-rng

2009-11-17 Thread Ian Molton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamie Lokier wrote: > Ian Molton wrote: > > With VMs, in some circumstances it might be preferable to trust the > host when it says it's providing already-tested entropy. After all > the host has total control over the guest anyway, and the host entro

Re: [Qemu-devel] [PATCH] Don't leak file descriptors

2009-11-17 Thread Kevin Wolf
Am 17.11.2009 00:05, schrieb Jamie Lokier: > Blue Swirl wrote: >> On Mon, Nov 16, 2009 at 2:47 PM, Kevin Wolf wrote: >>> Am 13.11.2009 22:05, schrieb Blue Swirl: On Fri, Nov 13, 2009 at 5:17 PM, Kevin Wolf wrote: > We're leaking file descriptors to child processes. Set FD_CLOEXEC on file

Re: [Qemu-devel] [PATCH] Don't leak file descriptors

2009-11-17 Thread Kevin Wolf
Am 17.11.2009 00:26, schrieb Anthony Liguori: > Kevin Wolf wrote: >> We're leaking file descriptors to child processes. Set FD_CLOEXEC on file >> descriptors that don't need to be passed to children to stop this >> misbehaviour. >> >> Signed-off-by: Kevin Wolf >> > > pid = fork(); > i

<    1   2