qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: rajan pathak <rajanpatha34@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Simulate different network card vendors
Date: Sat, 18 Jan 2014 09:19:43 -0800	[thread overview]
Message-ID: <CACXtFMh0nKbARsuUn3odD7S2uP5noGDup0mm8eSVASbwX3hprw@mail.gmail.com> (raw)
In-Reply-To: <20140116062921.GB14680@stefanha-thinkpad>

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

Thanks Stefan for your kind response.

I am OK with C programming and wrote couple of LKM related to FPGA device.

But my understanding of QEMU is very limited.

Let me ask some specific question on what I wanted to do.

I am looking forward to emulate single-chip Ethernet controller.

I can find some of its source code online and it has two main part Ethernet
PHY (any 1GB SGMII compatible)
and Ethernet MAC .

So ,DO I need to simply put the corresponding source files of PHY and MAC
in hw/net directory of QEMU?

Also ,do I need to take care of underlying Ethernet controller(of my
machine where I am trying to do this) from
Broadcom in any way?

Thanks
Rajan





On Wed, Jan 15, 2014 at 10:29 PM, Stefan Hajnoczi <stefanha@gmail.com>wrote:

> On Wed, Jan 15, 2014 at 01:27:41PM +0530, rajan pathak wrote:
> > I am new QEMU development and wanted to Simulate Atheros Network
> controller.
> >
> >
> > I am Running QEMU on x86 machine with underlaying network controller from
> > Broadcom and
> >  compiled linux kernel based on ARM having Atheros driver support.
> >
> > I guess there must be mapping at QEMU level calls for Atheros driver maps
> > to Broadcom.
> > Have no idea where to start looking in to QEMU code and what files to
> look
> > into.
> >
> > Can anyone let me know how in general mapping mapping between two
> different
> > network vendors takes plave at QEMU level.
>
> QEMU emulates hardware (network cards, graphics cards, sound cards,
> etc).  What you are asking about is adding a new emulated device for an
> Atheros NIC.
>
> Usually that involves reviewing the datasheet from the hardware vendor
> to understand the programming interface that the hardware provides (e.g.
> hardware registers accessible over PCI).
>
> In some cases no datasheet is available so you have to look at existing
> open source drivers to understand how the device is supposed to behave.
>
> Then you can implement the device in QEMU.  See the hw/net/ directory.
>
> If you're not already familiar with device drivers/device emulation and
> C programming then this can be a big undertaking.  The main requirement
> is to understand how the hardware is supposed to behave, it can be very
> difficult if the vendor does not provide a datasheet.
>
> Perhaps you can modify your guest to use one of the NICs that QEMU
> already has support for (rtl8139, e1000, virtio-net, etc)?
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 3271 bytes --]

  reply	other threads:[~2014-01-18 17:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  7:57 [Qemu-devel] Simulate different network card vendors rajan pathak
2014-01-16  6:29 ` Stefan Hajnoczi
2014-01-18 17:19   ` rajan pathak [this message]
2014-01-20 16:22     ` Stefan Hajnoczi
2014-01-22 13:00       ` rajan pathak
2014-01-22 15:58         ` Stefan Hajnoczi

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=CACXtFMh0nKbARsuUn3odD7S2uP5noGDup0mm8eSVASbwX3hprw@mail.gmail.com \
    --to=rajanpatha34@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).