From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: [RFC PATCH 03/17] libxl: Handle Linux stubdomain specific QEMU options. Date: Wed, 1 Aug 2018 17:55:39 +0200 Message-ID: <20180801155539.GW1371@mail-itl> References: <1dad6c1a0f8cf4ca4d4f34a0a9762fcdfbc28fa1.1533009377.git-series.marmarek@invisiblethingslab.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0471335319644487939==" Return-path: Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fktTW-0007yp-Au for xen-devel@lists.xenproject.org; Wed, 01 Aug 2018 15:55:46 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: Jason Andryuk Cc: xen-devel , Eric Shelton , Wei Liu , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============0471335319644487939== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZGfVcqCQYT4RlWas" Content-Disposition: inline --ZGfVcqCQYT4RlWas Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 01, 2018 at 10:25:22AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-G=C3=B3recki > wrote: > > From: Eric Shelton > > > > This patch creates an appropriate command line for the QEMU instance > > running in a Linux-based stubdomain. > > > > NOTE: a number of items are not currently implemented for Linux-based > > stubdomains, such as: > > - save/restore > > - QMP socket > > - graphics output (e.g., VNC) > > > > Signed-off-by: Eric Shelton > > > > Simon: > > * fix disk path > > * fix cdrom path and "format" > > * pass downscript for network interfaces > > --- > > > @@ -1099,10 +1118,21 @@ static int libxl__build_device_model_args_new(l= ibxl__gc *gc, > > return ERROR_INVAL; > > } > > if (b_info->u.hvm.serial) { > > - flexarray_vappend(dm_args, > > - "-serial", b_info->u.hvm.serial, NUL= L); > > + if (is_stubdom) { > > + flexarray_vappend(dm_args, > > + "-serial", > > + GCSPRINTF("/dev/hvc%d", STUBDOM_= CONSOLE_SERIAL), > > + NULL); > > + } else { > > + flexarray_vappend(dm_args, > > + "-serial", b_info->u.hvm.serial,= NULL); > > + } > > } else if (b_info->u.hvm.serial_list) { > > char **p; > > + if (is_stubdom) { > > + flexarray_vappend(dm_args, > > + "-serial", "/dev/hvc1", NULL); >=20 > Should this also be GCSPRINTF("/dev/hvc%d", STUBDOM_CONSOLE_SERIAL) > instead of hardcoding hvc1? Yes. Anyway, multiple serial consoles are incompatible with stubdomain anyway - should it error out if serial_list have multiple elements? Or silently ignore others? > > + } > > for (p =3D b_info->u.hvm.serial_list; > > *p; > > p++) { >=20 > >=20 > > @@ -1550,8 +1584,8 @@ static int libxl__build_device_model_args_new(lib= xl__gc *gc, > > > > if (disks[i].is_cdrom) { > > drive =3D libxl__sprintf(gc, > > - "if=3Dide,index=3D%d,readonly=3Don,media=3Dcd= rom,id=3Dide-%i", > > - disk, dev_number); > > + "if=3Dide,readonly=3Don,media=3Dcdrom,id=3Did= e-%i", > > + dev_number); >=20 > What is the impact of dropping index? Leftover from Qubes-specific part of this patch (non-cdrom disks are converted to SCSI for readonly support, dropping index avoids hitting IDE limitation of 4 disks). I'll remove this chunk. > > if (target_path) > > drive =3D libxl__sprintf(gc, "%s,file=3D%s,format= =3D%s", >=20 > Regards, > Jason --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --ZGfVcqCQYT4RlWas Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlth1/sACgkQ24/THMrX 1yyhBQgAlqkUpbv+gLJ6cZhgcH2zjuuOIYhtrki3pqNewoQFhseaMwZN6T12OBss tbDtHnxG+VxRhqteeDdxXw1KJvQmyK/zsDwKco1idJ0loda6ZFDGPBiO7JXnyTEQ Y7xgWorMvgicTynwsw6Dln675scb69B1caOLhpBmIsMtfflrYq8bg0lzKe5gR3Yt lHy4yCqENDda7dqT6v28QRoheTQl4+VJfPJQGz9Q+PYKAQ9ED/UZfMnuooeYoXEw B9pAg4zc2lyidFQbkRjxfibTkbWRtHKbMy7hMVNMZnVTR18f5DGiFsQz78F/BRIj eGoRNc5Gtq/rLvTQzCLNCzD3qMKMug== =Wnno -----END PGP SIGNATURE----- --ZGfVcqCQYT4RlWas-- --===============0471335319644487939== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============0471335319644487939==--