qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: phillip.ennen@gmail.com, qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Phillip Tennen <phillip@axleos.com>,
	Akihiko Odaki <akihiko.odaki@gmail.com>,
	Howard Spoelstra <hsp.cat7@gmail.com>,
	Alessio Dionisi <hello@adns.io>, Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH v8 0/7] Add vmnet.framework based network backend
Date: Fri, 7 Jan 2022 13:30:41 +0300	[thread overview]
Message-ID: <CADO9X9Tr02jN0+bOaJRymjP349bWH1ediNN=fynsPSpmcJBn4Q@mail.gmail.com> (raw)
In-Reply-To: <cf5dc700-e0ae-6de9-f4c3-53ce5528accf@redhat.com>

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

пт, 7 янв. 2022 г. в 08:03, Jason Wang <jasowang@redhat.com>:

>
> 在 2022/1/6 下午12:18, Jason Wang 写道:
> >
> > 在 2021/12/11 下午6:44, Vladislav Yaroshchuk 写道:
> >> macOS provides networking API for VMs called 'vmnet.framework':
> >> https://developer.apple.com/documentation/vmnet
> >>
> >> We can provide its support as the new QEMU network backends which
> >> represent three different vmnet.framework interface usage modes:
> >>
> >>    * `vmnet-shared`:
> >>      allows the guest to communicate with other guests in shared mode
> >> and
> >>      also with external network (Internet) via NAT. Has (macOS-provided)
> >>      DHCP server; subnet mask and IP range can be configured;
> >>
> >>    * `vmnet-host`:
> >>      allows the guest to communicate with other guests in host mode.
> >>      By default has enabled DHCP as `vmnet-shared`, but providing
> >>      network unique id (uuid) can make `vmnet-host` interfaces isolated
> >>      from each other and also disables DHCP.
> >>
> >>    * `vmnet-bridged`:
> >>      bridges the guest with a physical network interface.
> >>
> >> This backends cannot work on macOS Catalina 10.15 cause we use
> >> vmnet.framework API provided only with macOS 11 and newer. Seems
> >> that it is not a problem, because QEMU guarantees to work on two most
> >> recent versions of macOS which now are Big Sur (11) and Monterey (12).
> >>
> >> Also, we have one inconvenient restriction: vmnet.framework interfaces
> >> can create only privileged user:
> >> `$ sudo qemu-system-x86_64 -nic vmnet-shared`
> >>
> >> Attempt of `vmnet-*` netdev creation being unprivileged user fails with
> >> vmnet's 'general failure'.
> >>
> >> This happens because vmnet.framework requires `com.apple.vm.networking`
> >> entitlement which is: "restricted to developers of virtualization
> >> software.
> >> To request this entitlement, contact your Apple representative." as
> >> Apple
> >> documentation says:
> >>
> https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_vm_networking
> >>
> >>
> >> One more note: we still have quite useful but not supported
> >> 'vmnet.framework' features as creating port forwarding rules, IPv6
> >> NAT prefix specifying and so on.
> >>
> >> Nevertheless, new backends work fine and tested within
> >> `qemu-system-x86-64`
> >> on macOS Bir Sur 11.5.2 host with such nic models:
> >>    * e1000-82545em
> >>    * virtio-net-pci
> >>    * vmxnet3
> >>
> >> The guests were:
> >>    * macOS 10.15.7
> >>    * Ubuntu Bionic (server cloudimg)
> >>
> >>
> >> This series partially reuses patches by Phillip Tennen:
> >> https://patchew.org/QEMU/20210218134947.1860-1-phillip.ennen@gmail.com/
> >> So I included them signed-off line into one of the commit messages and
> >> also here.
> >
> >
> > Applied.
> >
> > Thanks
>
>
> Reverted actually, though it can be built on macos but not Linux. I see
> thing like:
>
> In file included from qapi/qapi-types-net.c:15:
> qapi/qapi-types-net.h:411:9: error: unknown type name
> ‘NetdevVmnetHostOptions’
>    411 |         NetdevVmnetHostOptions vmnet_host;
>        |         ^~~~~~~~~~~~~~~~~~~~~~
> qapi/qapi-types-net.h:412:9: error: unknown type name
> ‘NetdevVmnetSharedOptions’
>    412 |         NetdevVmnetSharedOptions vmnet_shared;
>        |         ^~~~~~~~~~~~~~~~~~~~~~~~
> qapi/qapi-types-net.h:413:9: error: unknown type name
> ‘NetdevVmnetBridgedOptions’
>    413 |         NetdevVmnetBridgedOptions vmnet_bridged;
>        |         ^~~~~~~~~~~~~~~~~~~~~~~~~
>
>
Fixed in v9. There was one more place where
'if': 'CONFIG_VMNET' statement should be added
in the qapi json. Without this malformed qapi sources
were generated.

Not only Linux builds were affected, other non-macOS
platforms also. Sorry for this!

....
>
> Thanks
>
>


-- 
Best Regards,

Vladislav Yaroshchuk

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

      reply	other threads:[~2022-01-07 10:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 10:44 [PATCH v8 0/7] Add vmnet.framework based network backend Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 1/7] net/vmnet: add vmnet dependency and customizable option Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 2/7] net/vmnet: add vmnet backends to qapi/net Vladislav Yaroshchuk
2021-12-13  5:19   ` Markus Armbruster
2021-12-11 10:44 ` [PATCH v8 3/7] net/vmnet: implement shared mode (vmnet-shared) Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 4/7] net/vmnet: implement host mode (vmnet-host) Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 5/7] net/vmnet: implement bridged mode (vmnet-bridged) Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 6/7] net/vmnet: update qemu-options.hx Vladislav Yaroshchuk
2021-12-11 10:44 ` [PATCH v8 7/7] net/vmnet: update MAINTAINERS list Vladislav Yaroshchuk
2021-12-31  3:30 ` [PATCH v8 0/7] Add vmnet.framework based network backend Vladislav Yaroshchuk
2022-01-06  4:18 ` Jason Wang
2022-01-07  5:02   ` Jason Wang
2022-01-07 10:30     ` Vladislav Yaroshchuk [this message]

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='CADO9X9Tr02jN0+bOaJRymjP349bWH1ediNN=fynsPSpmcJBn4Q@mail.gmail.com' \
    --to=yaroshchuk2000@gmail.com \
    --cc=akihiko.odaki@gmail.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hello@adns.io \
    --cc=hsp.cat7@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=phillip.ennen@gmail.com \
    --cc=phillip@axleos.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.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).