All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todor Minchev <todor.minchev@linux.intel.com>
To: Mark Hatle <mark.hatle@windriver.com>
Cc: yocto@yoctoproject.org
Subject: Re: [PATCH 1/1] runqemu: add user mode (SLIRP) support to x86 QEMU targets
Date: Mon, 24 Oct 2016 16:46:44 -0700	[thread overview]
Message-ID: <1477352804.49237.34.camel@linux.intel.com> (raw)
In-Reply-To: <9fca01e8-19ef-edc2-3a6d-6e5920fdc77c@windriver.com>

On Mon, 2016-10-24 at 18:15 -0500, Mark Hatle wrote:
> On 10/24/16 5:19 PM, Todor Minchev wrote:
> > Using 'slirp' as a command line option to runqemu will start QEMU
> > with user mode networking instead of creating tun/tap devices.
> > SLIRP does not require root access. By default port 2222 on the
> > host will be mapped to port 22 in the guest. The default port
> > mapping can be overwritten with the QB_SLIRP_OPT variable e.g.
> > 
> > QB_SLIRP_OPT = "-net nic,model=e1000 -net user,hostfwd=tcp::2222-:22"
> 
> In the past patches like this have been rejected for performance and other
> reasons.  

Performance is not ideal with SLIRP, but should be sufficient for basic
ssh access to the guest. Could you please elaborate on the other reasons
why having this is a bad idea?

> While I don't particularly like requiring sudo access for runqemu,
> adding the 'slirp' option will allow someone w/o root/sudo to be able to run it.

The goal was to be able to run a QEMU image and provide basic networking
without requiring root access. Is there any reason why running runqemu
w/o root/sudo access should be discouraged?   

> Otherwise, if there is something you can do to make slirp work better (when
> enabled), that is more likely to be accepted.

Similar SLIRP support has been already accepted for qemuarm64 with
commit 9b0a94cb

--Todor

Intel Open Source Technology Center

> --Mark
> 
> > Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
> > ---
> >  meta/conf/machine/include/qemuboot-x86.inc | 1 +
> >  scripts/runqemu                            | 3 ++-
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/conf/machine/include/qemuboot-x86.inc b/meta/conf/machine/include/qemuboot-x86.inc
> > index 06ac983..0870294 100644
> > --- a/meta/conf/machine/include/qemuboot-x86.inc
> > +++ b/meta/conf/machine/include/qemuboot-x86.inc
> > @@ -13,3 +13,4 @@ QB_AUDIO_OPT = "-soundhw ac97,es1370"
> >  QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
> >  # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
> >  QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
> > +QB_SLIRP_OPT = "-net nic,model=e1000 -net user,hostfwd=tcp::2222-:22"
> > diff --git a/scripts/runqemu b/scripts/runqemu
> > index dbe17ab..6952f32 100755
> > --- a/scripts/runqemu
> > +++ b/scripts/runqemu
> > @@ -542,7 +542,8 @@ class BaseConfig(object):
> >      def check_and_set(self):
> >          """Check configs sanity and set when needed"""
> >          self.validate_paths()
> > -        check_tun()
> > +        if not self.slirp_enabled:
> > +            check_tun()
> >          # Check audio
> >          if self.audio_enabled:
> >              if not self.get('QB_AUDIO_DRV'):
> > 
> 




  reply	other threads:[~2016-10-24 23:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 22:19 [PATCH 1/1] runqemu: add user mode (SLIRP) support to x86 QEMU targets Todor Minchev
2016-10-24 23:15 ` Mark Hatle
2016-10-24 23:46   ` Todor Minchev [this message]
2016-10-25  0:16     ` Mark Hatle
2016-10-25 17:49       ` Brian Avery
2016-10-25 18:09         ` Mark Hatle
  -- strict thread matches above, loose matches on Subject: below --
2016-10-26 17:05 Todor Minchev
2016-11-24 10:29 ` Robert Yang

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=1477352804.49237.34.camel@linux.intel.com \
    --to=todor.minchev@linux.intel.com \
    --cc=mark.hatle@windriver.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.