Hi, This patch add the pv guest support for the cpuid configuration and checking. That feature only works for cpuid request which are coming from the guest''s kernel, a process could still call the cpuid directly. A new policy for pv guest has been created in libxc. dom0 cpuid emulation is left hardcoded in Xen. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> -- Jean Guyader _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2008-Jul-13 02:49 UTC
Re: [Xen-devel] [PATCH] cpuid configuration for PV guest
Jean Guyader wrote:> Hi, > > This patch add the pv guest support for the cpuid configuration and > checking. That feature only works for cpuid request which are coming > from the guest''s kernel, a process could still call the cpuid directly. > > A new policy for pv guest has been created in libxc. dom0 cpuid > emulation is left hardcoded in Xen.So at the moment my pv guests are getting all zero back from cpuid. I haven''t updated their config files at all. Is that the expected behaviour? It seems a bit unfriendly; I would have expected it to default to the old behaviour with no config in place. Hm, or maybe something else is going wrong? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2008-Jul-13 06:00 UTC
Re: [Xen-devel] [PATCH] cpuid configuration for PV guest
Jeremy Fitzhardinge wrote:> Hm, or maybe something else is going wrong?Yep. Turns out a build problem in the new qemu was preventing the rest of the tools from being built, so the python code wasn''t being updated. So now cpuid is OK, but other stuff is failing... tapdisk? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2008-Jul-13 06:27 UTC
Re: [Xen-devel] [PATCH] cpuid configuration for PV guest
Jeremy Fitzhardinge wrote:> but other stuff is failing... tapdisk?No, pvfb. Hm. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Jul-14 07:12 UTC
Re: [Xen-devel] [PATCH] cpuid configuration for PV guest
On 13/7/08 07:27, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:> Jeremy Fitzhardinge wrote: >> but other stuff is failing... tapdisk? > > No, pvfb. Hm.pvfb is built into qemu now? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Jul-14 09:55 UTC
Re: [Xen-devel] [PATCH] cpuid configuration for PV guest
Keir Fraser, le Mon 14 Jul 2008 08:12:26 +0100, a écrit :> On 13/7/08 07:27, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote: > > > Jeremy Fitzhardinge wrote: > >> but other stuff is failing... tapdisk? > > > > No, pvfb. Hm. > > pvfb is built into qemu now?The back-end part has been merged into qemu for some time yes. Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser wrote:> On 13/7/08 07:27, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote: > > >> Jeremy Fitzhardinge wrote: >> >>> but other stuff is failing... tapdisk? >>> >> No, pvfb. Hm. >> > > pvfb is built into qemu now? >Ah. I compiled qemu with --disable-gcc-check --disable-slirp as had been discussed on the list. But that causes qemu-dm to fail with "Unknown network device: user", because it always uses "user" (slirp) if you don''t define any other net conifg. I did this: --- a/vl.c +++ b/vl.c @@ -8598,9 +8598,10 @@ int main(int argc, char **argv) /* init network clients */ if (nb_net_clients == 0) { /* if no clients, we use a default config */ - net_clients[0] = "nic"; - net_clients[1] = "user"; - nb_net_clients = 2; + net_clients[nb_net_clients++] = "nic"; +#ifdef CONFIG_SLIRP + net_clients[nb_net_clients++] = "user"; +#endif } for(i = 0;i < nb_net_clients; i++) { to fix it. The old qemu code put that whole default net configuration in #ifndef CONFIG_DM. Ian, did you deliberately not do that in the new code, or is it an oversight? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kevin Wolf
2008-Jul-15 08:58 UTC
[Xen-devel] [PATCH] xend: PV machines have no ioemu network
Jeremy Fitzhardinge schrieb:> Keir Fraser wrote: >> On 13/7/08 07:27, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote: >> >> >>> Jeremy Fitzhardinge wrote: >>> >>>> but other stuff is failing... tapdisk? >>>> >>> No, pvfb. Hm. >>> >> >> pvfb is built into qemu now? >> > > Ah. I compiled qemu with --disable-gcc-check --disable-slirp as had > been discussed on the list. But that causes qemu-dm to fail with > "Unknown network device: user", because it always uses "user" (slirp) > if you don''t define any other net conifg. > > I did this: > > --- a/vl.c > +++ b/vl.c > @@ -8598,9 +8598,10 @@ int main(int argc, char **argv) > /* init network clients */ > if (nb_net_clients == 0) { > /* if no clients, we use a default config */ > - net_clients[0] = "nic"; > - net_clients[1] = "user"; > - nb_net_clients = 2; > + net_clients[nb_net_clients++] = "nic"; > +#ifdef CONFIG_SLIRP > + net_clients[nb_net_clients++] = "user"; > +#endif > } > > for(i = 0;i < nb_net_clients; i++) { > > to fix it. The old qemu code put that whole default net configuration > in #ifndef CONFIG_DM. Ian, did you deliberately not do that in the new > code, or is it an oversight?Ians wants to keep changes from upstream qemu as small as possible in those files shared with qemu. I think this is the main reason why he didn''t do it, and as long as slirp was compiled it just worked. Additionally, specifying no -net parameter always meant -net nic -net user for qemu, so we would not only change common code, but also the semantics of the command line parameters. I think this is even worse. The right thing to do is to specify -net none from xend, IMHO. Kevin xend: PV machines have no ioemu network In the command line parameters of qemu-dm, xend should specify -net none for PV machines. qemu-dm will assume -net nic -net user otherwise, which fails now because slirp is no longer compiled in. Signed-off-by: Kevin Wolf <kwolf@suse.de> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2008-Jul-15 15:01 UTC
[Xen-devel] Re: [PATCH] xend: PV machines have no ioemu network
Kevin Wolf wrote:> Ians wants to keep changes from upstream qemu as small as possible in > those files shared with qemu. I think this is the main reason why he > didn''t do it, and as long as slirp was compiled it just worked. > > Additionally, specifying no -net parameter always meant -net nic -net > user for qemu, so we would not only change common code, but also the > semantics of the command line parameters. I think this is even worse. >If you''ve disabled slirp then "-net user" doesn''t work; it would be pretty silly for qemu to default to using "-net user" if it can''t possibly work. I think my patch is a bugfix for base qemu.> The right thing to do is to specify -net none from xend, IMHO. >Yes, that makes sense anyway.> Kevin > > > xend: PV machines have no ioemu network > > In the command line parameters of qemu-dm, xend should specify -net none > for PV machines. qemu-dm will assume -net nic -net user otherwise, which > fails now because slirp is no longer compiled in. > > Signed-off-by: Kevin Wolf <kwolf@suse.de> >J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge writes ("qemu-dm without slirp"):> +#ifdef CONFIG_SLIRP > + net_clients[nb_net_clients++] = "user"; > +#endifI agree with this and I think it should go upstream. For now I''ve applied it to my `qemu'' branch (and pulled it into master) and I''ll go an d talk to upstream about it. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kevin Wolf
2008-Jul-15 16:44 UTC
[Xen-devel] Re: [PATCH] xend: PV machines have no ioemu network
Jeremy Fitzhardinge schrieb:> Kevin Wolf wrote: >> Ians wants to keep changes from upstream qemu as small as possible in >> those files shared with qemu. I think this is the main reason why he >> didn''t do it, and as long as slirp was compiled it just worked. >> >> Additionally, specifying no -net parameter always meant -net nic -net >> user for qemu, so we would not only change common code, but also the >> semantics of the command line parameters. I think this is even worse. >> > > If you''ve disabled slirp then "-net user" doesn''t work; it would be > pretty silly for qemu to default to using "-net user" if it can''t > possibly work. I think my patch is a bugfix for base qemu.Agreed. If you submit it to upstream qemu, it''s a proper fix. Kevin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel