Re: [Qemu-devel] Re: POST failure (loop) with isapc and seabios

2009-11-26 Thread Gleb Natapov
On Thu, Nov 26, 2009 at 03:12:53AM -0500, Kevin O'Connor wrote: IMO, migrating to a new bios doesn't make sense - the bios is an application with state - one can't just replace the code. You don't migrate to a new BIOS. You migrate to a new QEMU that happens to have a new BIOS. And

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Gerd Hoffmann
Hi, Answering large requests with Illegal request, Invalid field in CDB doesn't makes linux try smaller requests, instead it reports I/O errors to the syslog. Hmm. Can't we just put residuals to good use here? Ie finish up the request up to the size we can handle, and return the original

Re: [Qemu-devel] Socket reconnection.

2009-11-26 Thread Gerd Hoffmann
Hi, Would a patch adding (optional) auto-reconnect (with a back-off delay) to the socket chardev be acceptable ? Sounds sensible to me. And, yes, it should be an option (defaulting to off to maintain current behavior when not specified). cheers, Gerd

[Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:21:46PM +0900, Isaku Yamahata wrote: On Wed, Nov 25, 2009 at 06:58:34PM +0200, Michael S. Tsirkin wrote: This patchset adds support for mandatory interupt status and interrupt disable bits to all PCI devices. This is required for PCI compliancy. These

[Qemu-devel] Re: [PATCH 4/4] pci: interrupt disable bit support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:04:51PM +0900, Isaku Yamahata wrote: On Wed, Nov 25, 2009 at 06:59:06PM +0200, Michael S. Tsirkin wrote: interrupt disable bit is mandatory in PCI spec, so we must implement it to be spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

Re: [Qemu-devel] [PATCH] debugcon: support for debugging consoles (e.g. Bochs port 0xe9)

2009-11-26 Thread Markus Armbruster
Gerd Hoffmann kra...@redhat.com writes: On 11/25/09 23:31, H. Peter Anvin wrote: On 11/25/2009 02:26 PM, H. Peter Anvin wrote: As such, I think there is still a place for the simple command line options like -hda, -serial and my proposed -debugcon, in addition to the full-featured

[Qemu-devel] Re: [PATCH] Makefile: Add missing rule for config-devices.mak

2009-11-26 Thread Stefan Weil
Juan Quintela schrieb: Stefan Weil w...@mail.berlios.de wrote: All files config-devices.mak are copies from files in directory default-configs. Creating these copies during configuration ignores these dependencies and may result in unresolved externals from incremental builds when files in

[Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:21:46PM +0900, Isaku Yamahata wrote: At least I think irq_disable can be removed The following patch on top of mine removes irq_disabled field in PCIDevice. I am of two minds whether this makes the code better. What is your opinion? diff --git a/hw/pci.c b/hw/pci.c

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Hannes Reinecke
Gerd Hoffmann wrote: Hi, Answering large requests with Illegal request, Invalid field in CDB doesn't makes linux try smaller requests, instead it reports I/O errors to the syslog. Hmm. Can't we just put residuals to good use here? Ie finish up the request up to the size we can handle,

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Gerd Hoffmann
On 11/26/09 11:57, Hannes Reinecke wrote: Then the guest would see a partial request and retry the remainder of the request, which (possibly after some iterations) would result in all data transferred, albeit at a lower speed. Except they don't. /me looks at drivers/scsi/sd.c:sd_done() I

Re: [Qemu-devel] [PATCH 0/6] Fix -kernel with SeaBIOS v2

2009-11-26 Thread Christoph Hellwig
On Wed, Nov 25, 2009 at 10:58:45AM +0100, Alexander Graf wrote: Ok I just tried to reproduce this using my netbook (32 bits only) and your kernel: Still seeing it using latests qemu.git. Any idea about other information that might help sorting it out? I'm running Linux 2.6.31 on the host,

Re: [Qemu-devel] [PATCH 0/6] Fix -kernel with SeaBIOS v2

2009-11-26 Thread Alexander Graf
Christoph Hellwig wrote: On Wed, Nov 25, 2009 at 10:58:45AM +0100, Alexander Graf wrote: Ok I just tried to reproduce this using my netbook (32 bits only) and your kernel: Still seeing it using latests qemu.git. Any idea about other information that might help sorting it out?

Re: [Qemu-devel] [PATCH 0/6] Fix -kernel with SeaBIOS v2

2009-11-26 Thread Christoph Hellwig
On Thu, Nov 26, 2009 at 01:00:25PM +0100, Alexander Graf wrote: Hm - are you using -L pc-bios? No. I use an installed qemu (./configure --prefix=/opt/qemu) and there's no pc-bios directorie in my kernel source tree where I start it from. Also, maybe there's something in dmesg telling you

[Qemu-devel] Re: [PATCH 4/4] pci: interrupt disable bit support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 11:53:16AM +0200, Michael S. Tsirkin wrote: On Thu, Nov 26, 2009 at 12:04:51PM +0900, Isaku Yamahata wrote: On Wed, Nov 25, 2009 at 06:59:06PM +0200, Michael S. Tsirkin wrote: interrupt disable bit is mandatory in PCI spec, so we must implement it to be spec

Re: [Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Paul Brook
No, this would slow us down because these are per-pin. We need a sum of interrupts so that config space can be updated by a single command. Interrupts are a fastpath, extra loops there should be avoided. It's really not that much of a fast path. Unless you're doing something particularly

Re: [Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:41:03PM +, Paul Brook wrote: No, this would slow us down because these are per-pin. We need a sum of interrupts so that config space can be updated by a single command. Interrupts are a fastpath, extra loops there should be avoided. It's really not that

[Qemu-devel] [PATCH v2] qcow2: Store exact backing format length

2009-11-26 Thread Kevin Wolf
Currently qcow2 unnecessarily rounds up the length of the backing format string to the next multiple of 8. At the same time, the array in BlockDriverState can only hold 15 characters, so in effect backing formats with 9 characters or more don't work (e.g. host_device). Save the real string length

[Qemu-devel] [PATCH] Fix for cdrom un-eject

2009-11-26 Thread Naphtali Sprei
When guest un-eject a cdrom, re-insert the cdrom image (re-open the drive's file). Also, related changes for the un-eject: o enter UNIT ATTENTION state only on change/insert media, not upon removal o minor change in packet command abort when in UNIT ATTENTION state (as per spec) o enter UNIT

[Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:38:20PM +0200, Michael S. Tsirkin wrote: On Thu, Nov 26, 2009 at 12:21:46PM +0900, Isaku Yamahata wrote: At least I think irq_disable can be removed The following patch on top of mine removes irq_disabled field in PCIDevice. I am of two minds whether this makes

[Qemu-devel] Re: [PATCH] Makefile: Add missing rule for config-devices.mak

2009-11-26 Thread Paolo Bonzini
What about overwriting it automatically when it was not modified by the user? This would only need a backup copy of the original default configuration. I assume that most users don't change config-devices.mak, so they would be happy with this solution. Calling make defconfig is only the second

[Qemu-devel] Re: [PATCH] debugcon: support for debugging consoles (e.g. Bochs port 0xe9)

2009-11-26 Thread Paolo Bonzini
On 11/25/2009 11:54 PM, Gerd Hoffmann wrote: Wouldn't be that hard I think. Cool. I had thought of a similar exercise to wet my feet with qdev/qemuopts, I may actually do it when I have some time... Paolo

Re: [Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Paul Brook
It's really not that much of a fast path. Unless you're doing something particularly obscure then even under heavy load you're unlikely to exceed a few kHz. I think with kvm, heavy disk stressing benchmark can get higher. I'd still expect this to be the least of your problems. If nothing

[Qemu-devel] [PATCH 00/11] S390x KVM support v4

2009-11-26 Thread Alexander Graf
While S390x was one of the first targets that were supported by KVM it always lacked qemu system emulation support. In order to change that sad fact, I figured I'd just take on the task myself, taking kuli (http://www.ibm.com/developerworks/linux/linux390/kuli.html), Documentation/s390/kvm.txt

[Qemu-devel] [PATCH 04/11] Add KVM support for S390x

2009-11-26 Thread Alexander Graf
S390x was one of the first platforms that received support for KVM back in the day. Unfortunately until now there hasn't been a qemu implementation that would enable users to actually run guests. So let's include support for KVM S390x in qemu! Signed-off-by: Alexander Graf ag...@suse.de ---

[Qemu-devel] [PATCH 11/11] Add S390 maintainer information

2009-11-26 Thread Alexander Graf
This patch adds information about who handles what when it comes to S390. I'll gladly support anything that's related to the device emulation model and S390 KVM parts. Since this patchset doesn't implement S390 CPU emulation, I left that part with a question mark. As soon as Uli's patchset gets

[Qemu-devel] [PATCH 01/11] S/390 CPU fake emulation

2009-11-26 Thread Alexander Graf
Because Qemu currently requires a TCG target to exist and there are quite some useful helpers here to lay the groundwork for out KVM target, let's create a stub TCG emulation target for S390X CPUs. This is required to make tcg happy. The emulation target itself won't work though. Signed-off-by:

[Qemu-devel] [PATCH 07/11] Add S390x virtio machine bus

2009-11-26 Thread Alexander Graf
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such

[Qemu-devel] [PATCH 06/11] Add support for S390x system emulation

2009-11-26 Thread Alexander Graf
Let's enable the basics for system emulation so we can run virtual machines with KVM! Signed-off-by: Alexander Graf ag...@suse.de --- target-s390x/cpu.h| 153 - target-s390x/exec.h |5 + target-s390x/helper.c |

[Qemu-devel] [PATCH 03/11] S/390 fake TCG implementation

2009-11-26 Thread Alexander Graf
Qemu won't let us run a KVM target without having host TCG support. Well, for now we don't have any so let's implement a fake target that only stubs out everything. I tried to keep the patch as close to Uli's source as possible, so whenever he feels like it he can easily diff his version against

[Qemu-devel] [PATCH 08/11] Add S390x virtio machine description

2009-11-26 Thread Alexander Graf
In order to use the new S390x virtio bus we just introduced, we also need a machine description that sets up the machine according to our PV specification. Let's add that machine description and be happy! Signed-off-by: Alexander Graf ag...@suse.de --- v4 - v5 - disable early console ---

[Qemu-devel] [PATCH 10/11] Set default console to virtio on S390x

2009-11-26 Thread Alexander Graf
All normal system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. I'm not particularly proud of this patch. It would be a lot better to

[Qemu-devel] [PATCH 05/11] Allocate physical memory in low virtual address space

2009-11-26 Thread Alexander Graf
KVM on S390x requires the virtual address space of the guest's RAM to be within the first 256GB. The general direction I'd like to see KVM on S390 move is that this requirement is losened, but for now that's what we're stuck with. So let's just hack up qemu_ram_alloc until KVM behaves nicely

[Qemu-devel] [PATCH 02/11] S/390 host/target build system support

2009-11-26 Thread Alexander Graf
This patch makes configure aware of S390 hosts and guests. When not explicitly defined using --target-list= no S390 targets will be built though. Signed-off-by: Alexander Graf ag...@suse.de --- configure | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] Re: [PATCH 4/4] pci: interrupt disable bit support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 12:04:51PM +0900, Isaku Yamahata wrote: On Wed, Nov 25, 2009 at 06:59:06PM +0200, Michael S. Tsirkin wrote: interrupt disable bit is mandatory in PCI spec, so we must implement it to be spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

Re: [Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
On Thu, Nov 26, 2009 at 01:21:39PM +, Paul Brook wrote: It's really not that much of a fast path. Unless you're doing something particularly obscure then even under heavy load you're unlikely to exceed a few kHz. I think with kvm, heavy disk stressing benchmark can get higher. I'd

[Qemu-devel] Re: Issues building seabios

2009-11-26 Thread Avi Kivity
On 11/21/2009 12:34 AM, Kevin O'Connor wrote: On Thu, Nov 19, 2009 at 04:02:06PM +0200, Avi Kivity wrote: On 11/19/2009 03:39 PM, Kevin O'Connor wrote: Long story short - this is the result of gcc's -combine being fragile. It's possible to avoid by compiling seabios with make

[Qemu-devel] Re: [PATCH 2/3 v5] Block live migration

2009-11-26 Thread Jan Kiszka
lir...@il.ibm.com wrote: +static int block_load(QEMUFile *f, void *opaque, int version_id) +{ +int len, flags; +char device_name[256]; +int64_t addr; +BlockDriverState *bs; +uint8_t *buf; + +block_mig_state-sectors_per_block = bdrv_get_sectors_per_chunk(); +

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Gerd Hoffmann
On 11/26/09 12:20, Hannes Reinecke wrote: Gerd Hoffmann wrote: /me looks at drivers/scsi/sd.c:sd_done() I can't see any sane way to tell linux that the request was too big. residuals is the key: drivers/scsi/scsi.c:scsi_finish_command() good_bytes = scsi_bufflen(cmd); if

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Hannes Reinecke
Gerd Hoffmann wrote: On 11/26/09 12:20, Hannes Reinecke wrote: Gerd Hoffmann wrote: /me looks at drivers/scsi/sd.c:sd_done() I can't see any sane way to tell linux that the request was too big. residuals is the key: drivers/scsi/scsi.c:scsi_finish_command() good_bytes =

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

2009-11-26 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 interface rewrite which needs more discussion and

[Qemu-devel] [PATCH 04/30] scsi: move SCSIRequest management to common code.

2009-11-26 Thread Gerd Hoffmann
Create generic functions to allocate, find and release SCSIRequest structs. Make scsi-disk and scsi-generic use them. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c | 31 +++ hw/scsi-disk.c| 27 ---

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

2009-11-26 Thread Gerd Hoffmann
Changes: * Move from open-coded lists to QTAILQ macros. * Move the struct elements to the common data structures (SCSIDevice + SCSIRequest). * Drop free request pools. * Fix request cleanup in the destroy callback. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c |

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

2009-11-26 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 kra...@redhat.com --- hw/scsi-disk.c| 109 ++---

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- 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 b0eceaf..6b5674b 100644 --- a/hw/scsi-disk.c +++

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-generic.c | 15 ++- hw/scsi.h |6 ++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index f63d83d..ac0b3ec 100644 --- a/hw/scsi-generic.c +++

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c | 10 ++ hw/scsi-disk.c |8 hw/scsi.h |9 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index e250e4f..666ca3c 100644 --- a/hw/scsi-bus.c

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c | 46 ++ hw/scsi-generic.c | 40 +--- hw/scsi.h |7 +++ 3 files changed, 54 insertions(+), 39 deletions(-) diff --git

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

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

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- 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 c18b7f0..0a8b8bb 100644 ---

[Qemu-devel] [PATCH 09/30] scsi: add request parsing helpers to common code.

2009-11-26 Thread Gerd Hoffmann
Add helper functions for scsi request parsing to common code. Getting command length, transfer size, and linear block address is handled. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c | 164 + hw/scsi-generic.c | 156

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

2009-11-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- 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

[Qemu-devel] [PATCH 17/30] scsi-disk: restruct emulation: REQUEST_SENSE

2009-11-26 Thread Gerd Hoffmann
Move REQUEST_SENSE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c | 38 +++--- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c

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

2009-11-26 Thread Gerd Hoffmann
Handy for debugging. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- 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 2e4fd38..e362671

[Qemu-devel] [PATCH 19/30] scsi-disk: restruct emulation: RESERVE+RELEASE

2009-11-26 Thread Gerd Hoffmann
Move RESERVE+RELEASE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c | 40 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/scsi-disk.c

[Qemu-devel] [PATCH 27/30] scsi-disk: restruct emulation: SERVICE_ACTION_IN

2009-11-26 Thread Gerd Hoffmann
Move SERVICE_ACTION_IN emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add SERVICE_ACTION_IN to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c |1 + hw/scsi-defs.h |1 + hw/scsi-disk.c | 67

[Qemu-devel] [PATCH 18/30] scsi-disk: restruct emulation: INQUIRY

2009-11-26 Thread Gerd Hoffmann
Move INQUIRY emulation from scsi_send_command() to scsi_disk_emulate_command(). Also split the longish INQUITY emulation code into the new scsi_disk_emulate_inquiry() function. Serial number handling is slightly changed, we don't copy it any more but look it up directly in DriveInfo which we

[Qemu-devel] [PATCH 21/30] scsi-disk: restruct emulation: START_STOP

2009-11-26 Thread Gerd Hoffmann
Move START_STOP emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 06289c3..11e85f2 100644

[Qemu-devel] [PATCH 29/30] scsi-disk: restruct emulation: VERIFY

2009-11-26 Thread Gerd Hoffmann
Move VERIFY emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 1507bcd..2910782 100644 ---

[Qemu-devel] [PATCH 26/30] scsi-disk: restruct emulation: GET_CONFIGURATION

2009-11-26 Thread Gerd Hoffmann
Move GET_CONFIGURATION emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add GET_CONFIGURATION to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c |1 + hw/scsi-defs.h |1 + hw/scsi-disk.c | 16

[Qemu-devel] [PATCH 30/30] scsi: add read/write 16 commands.

2009-11-26 Thread Gerd Hoffmann
Add READ_16 + friends to scsi-defs.h, scsi_command_name() and the request parsing helper functions. Use them in scsi-disk.c too. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c |8 hw/scsi-defs.h |3 +++ hw/scsi-disk.c |6 -- 3 files changed, 15

[Qemu-devel] [PATCH 16/30] scsi-disk: restruct emulation: core + TEST_UNIT_READY.

2009-11-26 Thread Gerd Hoffmann
Add new scsi_disk_emulate_command() function, which will -- when finished -- handle all scsi disk command emulation except actual I/O (READ+WRITE commands) which goes to the block layer. The function builds on top of the new SCSIRequest struct. SCSI command emulation code is moved over from

[Qemu-devel] [PATCH 22/30] scsi-disk: restruct emulation: ALLOW_MEDIUM_REMOVAL

2009-11-26 Thread Gerd Hoffmann
Move ALLOW_MEDIUM_REMOVAL emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 11e85f2..7d59998

[Qemu-devel] [PATCH 28/30] scsi-disk: restruct emulation: REPORT_LUNS

2009-11-26 Thread Gerd Hoffmann
Move REPORT_LUNS emulation from scsi_send_command() to scsi_disk_emulate_command(). Also add REPORT_LUNS to scsi-defs.h and scsi_command_name(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-bus.c |1 + hw/scsi-defs.h |1 + hw/scsi-disk.c | 16 3 files

[Qemu-devel] [PATCH 24/30] scsi-disk: restruct emulation: SYNCHRONIZE_CACHE

2009-11-26 Thread Gerd Hoffmann
Move SYNCHRONIZE_CACHE emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 4f56a22..865c5db

[Qemu-devel] [PATCH 23/30] scsi-disk: restruct emulation: READ_CAPACITY

2009-11-26 Thread Gerd Hoffmann
Move READ_CAPACITY emulation from scsi_send_command() to scsi_disk_emulate_command(). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c | 55 +++ 1 files changed, 27 insertions(+), 28 deletions(-) diff --git a/hw/scsi-disk.c

[Qemu-devel] [PATCH 25/30] scsi-disk: restruct emulation: READ_TOC

2009-11-26 Thread Gerd Hoffmann
Move READ_TOC emulation from scsi_send_command() to scsi_disk_emulate_command(). Add scsi_disk_emulate_read_toc() function which holds the longisch READ_TOC emulation code. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/scsi-disk.c | 80

[Qemu-devel] [PATCH 20/30] scsi-disk: restruct emulation: MODE_SENSE

2009-11-26 Thread Gerd Hoffmann
Move MODE_SENSE emulation from scsi_send_command() to scsi_disk_emulate_command(). Create two helper functions: mode_sense_page() which writes the actual mode pages and scsi_disk_emulate_mode_sense() which holds the longish MODE_SENSE emulation code, calling into mode_sense_page() as needed.

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Gerd Hoffmann
On 11/26/09 15:27, Hannes Reinecke wrote: Gerd Hoffmann wrote: sd_done() tries to figure how many sectors it actually got for serious errors. I don't feel signaling medium error for the first sector behind our limit just because we'd like to have smaller requests. scsi_end_request is being

[Qemu-devel] Re: SeaBIOS cdrom regression with Vista

2009-11-26 Thread Avi Kivity
On 11/21/2009 12:36 AM, Kevin O'Connor wrote: It looks like I spoke too soon. It appears the SeaBIOS init can leave the ATA controller in an interrupts disabled state. This appears to confuse Vista. So, this is a SeaBIOS bug - I'll implement a fix. I've committed a fix to SeaBIOS -

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-26 Thread Hannes Reinecke
Gerd Hoffmann wrote: On 11/26/09 15:27, Hannes Reinecke wrote: Gerd Hoffmann wrote: sd_done() tries to figure how many sectors it actually got for serious errors. I don't feel signaling medium error for the first sector behind our limit just because we'd like to have smaller requests.

[Qemu-devel] [PATCHv2 0/3] pci: interrupt status/interrupt disable support

2009-11-26 Thread Michael S. Tsirkin
This patchset adds support for mandatory interupt status and interrupt disable bits to all PCI devices. This is required for PCI compliancy. These patches are on top of my pci tree, including Isaku Yamahata's fixes. If this is a problem, let me know and I will rebase. This works fine for me,

[Qemu-devel] [PATCHv2 1/3] pci: prepare irq code for interrupt state

2009-11-26 Thread Michael S. Tsirkin
This rearranges code in preparation for interrupt state implementation. Changes: - split up but walk away from interrupt handling into a subroutine - change irq_state from an array to bitmask - verify that irq_state values are 0 or 1 on load There are no

[Qemu-devel] [PATCHv2 3/3] pci: interrupt disable bit support

2009-11-26 Thread Michael S. Tsirkin
Interrupt disable bit is mandatory in PCI spec. Implement it to make devices spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 29 +++-- hw/pci.h |1 + 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c

[Qemu-devel] Re: [PATCH 2/3 v5] Block live migration

2009-11-26 Thread Liran Schour
Jan Kiszka jan.kis...@siemens.com wrote on 26/11/2009 15:53:49: +qemu_get_buffer(f, buf, +BLOCK_SIZE); +if(bs != NULL) { + +bdrv_write(bs, (addr SECTOR_BITS), + buf,

[Qemu-devel] F10 build failure

2009-11-26 Thread Michael S. Tsirkin
Hi! qemu build on fedora 10 fails with: /root/scm/qemu/fpu/softfloat-native.c:132:5: error: HOST_LONG_BITS is not defined make[1]: *** [fpu/softfloat-native.o] Error 1 make: *** [subdir-x86_64-softmmu] Error 2 just sticking #define HOST_LONG_BITS 64 in fpu/softfloat-native.c helps, but what

[Qemu-devel] [PATCHv2 2/3] pci: interrupt status bit implementation

2009-11-26 Thread Michael S. Tsirkin
interrupt status is a mandatory feature in PCI spec, so devices must implement it to be spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 26 +- hw/pci.h |1 + 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/hw/pci.c

Re: [Qemu-devel] Re: POST failure (loop) with isapc and seabios

2009-11-26 Thread Kevin O'Connor
On Thu, Nov 26, 2009 at 10:19:57AM +0200, Gleb Natapov wrote: On Thu, Nov 26, 2009 at 03:12:53AM -0500, Kevin O'Connor wrote: IMO, the ram at 0xf needs to get migrated just like the rest of the ram. And it is! The old BIOS is running after migration. But on the first reset after

[Qemu-devel] Re: what's on qemu tree for pci related fixes

2009-11-26 Thread Michael S. Tsirkin
On Sun, Nov 22, 2009 at 09:40:52AM -0600, Anthony Liguori wrote: Michael S. Tsirkin wrote: Here's the list of patches on my pci fixes tree: git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git pci Here are the pci fixes I know of that haven't been applied already. They mostly fix up

[Qemu-devel] Re: [PATCH 2/3 v5] Block live migration

2009-11-26 Thread Jan Kiszka
Liran Schour wrote: Jan Kiszka jan.kis...@siemens.com wrote on 26/11/2009 15:53:49: +qemu_get_buffer(f, buf, +BLOCK_SIZE); +if(bs != NULL) { + +bdrv_write(bs, (addr SECTOR_BITS), + buf,

[Qemu-devel] Re: [PATCH 2/3 v5] Block live migration

2009-11-26 Thread Jan Kiszka
Jan Kiszka wrote: Liran Schour wrote: Jan Kiszka jan.kis...@siemens.com wrote on 26/11/2009 15:53:49: +qemu_get_buffer(f, buf, +BLOCK_SIZE); +if(bs != NULL) { + +bdrv_write(bs, (addr SECTOR_BITS), +

[Qemu-devel] [PATCH 1/7] Don't mess with halted state.

2009-11-26 Thread Glauber Costa
When we have irqchip in kernel, halted state is kernel business. So don't initialize it in our code. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic-kvm.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/apic-kvm.c b/hw/apic-kvm.c index 089fa45..e5a0bfc

[Qemu-devel] [PATCH 0/7] KVM SMP support, early version

2009-11-26 Thread Glauber Costa
Hi guys, This is an early version of smp support in kvm that kinda works. It has some known problems that I am still tracking. For example, it does not reset very well. Also, initialization is a bit slow, probably because of the number of remote ioctl calls involved. But I believe Jan's patch to

[Qemu-devel] [PATCH 2/7] store thread-specific env information

2009-11-26 Thread Glauber Costa
Since we'll have multiple cpu threads, at least for kvm, we need a way to store and retrieve the CPUState associated with the current execution thread. For the I/O thread, this will be NULL. I am using pthread functions for that, for portability, but we could as well use __thread keyword.

[Qemu-devel] [PATCH 3/7] update halted state on mp_state sync

2009-11-26 Thread Glauber Costa
If we are using in-kernel irqchip, halted state belongs in the kernel. So everytime we grab kernel's idea of mpstate, we also need to propagate halted state to userspace. Signed-off-by: Glauber Costa glom...@redhat.com --- target-i386/kvm.c |5 + 1 files changed, 5 insertions(+), 0

[Qemu-devel] [PATCH 4/7] qemu_flush_work for remote vcpu execution

2009-11-26 Thread Glauber Costa
This function is similar to qemu-kvm's on_vcpu mechanism. Totally synchronous, and guarantees that a given function will be executed at the specified vcpu. The approach I am taking is to put it under the hood, in kvm_vcpu_ioctl. This way, the kvm_vcpu_ioctl can be used anywhere, and we guarantee

[Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state

2009-11-26 Thread Glauber Costa
This fix a bug with -smp in kvm. Since we have updated apic_base, we also have to tell kernel about it. So instead of just updating mp_state, update every regs. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic-kvm.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH 7/7] remove smp restriction from kvm

2009-11-26 Thread Glauber Costa
We don't support smp without irqchip in kernel, so only abort in that situation Signed-off-by: Glauber Costa glom...@redhat.com --- kvm-all.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index dbd69f3..4134be3 100644 ---

[Qemu-devel] [PATCH 6/7] Don't call kvm cpu reset on initialization

2009-11-26 Thread Glauber Costa
All reset functions are called from the same place, and this was a leftover Signed-off-by: Glauber Costa glom...@redhat.com --- kvm-all.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 28f7ab7..dbd69f3 100644 --- a/kvm-all.c +++ b/kvm-all.c

Re: [Qemu-devel] Re: Live migration protocol, device features, ABIs and other beasts

2009-11-26 Thread Andrea Arcangeli
Very lengthy discussion, apologies if I repeat something in one of the various threads but I read lots of these discussions and I'm somewhat confused still of what this is all about... On Wed, Nov 25, 2009 at 04:09:55PM +0200, Michael S. Tsirkin wrote: We were discussing features that are

Re: [Qemu-devel] Re: [PATCH 2/3 v5] Block live migration

2009-11-26 Thread Pierre Riteau
On 26 nov. 2009, at 16:50, Liran Schour wrote: Jan Kiszka jan.kis...@siemens.com wrote on 26/11/2009 15:53:49: +qemu_get_buffer(f, buf, +BLOCK_SIZE); +if(bs != NULL) { + +bdrv_write(bs, (addr SECTOR_BITS), +

Re: [Qemu-devel] [PATCH 09/44] net: introduce qemu_new_net_client()

2009-11-26 Thread Mark McLoughlin
On Wed, 2009-11-25 at 20:36 +, Blue Swirl wrote: On Wed, Nov 25, 2009 at 6:49 PM, Mark McLoughlin mar...@redhat.com wrote: A replacement for qemu_new_vlan_client(), using NetClientInfo to replace most arguments. +VLANClientState *qemu_new_net_client(NetClientInfo *info, +

[Qemu-devel] [PATCH 0/6] block-migration: Various cleanups

2009-11-26 Thread Pierre Riteau
Hi, While reading the block migration code I couldn't resist cleaning it up. Among other things I replaced the lists by simple queues from NetBSD (it can probably be useful for other subsystems). block-migration.c | 486 ++--- block-migration.h |

[Qemu-devel] [PATCH 2/6] Import a simple queue implementation from NetBSD

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- qemu-queue.h | 109 +++-- 1 files changed, 105 insertions(+), 4 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index 8877efd..1d07745 100644 --- a/qemu-queue.h +++ b/qemu-queue.h

[Qemu-devel] [PATCH 6/6] Merge mig_save_device_bulk and mig_read_device_bulk

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- block-migration.c | 138 1 files changed, 43 insertions(+), 95 deletions(-) diff --git a/block-migration.c b/block-migration.c index e09db78..558890b 100644 --- a/block-migration.c +++

[Qemu-devel] [PATCH 5/6] Remove duplicated code

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- block-migration.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block-migration.c b/block-migration.c index aff4c20..e09db78 100644 --- a/block-migration.c +++ b/block-migration.c @@ -313,7 +313,8 @@ static

[Qemu-devel] [PATCH 4/6] Fix compilation with DEBUG_BLK_MIGRATION, and improve debug messages

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- block-migration.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/block-migration.c b/block-migration.c index 1626168..aff4c20 100644 --- a/block-migration.c +++ b/block-migration.c @@ -352,8 +352,9 @@

[Qemu-devel] [PATCH 3/6] Switch block migration lists to QSIMPLEQ

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- block-migration.c | 53 +++-- block-migration.h |2 +- 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/block-migration.c b/block-migration.c index 0cb162a..1626168 100644

[Qemu-devel] [PATCH 1/6] Fix coding style

2009-11-26 Thread Pierre Riteau
Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr --- block-migration.c | 366 ++--- block-migration.h |2 +- savevm.c | 41 +++--- 3 files changed, 200 insertions(+), 209 deletions(-) diff --git a/block-migration.c

[Qemu-devel] Re: [PATCHv2 1/3] pci: prepare irq code for interrupt state

2009-11-26 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: This rearranges code in preparation for interrupt state implementation. Changes: - split up but walk away from interrupt handling into a subroutine - change irq_state from an array to bitmask - verify that irq_state

[Qemu-devel] Re: F10 build failure

2009-11-26 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: Hi! qemu build on fedora 10 fails with: /root/scm/qemu/fpu/softfloat-native.c:132:5: error: HOST_LONG_BITS is not defined make[1]: *** [fpu/softfloat-native.o] Error 1 make: *** [subdir-x86_64-softmmu] Error 2 just sticking #define

  1   2   >