qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: rajan pathak <rajanpatha34@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Simulate different network card vendors
Date: Thu, 16 Jan 2014 14:29:21 +0800	[thread overview]
Message-ID: <20140116062921.GB14680@stefanha-thinkpad> (raw)
In-Reply-To: <CACXtFMgh+DhPFAM_W7ef3Kk6NsKobC6qte+0pM7nSV4iqz8miw@mail.gmail.com>

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

  reply	other threads:[~2014-01-16  6:29 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 [this message]
2014-01-18 17:19   ` rajan pathak
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=20140116062921.GB14680@stefanha-thinkpad \
    --to=stefanha@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rajanpatha34@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).