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

2011-07-06 Thread Paolo Bonzini
On 07/06/2011 08:20 AM, Hannes Reinecke wrote: We cannot map control structures from guest memory and treating them as valid request state later on. Yes, I've been working on that one already. What I'll be doing is to read in the sge count during 'map_sgl' and store this value internally (in -

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

2011-07-05 Thread Hannes Reinecke
On 07/05/2011 05:21 PM, Stefan Hajnoczi wrote: On Tue, Jul 5, 2011 at 12:03 PM, Hannes Reinecke wrote: +static void megasas_unmap_sgl(struct megasas_cmd_t *cmd) +{ +uint16_t flags = le16_to_cpu(cmd->frame->header.flags); +int i, is_write = (flags& MFI_FRAME_DIR_WRITE) ? 1 : 0; + +f

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

2011-07-05 Thread Stefan Hajnoczi
On Tue, Jul 5, 2011 at 12:03 PM, Hannes Reinecke wrote: > +static void megasas_unmap_sgl(struct megasas_cmd_t *cmd) > +{ > +    uint16_t flags = le16_to_cpu(cmd->frame->header.flags); > +    int i, is_write = (flags & MFI_FRAME_DIR_WRITE) ? 1 : 0; > + > +    for (i = 0; i < cmd->frame->header.sge_