* A simple question of CPU emulation in Xen [not found] <COL0-MC1-F16ijYRq7A00088f57@col0-mc1-f16.Col0.hotmail.com> @ 2011-05-13 14:41 ` MaoXiaoyun 2011-05-13 14:51 ` Alan Cox 2011-05-13 23:41 ` James Harper 0 siblings, 2 replies; 10+ messages in thread From: MaoXiaoyun @ 2011-05-13 14:41 UTC (permalink / raw) To: xen devel [-- Attachment #1.1: Type: text/plain, Size: 420 bytes --] Hi : I have a simple question on CPU emulation in Xen. Currently, inside guest, we can see that the CPU information incluing types and frequency is exactly same as physical CPU. Is it possible for Xen(or qemu) to emulate a different type of CPU. That is inside guest, we see a different CPU types? If it is possible, could someone elighten me where to start. Many thanks. [-- Attachment #1.2: Type: text/html, Size: 743 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A simple question of CPU emulation in Xen 2011-05-13 14:41 ` A simple question of CPU emulation in Xen MaoXiaoyun @ 2011-05-13 14:51 ` Alan Cox 2011-05-13 17:39 ` Dan Magenheimer 2011-05-13 23:41 ` James Harper 1 sibling, 1 reply; 10+ messages in thread From: Alan Cox @ 2011-05-13 14:51 UTC (permalink / raw) To: MaoXiaoyun; +Cc: xen devel On Fri, 13 May 2011 22:41:44 +0800 MaoXiaoyun <tinnycloud@hotmail.com> wrote: > > Hi : > > I have a simple question on CPU emulation in Xen. > > Currently, inside guest, we can see that the CPU information incluing types and frequency is exactly > same as physical CPU. Is it possible for Xen(or qemu) to emulate a different type of CPU. That is inside > guest, we see a different CPU types? Qemu supports a huge range of CPU and platform emulations, www.qemu.org. Most of this falls outside of Xen as Qemu doesn't need or benefit from Xen or KVM when doing cross cpu emulation. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-13 14:51 ` Alan Cox @ 2011-05-13 17:39 ` Dan Magenheimer 0 siblings, 0 replies; 10+ messages in thread From: Dan Magenheimer @ 2011-05-13 17:39 UTC (permalink / raw) To: Alan Cox, MaoXiaoyun; +Cc: xen devel > From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] > Subject: Re: [Xen-devel] A simple question of CPU emulation in Xen > > On Fri, 13 May 2011 22:41:44 +0800 > MaoXiaoyun <tinnycloud@hotmail.com> wrote: > > > > > Hi : > > > > I have a simple question on CPU emulation in Xen. > > > > Currently, inside guest, we can see that the CPU information > incluing types and frequency is exactly > > same as physical CPU. Is it possible for Xen(or qemu) to emulate a > different type of CPU. That is inside > > guest, we see a different CPU types? > > Qemu supports a huge range of CPU and platform emulations, > www.qemu.org. > Most of this falls outside of Xen as Qemu doesn't need or benefit from > Xen or KVM when doing cross cpu emulation. Also see "MagiXen: Combining Binary Translation and Virtualization" here: http://www.hpl.hp.com/techreports/2007/HPL-2007-77.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-13 14:41 ` A simple question of CPU emulation in Xen MaoXiaoyun 2011-05-13 14:51 ` Alan Cox @ 2011-05-13 23:41 ` James Harper 2011-05-15 16:48 ` hotmaim 1 sibling, 1 reply; 10+ messages in thread From: James Harper @ 2011-05-13 23:41 UTC (permalink / raw) To: MaoXiaoyun, xen devel > Hi : > > I have a simple question on CPU emulation in Xen. > > Currently, inside guest, we can see that the CPU information incluing > types and frequency is exactly > same as physical CPU. Is it possible for Xen(or qemu) to emulate a different > type of CPU. That is inside > guest, we see a different CPU types? > > If it is possible, could someone elighten me where to start. > Do you want to emulate a completely different platform (eg PPC / alpha / Sparc) or just pretend the cpu is a slightly different flavours (eg running a late model Xeon CPU but emulate a P2)? In a lot of cases you can do the latter by changing some CPUID values in the DomU config to mask the CPU features so the guest thinks it is running on an older model. James ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: A simple question of CPU emulation in Xen 2011-05-13 23:41 ` James Harper @ 2011-05-15 16:48 ` hotmaim 2011-05-16 1:46 ` James Harper 0 siblings, 1 reply; 10+ messages in thread From: hotmaim @ 2011-05-15 16:48 UTC (permalink / raw) To: James Harper; +Cc: xen devel 在 2011-5-14,7:41,"James Harper" <james.harper@bendigoit.com.au> 写道: >> Hi : >> >> I have a simple question on CPU emulation in Xen. >> >> Currently, inside guest, we can see that the CPU information > incluing >> types and frequency is exactly >> same as physical CPU. Is it possible for Xen(or qemu) to emulate a > different >> type of CPU. That is inside >> guest, we see a different CPU types? >> >> If it is possible, could someone elighten me where to start. >> > > Do you want to emulate a completely different platform (eg PPC / alpha / > Sparc) or just pretend the cpu is a slightly different flavours (eg > running a late model Xeon CPU but emulate a P2)? > Thanks, exactly what I want. since cpus are shared along All VMs, so In guest, youn will get lower score if we make tests with Xeon. While higher score is it is pretend to be P2. > In a lot of cases you can do the latter by changing some CPUID values in > the DomU config to mask the CPU features so the guest thinks it is > running on an older model. Could i have the configuration u refer to? In hvm file? Thanks > > James > ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-15 16:48 ` hotmaim @ 2011-05-16 1:46 ` James Harper 2011-05-16 2:11 ` MaoXiaoyun 2011-05-16 8:04 ` Ian Campbell 0 siblings, 2 replies; 10+ messages in thread From: James Harper @ 2011-05-16 1:46 UTC (permalink / raw) To: hotmaim; +Cc: xen devel > > 在 2011-5-14,7:41,"James Harper" <james.harper@bendigoit.com.au> 写道: > > >> Hi : > >> > >> I have a simple question on CPU emulation in Xen. > >> > >> Currently, inside guest, we can see that the CPU information > > incluing > >> types and frequency is exactly > >> same as physical CPU. Is it possible for Xen(or qemu) to emulate a > > different > >> type of CPU. That is inside > >> guest, we see a different CPU types? > >> > >> If it is possible, could someone elighten me where to start. > >> > > > > Do you want to emulate a completely different platform (eg PPC / alpha / > > Sparc) or just pretend the cpu is a slightly different flavours (eg > > running a late model Xeon CPU but emulate a P2)? > > > Thanks, exactly what I want. > since cpus are shared along All VMs, so In guest, youn will get lower score if > we make tests > with Xeon. While higher score is it is pretend to be P2. > > In a lot of cases you can do the latter by changing some CPUID values in > > the DomU config to mask the CPU features so the guest thinks it is > > running on an older model. > > Could i have the configuration u refer to? In hvm file? > Thanks > I did something like this to give my DomU the lowest common feature set between my AMD and Intel based servers for live migration: cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', '1:eax=0x06b1,ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] But I haven't tried it in a while so I can't tell if it still works as it should. I do know that Silverlight won't install with the above because it requires some feature that I've masked out. There are some other examples in the example configs I think. James ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-16 1:46 ` James Harper @ 2011-05-16 2:11 ` MaoXiaoyun 2011-05-16 8:04 ` Ian Campbell 1 sibling, 0 replies; 10+ messages in thread From: MaoXiaoyun @ 2011-05-16 2:11 UTC (permalink / raw) To: james.harper; +Cc: xen devel [-- Attachment #1.1: Type: text/plain, Size: 2268 bytes --] > Subject: RE: [Xen-devel] A simple question of CPU emulation in Xen > Date: Mon, 16 May 2011 11:46:26 +1000 > From: james.harper@bendigoit.com.au > To: tinnycloud@hotmail.com > CC: xen-devel@lists.xensource.com > > > > > 在 2011-5-14,7:41,"James Harper" <james.harper@bendigoit.com.au> 写道: > > > > >> Hi : > > >> > > >> I have a simple question on CPU emulation in Xen. > > >> > > >> Currently, inside guest, we can see that the CPU information > > > incluing > > >> types and frequency is exactly > > >> same as physical CPU. Is it possible for Xen(or qemu) to emulate a > > > different > > >> type of CPU. That is inside > > >> guest, we see a different CPU types? > > >> > > >> If it is possible, could someone elighten me where to start. > > >> > > > > > > Do you want to emulate a completely different platform (eg PPC / alpha / > > > Sparc) or just pretend the cpu is a slightly different flavours (eg > > > running a late model Xeon CPU but emulate a P2)? > > > > > Thanks, exactly what I want. > > since cpus are shared along All VMs, so In guest, youn will get lower score if > > we make tests > > with Xeon. While higher score is it is pretend to be P2. > > > In a lot of cases you can do the latter by changing some CPUID values in > > > the DomU config to mask the CPU features so the guest thinks it is > > > running on an older model. > > > > Could i have the configuration u refer to? In hvm file? > > Thanks > > > > I did something like this to give my DomU the lowest common feature set between my AMD and Intel based servers for live migration: > > cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > '1:eax=0x06b1,ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', > '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] > > But I haven't tried it in a while so I can't tell if it still works as it should. I do know that Silverlight won't install with the above because it requires some feature that I've masked out. > > There are some other examples in the example configs I think. I've tried a little bit, it still works. I'll take a look CPUID configuration in detail myself. Many thanks. > > James [-- Attachment #1.2: Type: text/html, Size: 2974 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-16 1:46 ` James Harper 2011-05-16 2:11 ` MaoXiaoyun @ 2011-05-16 8:04 ` Ian Campbell 2011-05-19 2:15 ` MaoXiaoyun 1 sibling, 1 reply; 10+ messages in thread From: Ian Campbell @ 2011-05-16 8:04 UTC (permalink / raw) To: James Harper; +Cc: hotmaim, xen devel > > Could i have the configuration u refer to? In hvm file? > I did something like this to give my DomU the lowest common feature > set between my AMD and Intel based servers for live migration: > > cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > '1:eax=0x06b1,ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', > '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] > In addition to this xend syntax xl in 4.1 and later supports a more friendly syntax, described in the commit message for 22217:27c01a2e2a47. Ian. > But I haven't tried it in a while so I can't tell if it still works as > it should. I do know that Silverlight won't install with the above > because it requires some feature that I've masked out. > > There are some other examples in the example configs I think. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-16 8:04 ` Ian Campbell @ 2011-05-19 2:15 ` MaoXiaoyun 2011-05-19 6:21 ` Ian Campbell 0 siblings, 1 reply; 10+ messages in thread From: MaoXiaoyun @ 2011-05-19 2:15 UTC (permalink / raw) To: ian.campbell, james.harper; +Cc: xen devel [-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --] > Subject: RE: [Xen-devel] A simple question of CPU emulation in Xen > From: Ian.Campbell@citrix.com > To: james.harper@bendigoit.com.au > CC: tinnycloud@hotmail.com; xen-devel@lists.xensource.com > Date: Mon, 16 May 2011 09:04:15 +0100 > > > > > Could i have the configuration u refer to? In hvm file? > > > I did something like this to give my DomU the lowest common feature > > set between my AMD and Intel based servers for live migration: > > > > cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > > '1:eax=0x06b1,ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', > > '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > > '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] > > > > In addition to this xend syntax xl in 4.1 and later supports a more > friendly syntax, described in the commit message for 22217:27c01a2e2a47. > > Ian. > Thanks Ian. Will these impact domU performance behavior if I give a diffrernet CPU type and othere configurations(such as frequency, doubt this is supported)? > > But I haven't tried it in a while so I can't tell if it still works as > > it should. I do know that Silverlight won't install with the above > > because it requires some feature that I've masked out. > > > > There are some other examples in the example configs I think. > > [-- Attachment #1.2: Type: text/html, Size: 1810 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: A simple question of CPU emulation in Xen 2011-05-19 2:15 ` MaoXiaoyun @ 2011-05-19 6:21 ` Ian Campbell 0 siblings, 0 replies; 10+ messages in thread From: Ian Campbell @ 2011-05-19 6:21 UTC (permalink / raw) To: MaoXiaoyun; +Cc: xen, james.harper@bendigoit.com.au, devel On Thu, 2011-05-19 at 03:15 +0100, MaoXiaoyun wrote: > > > > Subject: RE: [Xen-devel] A simple question of CPU emulation in Xen > > From: Ian.Campbell@citrix.com > > To: james.harper@bendigoit.com.au > > CC: tinnycloud@hotmail.com; xen-devel@lists.xensource.com > > Date: Mon, 16 May 2011 09:04:15 +0100 > > > > > > > > Could i have the configuration u refer to? In hvm file? > > > > > I did something like this to give my DomU the lowest common > feature > > > set between my AMD and Intel based servers for live migration: > > > > > > cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > > > > '1:eax=0x06b1,ecx=xxxxxxxxxxx0000xx00xxx0000000xx0,edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', > > > '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', > > > '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] > > > > > > > In addition to this xend syntax xl in 4.1 and later supports a more > > friendly syntax, described in the commit message for > 22217:27c01a2e2a47. > > Will these impact domU performance behavior if I give a diffrernet CPU > type and othere configurations(such as frequency, doubt this is > supported)? This setting purely controls what is reported to the guest, it has no impact on the actual functioning of the hardware. However the guest may make decisions based on this information which could impact performance. One example would be the selection of which memcpy routine to use based on the availability of various generations of SSE or other factors (I think Linux does this). Ian. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-05-19 6:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <COL0-MC1-F16ijYRq7A00088f57@col0-mc1-f16.Col0.hotmail.com>
2011-05-13 14:41 ` A simple question of CPU emulation in Xen MaoXiaoyun
2011-05-13 14:51 ` Alan Cox
2011-05-13 17:39 ` Dan Magenheimer
2011-05-13 23:41 ` James Harper
2011-05-15 16:48 ` hotmaim
2011-05-16 1:46 ` James Harper
2011-05-16 2:11 ` MaoXiaoyun
2011-05-16 8:04 ` Ian Campbell
2011-05-19 2:15 ` MaoXiaoyun
2011-05-19 6:21 ` Ian Campbell
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).