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

2010-11-18 Thread Serge Hallyn
Quoting Benjamin Drung (benjamin.dr...@gmail.com): > I am reopening the bug again, because I am the original bug reporter and Haha - then of course it's appropriate :) Though the description might then not be right. > this bug depends on the keyboard layout. -serge -- kvm sends caps lock key

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

2010-11-18 Thread Serge Hallyn
Quoting Benjamin Drung (benjamin.dr...@gmail.com): > libsdl1.2 does not send an key up event for the host caps lock key, but > does send the key up event if the physical caps lock key is mapped to > another key (like NEO2 does). Right, and when I have capslock mapped to control as I usually do, th

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

2010-11-18 Thread Alexander Graf
This patch adds an emulation layer for an ICH-7M AHCI controller. For now this controller does not do IDE legacy emulation. It is a pure AHCI controller. Signed-off-by: Alexander Graf --- v1 -> v2: - rename IDEExtender to IDEBusOps and make a pointer (kraxel) - make dma hooks explicit by p

[Qemu-devel] [PATCH 07/11] pci: add ich7 pci id

2010-11-18 Thread Alexander Graf
We need a PCI ID for our new AHCI adapter. I just picked an ICH-7M because that's the one built into the first Macbooks. This patch adds a PCI ID define for an ICH-7M AHCI adapter. Signed-off-by: Alexander Graf --- hw/pci.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 02/11] ide: fix whitespace gap in ide_exec_cmd

2010-11-18 Thread Alexander Graf
Now that we have the function split out, we have to reindent it. In order to increase the readability of the actual functional change, this is split out. Signed-off-by: Alexander Graf --- hw/ide/core.c | 734 1 files changed, 367 insertio

[Qemu-devel] [PATCH 09/11] ahci: add -drive support

2010-11-18 Thread Alexander Graf
We need to be able to spawn new AHCI drives, so let's add AHCI support to the -drive option. Signed-off-by: Alexander Graf --- blockdev.c|6 +- blockdev.h|1 + qemu-common.h |2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c inde

[Qemu-devel] [PATCH 04/11] ide: add DMA hooks to bus ops

2010-11-18 Thread Alexander Graf
For DMA operations, we need to hook into even more IDE functionality. This patch adds the respective hooking points, allowing us to handle SG lists ourselves in the AHCI code. Signed-off-by: Roland Elek Signed-off-by: Alexander Graf --- v1 -> v2: - make dma hooks explicit by putting them i

[Qemu-devel] [PATCH 03/11] ide: add support for ide bus ops

2010-11-18 Thread Alexander Graf
From: Roland Elek We need to hook into some of the core IDE functionality for AHCI. To do that, the easiest way is to make explicit functions calls be implicit through a function call struct. Signed-off-by: Roland Elek Signed-off-by: Alexander Graf --- v1 -> v2: - rename IDEExtender to ID

[Qemu-devel] [PATCH 00/11] AHCI emulation support v3

2010-11-18 Thread Alexander Graf
This patch adds support for AHCI emulation. I have tested and verified it works in Linux, OpenBSD, Windows Vista and Windows 7. This AHCI emulation supports NCQ, so multiple read or write requests can be outstanding at the same time. The code is however not fully optimized yet. I'm fairly sure tha

[Qemu-devel] [PATCH 11/11] ahci: spawn controller on demand

2010-11-18 Thread Alexander Graf
When we add a device using -drive to the guest, we also need to create a new SATA bus to handle the device. This patch adds a function call that every machine that likes to have IF_SATA support can call to get full device creation by keeping the actual qdev code clean. Signed-off-by: Alexander Gra

[Qemu-devel] [PATCH 01/11] ide: split ide command interpretation off

2010-11-18 Thread Alexander Graf
The ATA command interpretation code can be used for PATA and SATA interfaces alike. So let's split it out into a separate function. Signed-off-by: Alexander Graf --- hw/ide/core.c | 20 ++-- hw/ide/internal.h |2 ++ 2 files changed, 16 insertions(+), 6 deletions(-) dif

[Qemu-devel] [PATCH 05/11] ide: add ncq identify data for ahci sata drives

2010-11-18 Thread Alexander Graf
From: Roland Elek I modified ide_identify() to include the zero-based queue length value in word 75, and set bit 8 in word 76 to signal NCQ support in the identify data for AHCI SATA drives. Signed-off-by: Roland Elek --- hw/ide/core.c |7 +++ hw/ide/internal.h |2 ++ 2 files c

[Qemu-devel] [PATCH 06/11] pci: add storage class for sata

2010-11-18 Thread Alexander Graf
This patch adds the storage sata class id. Signed-off-by: Alexander Graf --- hw/pci_ids.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index 82cba7e..ea3418c 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -15,6 +15,7 @@ #define PCI_CLAS

[Qemu-devel] [PATCH 10/11] config: Add header file for device config options

2010-11-18 Thread Alexander Graf
So far we have C preprocessor defines for target and host config options, but we're lacking any information on which devices are available. We do need that information at times though, for example in the ahci patch where we need to call a legacy init function depending on whether we have support c

[Qemu-devel] Re: [patch] fix scsi-generic

2010-11-18 Thread adq
On 17 November 2010 23:33, adq wrote: >> On 12 November 2010 10:00, Paolo Bonzini wrote: >>> On 08/09/2010 01:51 AM, adq wrote: Figured out what the problem is - READ DVD STRUCTURE has its xfer length in an unexpected place, so hw/scsi-bus.c retrieves completely the wrong valu

Re: [Qemu-devel] wrong behaviour of caps lock

2010-11-18 Thread Benjamin Drung
Am Montag, den 19.04.2010, 18:07 +0200 schrieb Stefan Weil: > Kevin Wolf schrieb: > > Am 19.04.2010 03:23, schrieb Jamie Lokier: > >> Benjamin Drung wrote: > >>> - /* SDL does not send the key up event, so we generate it */ > >> Was the original comment just plain wrong? > >> > >>> - kbd_put_keycod

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

2010-11-18 Thread Benjamin Drung
libsdl1.2 does not send an key up event for the host caps lock key, but does send the key up event if the physical caps lock key is mapped to another key (like NEO2 does). qemu-kvm works around this bug by sending a key up event for every caps lock key event. The attached patch fixes the bug for me

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

2010-11-18 Thread Benjamin Drung
I am reopening the bug again, because I am the original bug reporter and this bug depends on the keyboard layout. ** Summary changed: - does not pass pressed caps lock to client + kvm sends caps lock key up event twice ** Changed in: qemu-kvm (Ubuntu) Status: Fix Released => New -- kvm

Re: [Qemu-devel] Re: Hitting 29 NIC limit

2010-11-18 Thread Isaku Yamahata
On Thu, Nov 18, 2010 at 12:54:29PM +0100, Gerd Hoffmann wrote: > Hi, > >> What is missing for multiple pci buses is > >> - a simple P2P bridge emulator for pc architecture >> - seabios support >>- DSDT for a new machine which has multi pci buses(IRQ routing) > > Is this really needed? Q35 IR

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

2010-11-18 Thread Alexander Graf
On 18.11.2010, at 21:06, Ryan Harper wrote: > Speaking of fast, do you have any numbers around ACHI vs IDE (not that I > need any convincing that we can do better than IDE); just curious. To test the raw link speed, I usually take a tmpfs backed sparse raw file and pass it to the guest. Inside

[Qemu-devel] [PATCH v3 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Alex Williamson
Register the actual VM RAM using the new API Signed-off-by: Alex Williamson --- hw/pc.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 69b13bf..fb7ee21 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -912,14 +912,11 @@ void pc_memory_init(ram_addr

[Qemu-devel] [PATCH v3 1/2] Minimal RAM API support

2010-11-18 Thread Alex Williamson
This adds a minimum chunk of Anthony's RAM API support so that we can identify actual VM RAM versus all the other things that make use of qemu_ram_alloc. Signed-off-by: Alex Williamson --- Makefile.objs |1 + cpu-common.h |2 + memory.c | 97 +

[Qemu-devel] [PATCH v3 0/2] Minimal RAM API support

2010-11-18 Thread Alex Williamson
v3: - Address review comments - pc registers all memory below 4G in one chunk Let me know if there are any further issues. Thanks, Alex v2: - Move to Makefile.objs - Move structures to memory.c and create a callback function - Fix memory leak I haven't moved to the state parameter becau

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

2010-11-18 Thread Ryan Harper
* Alexander Graf [2010-11-18 12:49]: > > 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 00/10] AHCI emulation support v2

2010-11-18 Thread 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. This AHCI emulation supports >> NCQ, so multiple read

[Qemu-devel] [PATCH 5/6] Move threadlets infrastructure to qemu-threadlets.c

2010-11-18 Thread Arun R Bharadwaj
The reason for creating this generic infrastructure is so that other subsystems, such as virtio-9p could make use of it for offloading tasks that could block. Signed-off-by: Arun R Bharadwaj Signed-off-by: Aneesh Kumar K.V Signed-off-by: Gautham R Shenoy Signed-off-by: Sripathi Kodi Acked-by:

[Qemu-devel] [PATCH 4/6] Cleanup posix-aio.compat.c off all the old code.

2010-11-18 Thread Arun R Bharadwaj
Cleanup posix-aio.compat.c off all the old code which is now useless after introducing the generic threadlet infrasturcture. Signed-off-by: Arun R Bharadwaj --- posix-aio-compat.c | 57 +--- 1 files changed, 1 insertions(+), 56 deletions(-) diff

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

2010-11-18 Thread Arun R Bharadwaj
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 insertions(+), 18 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-

[Qemu-devel] [PATCH 3/6] Move qemu_paio_submit() to the new infrastructure.

2010-11-18 Thread Arun R Bharadwaj
Move qemu_paio_submit() to the new infrastructure and introduce the necessary APIs. Signed-off-by: Arun R Bharadwaj --- posix-aio-compat.c | 224 ++-- 1 files changed, 147 insertions(+), 77 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio

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

2010-11-18 Thread Arun R Bharadwaj
Signed-off-by: Arun R Bharadwaj --- Makefile.objs |2 +- configure |2 -- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index cd5a24b..3b7ec27 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -9,6 +9,7 @@ qobject-obj-y += qerror.o blo

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

2010-11-18 Thread Arun R Bharadwaj
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 any other guest operations while the processing of v9fs_io is in p

[Qemu-devel] [PATCH 0/6] v12: Threadlets: A generic task offloading framework.

2010-11-18 Thread Arun R Bharadwaj
Hi, This is the v12 of the refactored patch-series to have a generic asynchronous task offloading framework (called threadlets) within qemu. I have run KVM autotest suite with this patch. This test suite ran successfully for the following tests: -connecthon -ebizzy -dbench

Re: [Qemu-devel] [PATCH 1/3] Make paio subsystem use threadlets infrastructure

2010-11-18 Thread Arun R Bharadwaj
* Anthony Liguori [2010-11-15 15:13:24]: > On 11/15/2010 11:53 AM, Arun R Bharadwaj wrote: > >From: Gautham R Shenoy > > > >This patch creates a generic asynchronous-task-offloading infrastructure > >named > >threadlets. > > > >The patch creates a global queue on-to which subsystems can queue th

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

2010-11-18 Thread Alexander Graf
Gerd Hoffmann wrote: > Hi, > >> +static void ahci_trigger_irq(AHCIState *s, AHCIDevice *d, >> + int irq_type) > >> +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 at

Re: [Qemu-devel] [PATCH] spice: connection events.

2010-11-18 Thread Anthony Liguori
On 11/02/2010 08:29 AM, Gerd Hoffmann wrote: This patch adds support for connection events to spice. The events are quite simliar to the vnc events. Unlike vnc spice uses multiple tcp channels though. qemu will report every single tcp connection (aka spice channel). If you want track spice se

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

2010-11-18 Thread Michael Roth
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 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/virtproxy.c b/vir

Re: [Qemu-devel] [RFC][PATCH v3 11/21] virtproxy: add handler for control packet

2010-11-18 Thread Michael Roth
On 11/18/2010 10:22 AM, Jes Sorensen wrote: On 11/18/10 17:18, Michael Roth wrote: On 11/18/2010 05:35 AM, Jes Sorensen wrote: You should never have two closing braces in the same column like this - something is wrong with the formatting. That's from using a block for the case switch () { cas

Re: [Qemu-devel] [RFC][PATCH v4 14/18] virtagent: add client capabilities init function

2010-11-18 Thread Michael Roth
On 11/18/2010 08:22 AM, Jes Sorensen wrote: On 11/16/10 17:01, Michael Roth wrote: Non-monitor version of agent_capabilities monitor function. This is called by the local RPC server when it gets a "hello" from the guest agent to re-negotiate guest agent capabilities. Signed-off-by: Michael Roth

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 06:18:06PM +0200, Avi Kivity wrote: > >But for PV devices, we can be loose in how we define the way the > >devices interact with the rest of the system. For instance, we > >can say that virtio-pci devices are directly connected to RAM and > >do not go through the memory con

Re: [Qemu-devel] [RFC][PATCH v4 01/18] virtagent: add common rpc transport defs

2010-11-18 Thread Michael Roth
On 11/18/2010 07:53 AM, Jes Sorensen wrote: On 11/16/10 17:01, Michael Roth wrote: +#define DEBUG_VA + +#ifdef DEBUG_VA +#define TRACE(msg, ...) do { \ +fprintf(stderr, "%s:%s():L%d: " msg "\n", \ +__FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ +} while(0) +#else +#define T

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

2010-11-18 Thread Hannes Reinecke
On 11/18/2010 05:16 PM, Gerd Hoffmann wrote: > On 11/18/10 15:47, 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. > > Hmm. Looks like a few more request handling changes than a pure > s/tag/req/ + zap

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

2010-11-18 Thread 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; >> + >> +return iov_len; >> +} > > You are aware t

Re: [Qemu-devel] [RFC][PATCH v3 11/21] virtproxy: add handler for control packet

2010-11-18 Thread Jes Sorensen
On 11/18/10 17:18, Michael Roth wrote: > On 11/18/2010 05:35 AM, Jes Sorensen wrote: >> You should never have two closing braces in the same column like this - >> something is wrong with the formatting. > > That's from using a block for the case > switch () { > case: { > ... > } > } > > Alter

Re: [Qemu-devel] [RFC][PATCH v3 11/21] virtproxy: add handler for control packet

2010-11-18 Thread Michael Roth
On 11/18/2010 05:35 AM, Jes Sorensen wrote: On 11/16/10 02:16, Michael Roth wrote: Process control packets coming in over the channel. This entails setting up/tearing down connections to local services initiated from the other end of the channel. Signed-off-by: Michael Roth --- virtproxy.c |

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Avi Kivity
On 11/18/2010 06:09 PM, Anthony Liguori wrote: That's what "two memory maps" mean. If you have one cpu in SMM and another outside SMM, then those two maps are active simultaneously. I'm not sure if more modern memory controllers do special things here, but for the i440fx, if any CPU asserts

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

2010-11-18 Thread Gerd Hoffmann
On 11/18/10 15:47, 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. Hmm. Looks like a few more request handling changes than a pure s/tag/req/ + zap lookups sneaked into that patch. There are new get_req

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 06:10:12PM +0200, Gleb Natapov wrote: > > WHQL includes surprise removal tests. So any card that passed > > that will work with surprise removal. > > > Yeah. But it is not real "surprise removal". It will not crash qemu. That was the problem I saw. That the way qxl is writ

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Gleb Natapov
On Thu, Nov 18, 2010 at 06:04:56PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 05:42:41PM +0200, Gleb Natapov wrote: > > On Thu, Nov 18, 2010 at 05:25:48PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Nov 18, 2010 at 04:57:55PM +0200, Gleb Natapov wrote: > > > > On Thu, Nov 18, 201

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Anthony Liguori
On 11/18/2010 09:57 AM, Avi Kivity wrote: On 11/18/2010 05:46 PM, Anthony Liguori wrote: On 11/18/2010 09:22 AM, Avi Kivity wrote: On 11/18/2010 01:42 AM, Anthony Liguori wrote: Gack. For the benefit of those that want to join the fun without digging up the spec, these magic flippable segment

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 05:42:41PM +0200, Gleb Natapov wrote: > On Thu, Nov 18, 2010 at 05:25:48PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 18, 2010 at 04:57:55PM +0200, Gleb Natapov wrote: > > > On Thu, Nov 18, 2010 at 04:04:14PM +0200, Michael S. Tsirkin wrote: > > > > > > What do you wan

Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants

2010-11-18 Thread Jes Sorensen
On 11/18/10 16:56, Anthony Liguori wrote: > On 11/18/2010 09:51 AM, Jes Sorensen wrote: >>> Yes, I think Jes was just looking for an excuse to say "typedefmeharder" >>> :-) >>> >> Actually typedefs are not listed as a must do thing in CODING_STYLE, >> fortunately! > > That's a bug in CODING_

Re: [Qemu-devel] [PATCH 1/2] Add a DTrace tracing backend targetted for SystemTAP compatability

2010-11-18 Thread Stefan Hajnoczi
On Thu, Nov 18, 2010 at 12:00 AM, Anthony Liguori wrote: >>> Applied both.  Thanks. >>> >> >> I'm afraid you have applied an old version of the patches. Please >> revert these, and apply version 6, from Nov 12th >> > > Sure, sorry about that. > > But in the future, please indicate the version some

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Avi Kivity
On 11/18/2010 05:46 PM, Anthony Liguori wrote: On 11/18/2010 09:22 AM, Avi Kivity wrote: On 11/18/2010 01:42 AM, Anthony Liguori wrote: Gack. For the benefit of those that want to join the fun without digging up the spec, these magic flippable segments the i440fx can toggle are 12 fixed 16k se

Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants

2010-11-18 Thread Anthony Liguori
On 11/18/2010 09:51 AM, Jes Sorensen wrote: Yes, I think Jes was just looking for an excuse to say "typedefmeharder" :-) Actually typedefs are not listed as a must do thing in CODING_STYLE, fortunately! That's a bug in CODING_STYLE. typedefing structures is one of the core characteristi

Re: [Qemu-devel] Fwd: [PATCH v2] Guest OS hangs on usb_add

2010-11-18 Thread Anthony Liguori
On 11/02/2010 09:51 AM, TJ wrote: Doesn't look like this has ever been committed. qemu-kvm-0.13 has just arrived to the portage tree, but I am still having problems with it. I checked the git log and it's not there! Please commit. One off device hacks are concerning because it's basically i

Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants

2010-11-18 Thread Jes Sorensen
On 11/18/10 16:41, Anthony Liguori wrote: > On 11/18/2010 09:35 AM, Michael Roth wrote: +/* listening fd, one for each service we're forwarding to remote end */ +typedef struct VPOForward { +VPDriver *drv; +int listen_fd; +char service_id[VP_SERVICE_ID_LEN]

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Gleb Natapov
On Wed, Nov 17, 2010 at 05:42:28PM -0600, Anthony Liguori wrote: > >For my purpose in using this to program the IOMMU with guest physical to > >host virtual addresses for device assignment, it doesn't really matter > >since there should never be a DMA in this range of memory. But for a > >general

Re: [Qemu-devel] [RFC][PATCH v3 02/21] virtproxy: qemu-vp, standalone daemon skeleton

2010-11-18 Thread Michael Roth
On 11/18/2010 04:04 AM, Stefan Hajnoczi wrote: On Tue, Nov 16, 2010 at 1:15 AM, Michael Roth wrote: Daemon to be run in guest, or on host in standalone mode. (re-)implements some qemu utility functions used by core virtproxy.c code via wrapper functions. For built-in virtproxy code we will defi

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Anthony Liguori
On 11/18/2010 09:22 AM, Avi Kivity wrote: On 11/18/2010 01:42 AM, Anthony Liguori wrote: Gack. For the benefit of those that want to join the fun without digging up the spec, these magic flippable segments the i440fx can toggle are 12 fixed 16k segments from 0xc to 0xe and a single 64k

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Gleb Natapov
On Thu, Nov 18, 2010 at 05:25:48PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 04:57:55PM +0200, Gleb Natapov wrote: > > On Thu, Nov 18, 2010 at 04:04:14PM +0200, Michael S. Tsirkin wrote: > > > > > What do you want to know? > > > > How it claims access to framebuffer. Legacy VGA has

Re: [Qemu-devel] [RFC][PATCH v4 09/18] virtagent: add va_shutdown RPC

2010-11-18 Thread Jes Sorensen
On 11/18/10 16:35, Anthony Liguori wrote: > On 11/18/2010 08:17 AM, Jes Sorensen wrote: >> On 11/16/10 17:01, Michael Roth wrote: >> >>> RPC to initiate guest shutdown/reboot/powerdown >>> >> Do we really need this? After all those events can be passed down via >> ACPI? >> > > Reboot

Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants

2010-11-18 Thread Anthony Liguori
On 11/18/2010 09:35 AM, Michael Roth wrote: +/* listening fd, one for each service we're forwarding to remote end */ +typedef struct VPOForward { +VPDriver *drv; +int listen_fd; +char service_id[VP_SERVICE_ID_LEN]; +QLIST_ENTRY(VPOForward) next; +} VPOForward; I am really not a

Re: [Qemu-devel] [RFC][PATCH v4 09/18] virtagent: add va_shutdown RPC

2010-11-18 Thread Anthony Liguori
On 11/18/2010 08:17 AM, Jes Sorensen wrote: On 11/16/10 17:01, Michael Roth wrote: RPC to initiate guest shutdown/reboot/powerdown Do we really need this? After all those events can be passed down via ACPI? Reboot can't be passed by ACPI. This is why virDomainReboot is still n

Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants

2010-11-18 Thread Michael Roth
On 11/18/2010 05:06 AM, Jes Sorensen wrote: On 11/16/10 02:15, Michael Roth wrote: Signed-off-by: Michael Roth --- virtproxy.c | 136 +++ virtproxy.h | 34 +++ 2 files changed, 170 insertions(+), 0 deletions(-) create m

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

2010-11-18 Thread Gerd Hoffmann
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; + +return iov_len; +} You are aware that there is a QEMUIOVector type with helper functions which keeps track of bot

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 04:57:55PM +0200, Gleb Natapov wrote: > On Thu, Nov 18, 2010 at 04:04:14PM +0200, Michael S. Tsirkin wrote: > > > > What do you want to know? > > > How it claims access to framebuffer. Legacy VGA has not only IO space > > > but MMIO space too. > > > > There's a separate bit

[Qemu-devel] [PATCH 14/16] scsi: Implement 'get_sense' callback

2010-11-18 Thread Hannes Reinecke
The get_sense callback copies existing sense information into the provided buffer. Required if sense information should be transferred together with the command response. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c|9 + hw/scsi-generic.c | 17 + hw/scsi.h

Re: [Qemu-devel] [PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-18 Thread Avi Kivity
On 11/18/2010 01:42 AM, Anthony Liguori wrote: Gack. For the benefit of those that want to join the fun without digging up the spec, these magic flippable segments the i440fx can toggle are 12 fixed 16k segments from 0xc to 0xe and a single 64k segment from 0xf to 0xf. There are

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Gleb Natapov
On Thu, Nov 18, 2010 at 04:04:14PM +0200, Michael S. Tsirkin wrote: > > > What do you want to know? > > How it claims access to framebuffer. Legacy VGA has not only IO space > > but MMIO space too. > > There's a separate bit to enable memory is that is what you > are asking about. > > The spec sp

[Qemu-devel] [PATCH 15/16] scsi: Implement get_req_iov callback

2010-11-18 Thread Hannes Reinecke
Add callback to create a request with a predefined iovec. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c| 25 + hw/scsi-generic.c | 44 ++-- hw/scsi.h |2 ++ 3 files changed, 57 insertions(+), 14 deletions(-)

[Qemu-devel] [PATCH 11/16] scsi-disk: add data direction checking

2010-11-18 Thread Hannes Reinecke
scsi_req_parse() already provides for a data direction setting, so we should be using it to check for correct direction. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index f

[Qemu-devel] [PATCH 08/16] lsi53c895a: Rename 'sense' to 'status'

2010-11-18 Thread Hannes Reinecke
The 'sense' field in the HBA status structure is misnamed, as it actually carries the SCSI status. Rename it. Signed-off-by: Hannes Reinecke --- hw/lsi53c895a.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index f973

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

2010-11-18 Thread Hannes Reinecke
aio_ioctl is emulated anyway and currently broken. So better use 'normal' ioctl here as there are no benefits on using the emulated async I/O call. Signed-off-by: Hannes Reinecke --- hw/scsi-generic.c | 21 +++-- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/

[Qemu-devel] [PATCH 13/16] Remove 'bus' argument from SCSI command completion callbacks

2010-11-18 Thread Hannes Reinecke
The 'bus' argument is now pointless, as we already pass the request itself and the bus can be derived from it. Signed-off-by: Hannes Reinecke --- hw/esp.c |5 ++--- hw/lsi53c895a.c |5 ++--- hw/scsi-bus.c |3 +-- hw/scsi-disk.c|8 hw/scsi-generic.c |

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

2010-11-18 Thread Hannes Reinecke
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. Signed-off-by: Hannes Reinecke --- hw/scsi-bus.c | 10 -- hw/scsi-disk.c | 33 +

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

2010-11-18 Thread Hannes Reinecke
Rather than have the iovec part of the structure with a fixed size of '1' we should be allocating it dynamically. This will allow us to pass in SGLs directly. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c | 112 +++- 1 files changed, 70 i

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

2010-11-18 Thread Hannes Reinecke
Rather than to access a SCSIRequest via an abstract 'tag' we can as well use it directly and save us the lookup. Signed-off-by: Hannes Reinecke --- hw/esp.c | 20 --- hw/lsi53c895a.c | 25 + hw/scsi-bus.c | 15 +- hw/scsi-disk.c| 147 ---

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

2010-11-18 Thread Hannes Reinecke
We parse the CDB twice, which is completely unnecessary. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c | 74 1 files changed, 21 insertions(+), 53 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index da6c3f0..58e5f5b 100

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

2010-11-18 Thread Hannes Reinecke
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 violation of the spec in certain cases. This patch introduces various predefined s

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

2010-11-18 Thread Hannes Reinecke
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. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/

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

2010-11-18 Thread Hannes Reinecke
The SCSI emulation is supposed to return status codes as defined by SAM, not the linux ones which are shifted by one. Signed-off-by: Hannes Reinecke --- hw/scsi-defs.h| 20 +++- hw/scsi-generic.c | 10 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff -

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

2010-11-18 Thread Hannes Reinecke
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 allocated by the bus. Signed-off-by: Hannes Reinecke --- blockdev.h|2 +

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

2010-11-18 Thread Hannes Reinecke
qemu_malloc doesn't check for zero argument, so we need to check ourselves. Signed-off-by: Hannes Reinecke --- dma-helpers.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 712ed89..877b2c3 100644 --- a/dma-helpers.c +++ b/dma-hel

[Qemu-devel] [PATCH 00/16] Megasas HBA emulation and SCSI update

2010-11-18 Thread Hannes Reinecke
Due to popular demand here is now the LSI Megaraid HBA emulation. And an update to the SCSI stack to bring it more in line with modern standards. For the SCSI update there are three key points: - Improved sense code handling: the SCSI standard specifies several sense codes to be returned on com

Re: [Qemu-devel] [RFC][PATCH v4 17/18] virtagent: qemu-vp, va_send_hello() on startup

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > Make the hello call on guest agent startup so QEMU can do whatever init > it needs (currently, capabilities negotiation). Temporarilly commented > due to this tending to induce a virtio bug in RHEL 6.0. As a result > capabilities negotiation must be invoked

Re: [Qemu-devel] [RFC][PATCH v4 14/18] virtagent: add client capabilities init function

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > Non-monitor version of agent_capabilities monitor function. This is > called by the local RPC server when it gets a "hello" from the guest > agent to re-negotiate guest agent capabilities. > > Signed-off-by: Michael Roth > --- > virtagent.c | 34 +++

Re: [Qemu-devel] [RFC][PATCH v4 10/18] virtagent: add agent_shutdown monitor command

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > Provide monitor command to initiate guest shutdown/reboot/powerdown > +int do_agent_shutdown(Monitor *mon, const QDict *mon_params, > + MonitorCompletion cb, void *opaque) > +{ > +xmlrpc_env env; > +xmlrpc_value *params; > +

Re: [Qemu-devel] [RFC][PATCH v4 09/18] virtagent: add va_shutdown RPC

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > RPC to initiate guest shutdown/reboot/powerdown Do we really need this? After all those events can be passed down via ACPI? Cheers, Jes

Re: [Qemu-devel] [RFC][PATCH v4 06/18] virtagent: add agent_viewfile command

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > Utilize the getfile RPC to provide a means to view text files in the > guest. Getfile can handle binary files as well but we don't advertise > that here due to the special handling requiring to store it and provide > it back to the user (base64 encoding it f

Re: [Qemu-devel] [RFC][PATCH v4 04/18] virtagent: base RPC client definitions

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > diff --git a/monitor.c b/monitor.c > index 8cee35d..cb81cd7 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -42,6 +42,7 @@ > #include "audio/audio.h" > #include "disas.h" > #include "balloon.h" > +#include "virtagent.h" > #include "qemu-timer.h" > #incl

Re: [Qemu-devel] Re: [PATCH] spice: add qxl device

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 02:27:26PM +0200, Gleb Natapov wrote: > On Thu, Nov 18, 2010 at 02:03:11PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 18, 2010 at 01:55:29PM +0200, Gleb Natapov wrote: > > > On Thu, Nov 18, 2010 at 01:33:08PM +0200, Michael S. Tsirkin wrote: > > > > On Thu, Nov 18, 201

Re: [Qemu-devel] [RFC][PATCH v4 03/18] virtagent: qemu-vp, integrate virtagent server

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > +bool enable_virtagent; > > chr->opaque = drv; > chr->chr_write = vp_chr_write; > @@ -2025,9 +2029,31 @@ static CharDriverState > *qemu_chr_open_virtproxy(QemuOpts *opts) > /* parse socket forwarding options */ > qemu_opt_foreach(o

Re: [Qemu-devel] [RFC][PATCH v4 02/18] virtagent: base definitions for host/guest RPC server

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > +#include > +#include "qemu_socket.h" > +#include "virtagent-daemon.h" > +#include "virtagent-common.h" > +#include "virtagent.h" > + > +static bool va_enable_syslog = false; /* enable syslog'ing of RPCs */ > + > +#define SLOG(msg, ...) do { \ > +char m

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

2010-11-18 Thread Jes Sorensen
Given that you know what the problem is, it would probably have been faster to post a patch than just updating the bug and marking it confirmed -- Silently fail with wrong vde socket dir https://bugs.launchpad.net/bugs/676029 You received this bug notification because you are a member of qemu

Re: [Qemu-devel] [RFC][PATCH v4 01/18] virtagent: add common rpc transport defs

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > +#define DEBUG_VA > + > +#ifdef DEBUG_VA > +#define TRACE(msg, ...) do { \ > +fprintf(stderr, "%s:%s():L%d: " msg "\n", \ > +__FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ > +} while(0) > +#else > +#define TRACE(msg, ...) \ > +do {

Re: [Qemu-devel] [RFC][PATCH v4 00/18] virtagent: host/guest RPC communication agent

2010-11-18 Thread Jes Sorensen
On 11/16/10 17:01, Michael Roth wrote: > This set of patches is meant to be applied on top of the recently submitted > Virtproxy v3 patchset. It can also be obtained at: > > git://repo.or.cz/qemu/mdroth.git virtproxy_v3 > > OVERVIEW: > > There are a wide range of use cases motivating the need f

[Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware.

2010-11-18 Thread Gleb Natapov
On Mon, Nov 15, 2010 at 08:29:24PM +, Blue Swirl wrote: > 2010/11/15 Gleb Natapov : > > On Sun, Nov 14, 2010 at 10:50:13PM +, Blue Swirl wrote: > >> On Sun, Nov 14, 2010 at 3:39 PM, Gleb Natapov wrote: > >> > > >> > Signed-off-by: Gleb Natapov > >> > --- > >> >  hw/fw_cfg.c |   14 +++

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

2010-11-18 Thread Kevin Wolf
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. This AHCI emulation supports > NCQ, so multiple read or write requests can be outstanding at the same time. >

[Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware.

2010-11-18 Thread Gleb Natapov
On Thu, Nov 18, 2010 at 03:12:02PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 18, 2010 at 02:37:08PM +0200, Gleb Natapov wrote: > > > So that's unavoidable if we think paths are correct. > > > But if we know they are wrong, we are better off > > > correcting them first IMO. > > > > > They are

[Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware.

2010-11-18 Thread Michael S. Tsirkin
On Thu, Nov 18, 2010 at 02:37:08PM +0200, Gleb Natapov wrote: > > So that's unavoidable if we think paths are correct. > > But if we know they are wrong, we are better off > > correcting them first IMO. > > > They are correct for x86. My patch set does not even tries to cover all > HW. If sparc wa

  1   2   >