qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Денис Дмитриев" <zealot351@gmail.com>, qemu-devel@nongnu.org
Cc: Pavel Dovgaluk <pavel.dovgaluk@ispras.ru>
Subject: Re: [Qemu-devel] Implementation of BusLogic SCSI host adapter (BT-958)
Date: Thu, 1 Sep 2016 13:11:06 +0200	[thread overview]
Message-ID: <6961327b-897d-0c01-102f-22f299e0362c@redhat.com> (raw)
In-Reply-To: <CAF3nGXcHFxr510n+kMzZSogWUED09bWP0fmC-aC82nxJ6Cp_WQ@mail.gmail.com>



On 31/08/2016 15:48, Денис Дмитриев wrote:
> uint64_t buslogicReadOutgoingMailbox(BuslogicState *s, BUSLOGICTASKSTATE
> *TaskState)
> {
>     uint64_t    GCMailbox;
>     Mailbox24   Mbx24;
>     Mbx24.uCmdState = 0;
>     PCIDevice *pci_dev = PCI_DEVICE(s);
>     if (s->fMbxIs24Bit)
>     {
>         //try to calculate mailbox address
>         GCMailbox = s->GCPhysAddrMailboxOutgoingBase +
> (s->uMailboxOutgoingPositionCurrent * sizeof(Mailbox24));
>         //try to read mailbox
>         pci_dma_read(pci_dev, GCMailbox, &Mbx24, sizeof(Mailbox24));
>         //after that i  have empty buffer
>         TaskState->MailboxGuest.u32PhysAddrCCB    =
> ADDR_TO_U32(Mbx24.aPhysAddrCCB);
>         TaskState->MailboxGuest.u.out.uActionCode = Mbx24.uCmdState;
>     }
>     else
>     {
>         GCMailbox = s->GCPhysAddrMailboxOutgoingBase +
> (s->uMailboxOutgoingPositionCurrent * sizeof(Mailbox32));
>         pci_dma_read(pci_dev, GCMailbox, &TaskState->MailboxGuest,
> sizeof(Mailbox32));
>     }
>     return GCMailbox;
> }

This seems okay, so I am afraid you'll have to debug it. :(

That said, this looks very much like VirtualBox code.  Do not use it if
you want to contribute code to QEMU, because QEMU does not accept
GPLv2-only code.  We already had to rewrite the lsisas1068 device model
instead of using the one that was contributed a few years ago.

Paolo

  reply	other threads:[~2016-09-01 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 13:48 [Qemu-devel] Implementation of BusLogic SCSI host adapter (BT-958) Денис Дмитриев
2016-09-01 11:11 ` Paolo Bonzini [this message]
2016-09-01 11:19   ` Peter Maydell
2016-09-01 12:59     ` Paolo Bonzini
2016-09-01 13:01       ` Peter Maydell
2016-09-01 13:17   ` Denis Dmitriev
2016-09-01 15:12     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6961327b-897d-0c01-102f-22f299e0362c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=zealot351@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).