qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: "Niteesh G. S." <niteesh.gs@gmail.com>, qemu-devel@nongnu.org
Cc: philmd@redhat.com
Subject: Re: Interested in contributing to QEMU
Date: Wed, 10 Feb 2021 12:03:44 -0500	[thread overview]
Message-ID: <9965cb74-96aa-cc4d-01bb-aa7ff6fd8db5@redhat.com> (raw)
In-Reply-To: <CAN6ztm93eFZdtN6CTreoM-s-kF7m8f6oxpOWyez2V=3sTaOSUw@mail.gmail.com>

On 2/9/21 8:57 AM, Niteesh G. S. wrote:
> Hello John,
> On Mon, Feb 8, 2021 at 8:44 PM John Snow <jsnow@redhat.com 
> <mailto:jsnow@redhat.com>> wrote:
>     On 2/7/21 12:01 PM, Niteesh G. S. wrote:

[...]

> 
> 
> Which one in your opinion will yield a faster response, Mailing list or IRC?
> My problem with IRC is, I don't have an IRC bouncer set up so I miss
> some conversations. Which one is simpler to use? There are many options
> available. Is there something that will not require me to host a server?
> 

Indeed one of the problems with IRC :)

IRC can be faster if you happen to join at the right time, when people 
are around and paying attention. We generally conduct interviews and 
meetings for GSoC/Outreachy at scheduled times on IRC.

If you don't get an answer fairly quickly on IRC, send a mail. If you'd 
like to chat more interactively than mail allows, try and ask for an 
explicit time for someone to meet with you on IRC.

>     See the end of this mail for instructions on how to join, if you
>     need them.
> 
> I am already part of the QEMU IRC channel. But thanks for these 
> instructions.
> 

Sorry, I wasn't sure! I try to be aware that IRC is increasingly a thing 
that only weird old coots use :p

[...]

> 
> 
> Thank you so much for the detailed answer. This helped a lot.
> After reading the docs and messing around with simple commands.
> I am confused about few things.
> 
> 1) What is the difference between QMPShell and HMPShell? My understanding
> after going through code and doco is both talk to QEMU using QMP and 
> basically
> do the same thing but HMPShell is a subset of QMP shell which is 
> more human-friendly
> compared to QMPShell. Is that right?
> 

"It's complicated ..."

HMP shell is an older protocol that QEMU has that is meant to be more 
human-friendly, yes. Many of its commands are implemented in terms of 
QMP commands, but not all of them. It isn't right to call it a "subset".

QMP was introduced to create an API that was more machine-friendly than 
HMP, but we didn't finish porting everything from HMP to QMP, for a few 
reasons.

(1) HMP does not have any backwards compatibility promises; this makes 
it more appealing for various debugging commands and alpha/beta versions 
of commands. QMP is meant to have fairly strict backwards compatibility 
and a reliable API.

(2) QMP is designed as a control channel and not a data transfer 
channel, so some commands that may transmit large amounts of data or 
take indeterminate amounts of time have remained stuck in HMP without a 
proper QMP equivalent.

Naturally, you can use QMP to issue HMP-only commands if you want. There 
are a few uses of this in ./tests/qemu-iotests to do various "unsafe" 
things.

Daniel Berrange is working on porting "savevm" from HMP to QMP as one of 
our last holdouts that isn't just debugging/query stuff.

Whether or not we want to sunset HMP long-term is, AFAIK, an unresolved 
question. There are obvious uses for a user-friendly shell. Part of the 
qmp-shell revamp project is to investigate the viability of a 
user-friendly shell backed only by QMP, where the "friendly" bits are 
outside of QEMU proper and not subject to backwards compatibility promises.

> 2) When I press <CTRL-A> - C in QEMU I get a monitor prompt, after
> reading the man page I go to know that I can use telnet or socat to control
> as well. Is this another interface to QEMU which uses QMP?
> 

I'm not sure I know what this keypress does! If you see a prompt, 
though, it's HMP. Type "help" and send a newline.

The QMP protocol is described somewhere in /docs/ like I pointed out in 
my reply. You should get a greeting and you should be able to post a qmp 
capabilities handshake and get a reply.

>     4) Understanding my project
> 
>     If you're still interested in my project, I'd recommend trying out
>     qmp-shell against a running QEMU instance and issuing a few basic,
>     boring commands ("query-status" is a good candidate) and seeing how
>     that
>     works.
> 
>     Then, I'd take a look at some of the other projects I mentioned
>     (mitmproxy, irssi) to get a sense of what the work is here. This is
>     largely a UI/API programming task, and there's real work to do on the
>     AQMP library, but it's probably closer to the surface than the deep
>     technical internals of QEMU.
> 
>     It might be a good introductory project that helps you get a better
>     overview of the internals of QEMU if you're interested in more
>     hardware-related aspects, but it still requires you have at least some
>     interested in UI programming and API design.
> 
>     Phil's project might involve hardware specifics quite a bit more than
>     mine, while still teaching you some overview of QMP as a necessity of
>     the project.
> 
> TBH UI and Async are both quite new to me, I have only done CLI
> stuff since there isn't much UI in low-level dev. I also wanted to try 
> out async
> dev at a serious scale but never got an opportunity to do so. My rationale
> behind choosing Phil's project is it would let me learn about the hardware
> emulation and more importantly the visualization stuff using QEMU. But since
> your project involves also async stuff I would love to work on your 
> project if
> you allow me to ;).
> 

Yup, understood.

>     If you remain interested after the above, I can point you towards some
>     more concrete tasks that need doing for you to get a fairly concrete
>     sense of what the project entails.
> 
> Please, If you have any small tasks pending, I would like to work on them.
> 

OK: I think I need to be careful about "issuing" work to someone who 
isn't (yet) accepted into the program -- I shouldn't misrepresent this 
arrangement -- but I can give you some more research tips that may help 
you find your footing.

We can work on getting to know QMP a bit better; it sounds like it'd be 
relevant for both projects.

Try using '-qmp qmp.sock,server,nowait' when you boot up QEMU and then 
open the qmp.sock file with socat and try messing with it.

Try going to ./qapi/ in the source tree and "git grep event" to find 
some event definitions. try grepping for that event name in the QEMU 
tree at large and try to work out how QEMU emits these events.

Try *adding* an event somewhere in ./qapi/ and modifying QEMU to emit 
this event. Try using rlwrap and socat to connect to this QMP socket and 
verify that your event is being sent over the wire. Depending on where 
you add the event, it may be helpful to start QEMU in a paused state and 
issue a resume command from QMP to make sure you have time to connect to 
the socket.

For more hardware-oriented avenues of exploration, I'd encourage 
reaching out to phil, who seems to have a knack for finding weird 
embedded devices to babysit :)

> 
>      > I would like to work on these projects even outside of GSoC if
>     someone
>      > is ready to
>      > mentor in their free time :).
>      >
> 
> Thanks,
> Niteesh.
> 
>     Feel free to join #qemu-gsoc on irc.oftc.net <http://irc.oftc.net>.
>     If you've not joined an
>     IRC channel before, it's kind of like a prehistoric slack channel.
> 
>     Linux GUI: xchat, hexchat
>     Linux TUI: irssi, WeeChat
> 
>     OSX GUI: LimeChat, Colloquy (I've never used either)
>     OSX TUI: irssi and weechat should be available via ports (Not tried.)
> 
>     Windows GUI: mIRC, XChat
> 
> 
>     I'm jsnow on OFTC. You can use my nickname at the start of a message
>     ("jsnow: Hello, this is Niteesh from the mailing list") and it will
>     show
>     me a notification -- but the hours I am paying attention to IRC are
>     around 10AM - 7PM EST. (15:00 - 00:00 GMT)
> 
>     I can be around later by request (00:00 - 05:00 GMT) if you give me
>     some
>     advance notice.
> 
>      > Thanks
>      > Niteesh.
>      >
>      >
> 



  reply	other threads:[~2021-02-10 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 17:01 Interested in contributing to QEMU Niteesh G. S.
2021-02-08 15:13 ` John Snow
2021-02-09 13:57   ` Niteesh G. S.
2021-02-10 17:03     ` John Snow [this message]
2021-02-12 12:10       ` Niteesh G. S.
2021-02-16  0:10         ` John Snow

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=9965cb74-96aa-cc4d-01bb-aa7ff6fd8db5@redhat.com \
    --to=jsnow@redhat.com \
    --cc=niteesh.gs@gmail.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).