Igor Chubin
2007-May-30 16:09 UTC
[Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
Hello all, I know that the question: Is it possible to run quemu inside Xen domU or run Xen domain 0 on quemu have discussed earlier in this mail list. As far as I remember this is possible except such a configuration where kquemu acceleration is in use. But what about HVM-capable systems? Please tell me are there the same restrictions for the hvm-capable systems? Thank you! -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-May-30 16:10 UTC
RE: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Igor Chubin > Sent: 30 May 2007 17:10 > To: xen-users@lists.xensource.com > Subject: [Xen-users] xen over quemu OR quemu in Xen domU on a > system with HVM-capable CPU > > > > Hello all, > > > I know that the question: > > Is it possible to run quemu inside Xen domU > or run Xen domain 0 on quemu have discussed > earlier in this mail list. > > As far as I remember this is possible > except such a configuration where kquemu acceleration is in use.That is my understading too - kqemu needs to run in Ring 0, which is reserved for the hypervisor under Xen.> > > > But what about HVM-capable systems? > > > Please tell me are there the same restrictions for the > hvm-capable systems?If you load Linux (or such) in HVM mode, you can run kqemu inside that Linux. I''m not entirely sure I understand the advantage of this, compared to running the OS you want to run in QEMU inside a HVM virtual machine in the first place, but yes, it''s possible. -- Mats> > Thank you! > > > -- > WBR, i.m.chubin > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-30 16:10 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> Is it possible to run quemu inside Xen domUYes, but you won''t be able to use the kqemu accelerator module.> or run Xen domain 0 on quemu have discussed > earlier in this mail list.I think that works too, I tested it out briefly and Xen booted inside kqemu. You won''t be able to use HVM-Xen inside Qemu even if your hardware supports it.> But what about HVM-capable systems? > > > Please tell me are there the same restrictions for the hvm-capable systems?You can run probably qemu in an HVM guest. You may even be able to run kqemu in an HVM guest. If you use KVM you might be able to run non-HVM Xen as a guest inside that. You can run non-HVM Xen inside HVM Xen (I do this regularly). Does that cover all the cases you were interested in? Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-30 16:13 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
On Mi, Mai 30, 2007 at 07:09:55 +0300, Igor Chubin wrote:> > > Hello all, > > > I know that the question: > > Is it possible to run quemu inside Xen domU > or run Xen domain 0 on quemu have discussed > earlier in this mail list. > > As far as I remember this is possible > except such a configuration where kquemu acceleration is in use. > > > > But what about HVM-capable systems? > > > Please tell me are there the same restrictions for the hvm-capable systems? >Actually, I want to run quemu + kquemu inside Xen Domain 0 on the HVM-capable system. Is it possible?> Thank you! > > > -- > WBR, i.m.chubin > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-May-30 16:14 UTC
RE: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Igor Chubin > Sent: 30 May 2007 17:13 > To: Igor Chubin > Cc: xen-users@lists.xensource.com > Subject: Re: [Xen-users] xen over quemu OR quemu in Xen domU > on a system with HVM-capable CPU > > On Mi, Mai 30, 2007 at 07:09:55 +0300, Igor Chubin wrote: > > > > > > Hello all, > > > > > > I know that the question: > > > > Is it possible to run quemu inside Xen domU > > or run Xen domain 0 on quemu have discussed > > earlier in this mail list. > > > > As far as I remember this is possible > > except such a configuration where kquemu acceleration is in use. > > > > > > > > But what about HVM-capable systems? > > > > > > Please tell me are there the same restrictions for the > hvm-capable systems? > > > > > > > Actually, I want to run > > quemu + kquemu inside Xen Domain 0 on the HVM-capable system.No, because kqemu is still requiring access to ring 0 protection level (that''s the highest privilege level), which is still not available to anything other than the hypvervisor itself - you can get a "different" ring 0 for guest domains, but that''s not in Dom0. So the answer to this question is the same as for non-HVM capable systems. I still don''t quite understand what the purpose of running kqemu on top of a HVM-capable system is, as it''s almost certain to be no faster than running a HVM domain itself. It may not be FASTER to run the HVM domain either - depending on what''s going on in the domain, but most cases it probably is. -- Mats> > Is it possible? > > > > Thank you! > > > > > > -- > > WBR, i.m.chubin > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > -- > WBR, i.m.chubin > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-30 16:32 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
...> > But what about HVM-capable systems? > > > > > > Please tell me are there the same restrictions for the > > hvm-capable systems? > > If you load Linux (or such) in HVM mode, you can run kqemu inside that > Linux. I''m not entirely sure I understand the advantage of this, > compared to running the OS you want to run in QEMU inside a HVM virtual > machine in the first place, but yes, it''s possible. >Mark and Mats, Thank for your answers. My current task is to run as many as possible different operating systems in the same Xen domain 0 on the same machine (HVM-capable machine). Better to run them inside domUs, but if this impossible may be I could run qeumu+kquemu processes inside dom0 (and operating system on them)? +------++------++------++------++------++------+ | ||Win || || || || | |Linux1||(HVM) ||Solaris| OS1 || OS2 || OS3 | +------++------++------++------++------++------+ +------++------++------++------++------++------+ | || || ||quemu+||qemu+ ||qemu+ | | domU || domU || domU ||kquemu||kquemu||kquemu| +------++------++------++------++------++------+ +----------------------------------------------+ | | | Xen domain 0 | +----------------------------------------------+ As far as I know there are problems in running of some legacy operating systems in domU (HVM). I have personally faced problem with (unmodified) FreeBSD 5 (and 6) running in the Xen HVM domU (this problem have discussed here; as far as I remember the problem is related to real mode loader). But I need not only FreeBSD but several other legacy operating systems. Of course, I''m not sure, that this systems will run in quemu, but I want to try.> -- > Mats > > > > Thank you! > > > > > > -- > > WBR, i.m.chubin > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > > > > >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-30 16:34 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
...> > Please tell me are there the same restrictions for the > > hvm-capable systems? > > If you load Linux (or such) in HVM mode, you can run kqemu inside that > Linux. I''m not entirely sure I understand the advantage of this, > compared to running the OS you want to run in QEMU inside a HVM virtual > machine in the first place, but yes, it''s possible.Small addition. Mats, I don''t want to run linux inside domU to run quemu. I want to run quemu and kquemu in Xen domain 0 directly. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-May-30 16:41 UTC
RE: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> -----Original Message----- > From: Igor Chubin [mailto:igor@chub.in] > Sent: 30 May 2007 17:34 > To: Petersson, Mats > Cc: Igor Chubin; xen-users@lists.xensource.com > Subject: Re: [Xen-users] xen over quemu OR quemu in Xen domU > on a system with HVM-capable CPU > > ... > > > Please tell me are there the same restrictions for the > > > hvm-capable systems? > > > > If you load Linux (or such) in HVM mode, you can run kqemu > inside that > > Linux. I''m not entirely sure I understand the advantage of this, > > compared to running the OS you want to run in QEMU inside a > HVM virtual > > machine in the first place, but yes, it''s possible. > > > > Small addition. > > > Mats, I don''t want to run linux inside domU to run quemu. > > I want to run quemu and kquemu in Xen domain 0 directly.Yes, but I still don''t understand why, including after your other explanation about running "as many OS''s as possible", this is better than just running a HVM domain in the first place - HVM domains aren''t VERY resource consuming, and you''ll be running a QEMU-DM or full-QEMU per "guest"[1]. The only advantage I can see is that since QEMU itself is using virtual memory, you could possibly swap a "guest" to disk, which means that you can overcommit the memory. I''m however sceptical that this is a REAL advantage over running a virtual machine with swap in the guest - the swapping within the guest would be much more selective on what gets swapped out, compared to swapping out some "random" bits of the "qemu+data" images. [1] Here I use the term guest in a looser meaning than I normally would do, e.g. a QEMU instance would also count as a guest. -- Mats> > -- > WBR, i.m.chubin > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-30 16:42 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
Igor, Just to clarify> > Actually, I want to run > > > > quemu + kquemu inside Xen Domain 0 on the HVM-capable system.What are you actually trying to achieve here? It would probably help us understand what you wanted to do better if we knew why. Cheers, Mark> No, because kqemu is still requiring access to ring 0 protection level > (that''s the highest privilege level), which is still not available to > anything other than the hypvervisor itself - you can get a "different" > ring 0 for guest domains, but that''s not in Dom0. > > So the answer to this question is the same as for non-HVM capable > systems. > > I still don''t quite understand what the purpose of running kqemu on top > of a HVM-capable system is, as it''s almost certain to be no faster than > running a HVM domain itself. It may not be FASTER to run the HVM domain > either - depending on what''s going on in the domain, but most cases it > probably is. > > -- > Mats > > > Is it possible? > > > > > Thank you! > > > > > > > > > -- > > > WBR, i.m.chubin > > > > > > > > > _______________________________________________ > > > Xen-users mailing list > > > Xen-users@lists.xensource.com > > > http://lists.xensource.com/xen-users > > > > -- > > WBR, i.m.chubin > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-30 22:20 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
On Mi, Mai 30, 2007 at 05:42:37 +0100, Mark Williamson wrote:> Igor, > > Just to clarify > > > > Actually, I want to run > > > > > > quemu + kquemu inside Xen Domain 0 on the HVM-capable system. > > What are you actually trying to achieve here? It would probably help us > understand what you wanted to do better if we knew why.Thank you for your help. And please, excuse me my bad English. I''ll try to clarify what I want. Example. I can run FreeBSD inside quemu, but I can''t run FreeBSD (especially legacy FreeBSD, e.g. FreeBSD 5) inside Xen domain. Even on HVM capable machines. (as far as I know proble is related to loader and big real mode). As far as I can judge analogous problem exists for several other systems. That is there are OS''es which we can run inside quemu but can''t run inside Xen domU. Am I right? Main operating system that I use is Linux. And that is great how Linux runs inside Xen. (As for me, Xen is the best here!) Also there are many good mechanisms and tools to work with Xen infrastructure. I like Xen networking, intelligent config files for domains, Xen live migration, XenAPI and many other Xen features. So I want to find a way to run OSes (inside quemu or any other way) that can not run directly in Xen domUs (even on HVM) simultaneously with normal Xen domUs. Thats my idea. Hope that I have explained it better now. May be, my information is out of date and today absolutely any (x86,legacy) OS can run in Xen domU on an HVM capable machine? -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-30 22:26 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
...> > > > > > Actually, I want to run > > > > quemu + kquemu inside Xen Domain 0 on the HVM-capable system. > > No, because kqemu is still requiring access to ring 0 protection level > (that''s the highest privilege level), which is still not available to > anything other than the hypvervisor itself - you can get a "different" > ring 0 for guest domains, but that''s not in Dom0.So I can run kquemu inside domU but not in dom0? Right? I can get different ring 0 for domUs, and this gives me possibilty to run kquemu inside domUs?> > So the answer to this question is the same as for non-HVM capable > systems. > > I still don''t quite understand what the purpose of running kqemu on top > of a HVM-capable system is, as it''s almost certain to be no faster than > running a HVM domain itself. It may not be FASTER to run the HVM domain > either - depending on what''s going on in the domain, but most cases it > probably is.I have tried to explain what I want in the previous letter. Mats, thank you for your help and for your answers. Your letters really help me to understand Xen better. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-31 01:45 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> Mats, I don''t want to run linux inside domU to run quemu. > > I want to run quemu and kquemu in Xen domain 0 directly.That definitely won''t work, I''m afraid. The only way you''ll ever get kqemu running is on a "native" system, or in an HVM guest (in the latter case, I don''t know how well it''d actually work). Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-31 01:48 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> Thank you for your help. > And please, excuse me my bad English. > > I''ll try to clarify what I want. > > Example. > > I can run FreeBSD inside quemu, but I can''t run FreeBSD > (especially legacy FreeBSD, e.g. FreeBSD 5) > inside Xen domain. > Even on HVM capable machines. > (as far as I know proble is related to loader and big real mode).Ah. I have an AMD-V box that works with FreeBSD 6 OK... Are you running on an Intel VT-x box?> That is there are OS''es which we can run inside quemu but can''t run > inside Xen domU. > > Am I right?Yes, if they mess with things like the big real mode stuff, which aren''t fully emulated at the moment...> So I want to find a way to run OSes (inside quemu or any other way) > that can not run directly in Xen domUs (even on HVM) > simultaneously with normal Xen domUs.> May be, my information is out of date and today absolutely any > (x86,legacy) OS can run in Xen domU on an HVM capable machine?Would the performance of plain Qemu be too slow for you? That would be an easy first step to make... You might find that the KVM virtualiser will support the OSes you want (or not :-/), but that''ll mean you can''t run Xen (except maybe as a KVM guest). Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-31 01:52 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
On Wednesday 30 May 2007, Igor Chubin wrote:> ... > > > > Actually, I want to run > > > > > > quemu + kquemu inside Xen Domain 0 on the HVM-capable system. > > > > No, because kqemu is still requiring access to ring 0 protection level > > (that''s the highest privilege level), which is still not available to > > anything other than the hypvervisor itself - you can get a "different" > > ring 0 for guest domains, but that''s not in Dom0. > > So I can run kquemu inside domU but not in dom0? > Right?In a HVM domU, yes. It should work in principle...> I can get different ring 0 for domUs, > and this gives me possibilty to run kquemu inside domUs?Yes, but the performance might not be great, and I doubt anyone has ever tested that this works! I guess the other thing to consider is whether you''d be better off running something like VMware server, if the freely available solutions don''t fit your needs? Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-31 06:34 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
On Do, Mai 31, 2007 at 02:48:40 +0100, Mark Williamson wrote:> > Thank you for your help. > > And please, excuse me my bad English. > > > > I''ll try to clarify what I want. > > > > Example. > > > > I can run FreeBSD inside quemu, but I can''t run FreeBSD > > (especially legacy FreeBSD, e.g. FreeBSD 5) > > inside Xen domain. > > Even on HVM capable machines. > > (as far as I know proble is related to loader and big real mode). > > Ah. I have an AMD-V box that works with FreeBSD 6 OK... Are you running on > an Intel VT-x box? >Yes. At this moment I use Intel VT-x box for my experiments (Hewlett-Packard DL380 G5 to be more precise). But I can change my hardware if I''ll have good reasons for this. The fact that FreeBSD runs in Xen domU''s on hosts with AMD CPUs, but not run on hosts with Intel CPUs is very serious, as for me. (May it be that the main reason why FreeBSD runs on one system [AMD] but does not want to run on another [Intel] is not CPU, but BIOS or something else?)> > That is there are OS''es which we can run inside quemu but can''t run > > inside Xen domU. > > > > Am I right? > > Yes, if they mess with things like the big real mode stuff, which aren''t fully > emulated at the moment... > > > So I want to find a way to run OSes (inside quemu or any other way) > > that can not run directly in Xen domUs (even on HVM) > > simultaneously with normal Xen domUs. > > > May be, my information is out of date and today absolutely any > > (x86,legacy) OS can run in Xen domU on an HVM capable machine? > > Would the performance of plain Qemu be too slow for you? That would be an > easy first step to make...I think that this is the best variant. As far as I understand I can run quemu VMs inside Xen domUs as well as inside dom0.> > You might find that the KVM virtualiser will support the OSes you want (or > not :-/), but that''ll mean you can''t run Xen (except maybe as a KVM guest). >Thank you for this advice, but I want to use Xen. I like some of its features which KVM has not for the present. I look for the additional solution, but not for the alternative. -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-31 06:46 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
...> > So I can run kquemu inside domU but not in dom0? > > Right? > > In a HVM domU, yes. It should work in principle... > > > I can get different ring 0 for domUs, > > and this gives me possibilty to run kquemu inside domUs? > > Yes, but the performance might not be great, and I doubt anyone has ever > tested that this works!I hope I will test and will tell about my results.> > I guess the other thing to consider is whether you''d be better off running > something like VMware server, if the freely available solutions don''t fit > your needs? >No. The scenario I''ve described (many OSes, Xen + quemu) is for experimental purposes. And my main goal in it is to get know more about Xen and its usage (especially in a heterogenous environment). As for production environments, we principally use Linux (and Windows with HVM in several cases) and there are no problems with it.> Cheers, > Mark > > -- > Dave: Just a question. What use is a unicyle with no seat? And no pedals! > Mark: To answer a question with a question: What use is a skateboard? > Dave: Skateboards have wheels. > Mark: My wheel has a wheel!-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-May-31 09:50 UTC
RE: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> -----Original Message----- > From: Igor Chubin [mailto:igor@chub.in] > Sent: 31 May 2007 07:35 > To: Mark Williamson > Cc: xen-users@lists.xensource.com; Igor Chubin; Petersson, Mats > Subject: Re: [Xen-users] xen over quemu OR quemu in Xen domU > on a system with HVM-capable CPU > > On Do, Mai 31, 2007 at 02:48:40 +0100, Mark Williamson wrote: > > > Thank you for your help. > > > And please, excuse me my bad English. > > > > > > I''ll try to clarify what I want. > > > > > > Example. > > > > > > I can run FreeBSD inside quemu, but I can''t run FreeBSD > > > (especially legacy FreeBSD, e.g. FreeBSD 5) > > > inside Xen domain. > > > Even on HVM capable machines. > > > (as far as I know proble is related to loader and big real mode). > > > > Ah. I have an AMD-V box that works with FreeBSD 6 OK... > Are you running on > > an Intel VT-x box? > > > > Yes. > At this moment I use Intel VT-x box for my experiments > (Hewlett-Packard DL380 G5 to be more precise). > > But I can change my hardware if I''ll have good reasons for this. > The fact that FreeBSD runs in Xen domU''s on hosts with AMD CPUs, > but not run on hosts with Intel CPUs is very serious, as for me. > > (May it be that the main reason why FreeBSD runs on one system [AMD] > but does not want to run on another [Intel] is not CPU, but BIOS or > something else?)HVM domains do not use the BIOS in the machine they are running on at all, so any BIOS difference should be completely ignored. In this particular case, I''m pretty sure the reason why it doesn''t work is that Intel''s VT doesn''t support real-mode guests. Instead, they emulate realmode in VM86 mode (so the processor is in protected 32-bit mode, but running 16-bit real-mode style code). This works as long as the instructions aren''t "ring 0" instructions - when these instructions are seen, they trap with a GP-fault. This is then handled in the VMXassist code that emulates the relevant instruction. This is also fine. The problem occurs when a transition is made from real mode to protected mode and back again, where the registers (particular segment registers) need to be preserved - you can''t do that in VM86 mode! So registers set in protected mode are "reset" when re-entering real-mode. This makes "big real mode" tricks fail [big real mode is really just going into protected mode, setting a segment to base=0, limit 0xFFFFFFFF, and returning to real-mode - this allows real-mode code to access all of the first 4GB of memory without any problems, rather than being limited to 1MB]. Big real-mode is used by many boot-loaders. So as a conclusion, the difference here is the internal architecture of the processor. AMD choose the "clever way", I think. -- Mats _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-31 10:55 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
...> > > Ah. I have an AMD-V box that works with FreeBSD 6 OK... > > Are you running on > > > an Intel VT-x box? > > > > > > > Yes. > > At this moment I use Intel VT-x box for my experiments > > (Hewlett-Packard DL380 G5 to be more precise). > > > > But I can change my hardware if I''ll have good reasons for this. > > The fact that FreeBSD runs in Xen domU''s on hosts with AMD CPUs, > > but not run on hosts with Intel CPUs is very serious, as for me. > > > > (May it be that the main reason why FreeBSD runs on one system [AMD] > > but does not want to run on another [Intel] is not CPU, but BIOS or > > something else?) > > HVM domains do not use the BIOS in the machine they are running on at > all, so any BIOS difference should be completely ignored. > > In this particular case, I''m pretty sure the reason why it doesn''t work > is that Intel''s VT doesn''t support real-mode guests. Instead, they > emulate realmode in VM86 mode (so the processor is in protected 32-bit > mode, but running 16-bit real-mode style code). This works as long as > the instructions aren''t "ring 0" instructions - when these instructions > are seen, they trap with a GP-fault. This is then handled in the > VMXassist code that emulates the relevant instruction. This is also > fine. The problem occurs when a transition is made from real mode to > protected mode and back again, where the registers (particular segment > registers) need to be preserved - you can''t do that in VM86 mode! So > registers set in protected mode are "reset" when re-entering real-mode. > This makes "big real mode" tricks fail [big real mode is really just > going into protected mode, setting a segment to base=0, limit > 0xFFFFFFFF, and returning to real-mode - this allows real-mode code to > access all of the first 4GB of memory without any problems, rather than > being limited to 1MB]. Big real-mode is used by many boot-loaders. >Thank you Mats, for this explanation. I was aware that problem with FreeBSD in domU is related to "big real mode", but you gave many interesting details. Question. May I try to use GRUB to load FreeBSD kernel and to circumvent problem with big real mode that I face when use traditional FreeBSD /boot/loader? What do you think about it?> So as a conclusion, the difference here is the internal architecture of > the processor. AMD choose the "clever way", I think. >If I understand you right, there are no problems with running real-mode guests on AMD processors at all? And another question: Does anybody know something about running of such rare (for the present) legacy operating systems, like: * Windows NT 4 * Windows 95/98 * OS/2 and not legacy, but rare (comparing to Windows and Linux) * OpenBSD * MINIX and * Plan 9? (I ask about running named OS as full virtual guests on a host with HVM-capable AMD CPU) Particular question about Plan 9. As far as I know Plan 9 works well as paravirtualized guest in Xen 2. But what about Xen 3?> -- > Mats > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-May-31 11:23 UTC
RE: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> -----Original Message----- > From: Igor Chubin [mailto:igor@chub.in] > Sent: 31 May 2007 11:55 > To: Petersson, Mats > Cc: Igor Chubin; Mark Williamson; xen-users@lists.xensource.com > Subject: Re: [Xen-users] xen over quemu OR quemu in Xen domU > on a system with HVM-capable CPU > > ... > > > > Ah. I have an AMD-V box that works with FreeBSD 6 OK... > > > Are you running on > > > > an Intel VT-x box? > > > > > > > > > > Yes. > > > At this moment I use Intel VT-x box for my experiments > > > (Hewlett-Packard DL380 G5 to be more precise). > > > > > > But I can change my hardware if I''ll have good reasons for this. > > > The fact that FreeBSD runs in Xen domU''s on hosts with AMD CPUs, > > > but not run on hosts with Intel CPUs is very serious, as for me. > > > > > > (May it be that the main reason why FreeBSD runs on one > system [AMD] > > > but does not want to run on another [Intel] is not CPU, > but BIOS or > > > something else?) > > > > HVM domains do not use the BIOS in the machine they are > running on at > > all, so any BIOS difference should be completely ignored. > > > > In this particular case, I''m pretty sure the reason why it > doesn''t work > > is that Intel''s VT doesn''t support real-mode guests. Instead, they > > emulate realmode in VM86 mode (so the processor is in > protected 32-bit > > mode, but running 16-bit real-mode style code). This works > as long as > > the instructions aren''t "ring 0" instructions - when these > instructions > > are seen, they trap with a GP-fault. This is then handled in the > > VMXassist code that emulates the relevant instruction. This is also > > fine. The problem occurs when a transition is made from real mode to > > protected mode and back again, where the registers > (particular segment > > registers) need to be preserved - you can''t do that in VM86 mode! So > > registers set in protected mode are "reset" when > re-entering real-mode. > > This makes "big real mode" tricks fail [big real mode is really just > > going into protected mode, setting a segment to base=0, limit > > 0xFFFFFFFF, and returning to real-mode - this allows > real-mode code to > > access all of the first 4GB of memory without any problems, > rather than > > being limited to 1MB]. Big real-mode is used by many boot-loaders. > > > > Thank you Mats, for this explanation. > > I was aware that problem with FreeBSD in domU > is related to "big real mode", > but you gave many interesting details. > > Question. > May I try to use GRUB to load FreeBSD kernel > and to circumvent problem with big real mode > that I face when use traditional FreeBSD /boot/loader? > What do you think about it? > > > > So as a conclusion, the difference here is the internal > architecture of > > the processor. AMD choose the "clever way", I think. > > > > If I understand you right, > there are no problems with running real-mode guests on > AMD processors at all? > > > And another question: > > Does anybody know something about running of such rare (for the > present) legacy operating systems, like: > > * Windows NT 4I tried this just a few weeks ago. Worked for the limited amount of testing I gave it.> * Windows 95/98I''ve got a disk sitting around, but I''ve not tested it. I spent a few minutes now trying to get it to run, but it seems to not do so - not sure why.> * OS/2I haven''t tested myself, but list-member Trolle Selander is using this combination for commercial purposes.> > and not legacy, but rare (comparing to Windows and Linux) > > * OpenBSD > * MINIX > and > * Plan 9?I haven''t tried any of them. The problem(s) with using "unknown" OS''s is that they may perform operations that aren''t supported by the HVM part of Xen - it''s usually not THAT hard to fix, but it can be sometimes... :-( -- Mats> > (I ask about running named OS as full virtual guests on a host with > HVM-capable AMD CPU) > > > > > Particular question about Plan 9. > As far as I know Plan 9 works well as paravirtualized guest > in Xen 2. > But what about Xen 3? > > > > > > > > > > > -- > > Mats > > > > > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > -- > WBR, i.m.chubin > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-31 15:24 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> and not legacy, but rare (comparing to Windows and Linux) > > * OpenBSD > * MINIX > and > * Plan 9? > > (I ask about running named OS as full virtual guests on a host with > HVM-capable AMD CPU)Not tried any of these as fully virtual guests. However, I''d like to note that Minix was ported (at least partially) to Xen by Ivan Kelly. I think he targetted Xen 2 originally, but he was certainly interested in knowing Xen 3 stuff at the time. OpenBSD has been ported to run on Xen 3, but I''m not sure what the status of that port is. Plan 9''s own website includes a howto for getting Plan 9 natively running on Xen.> Particular question about Plan 9. > As far as I know Plan 9 works well as paravirtualized guest > in Xen 2. > But what about Xen 3?The port was updated for Xen 3 (non-PAE), I have a working install here which I access using Linux drawterm (a Linux implementation of the plan9 network display thingy) - seems fine. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Igor Chubin
2007-May-31 16:34 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
On Do, Mai 31, 2007 at 04:24:30 +0100, Mark Williamson wrote:> > and not legacy, but rare (comparing to Windows and Linux) > > > > * OpenBSD > > * MINIX > > and > > * Plan 9? > > > > (I ask about running named OS as full virtual guests on a host with > > HVM-capable AMD CPU) > > Not tried any of these as fully virtual guests. However, I''d like to note > that Minix was ported (at least partially) to Xen by Ivan Kelly. I think he > targetted Xen 2 originally, but he was certainly interested in knowing Xen 3 > stuff at the time. > > OpenBSD has been ported to run on Xen 3, but I''m not sure what the status of > that port is.Very good news! Thank you. I''ve googled and find this pages: * [http://ropersonline.com/openbsd/xen/openbsd-xen-howto OpenBSD Xen HOWTO] * [http://marc.info/?l=openbsd-misc&m=115020845610220&w=2 HOWTO Run OpenBSD/amd64 port for Xen] May be the links will be useful for somebody.> > Plan 9''s own website includes a howto for getting Plan 9 natively running on > Xen. > > > Particular question about Plan 9. > > As far as I know Plan 9 works well as paravirtualized guest > > in Xen 2. > > But what about Xen 3? > > The port was updated for Xen 3 (non-PAE), I have a working install here which > I access using Linux drawterm (a Linux implementation of the plan9 network > display thingy) - seems fine. >non-PAE? And what about 64 bit hosts? Oh! I forgot GNU/Hurd. As far as I know GNU/Hurd can run as Xen guest? At least I have seen page where described how to use GRUB to run GNU/Hurd in Xen domain [http://osdir.com/ml/boot-loaders.grub.devel/2007-01/msg00002.html]. So I''ve decided that GNU/Hurd can run inside Xen. Am I right?> Cheers, > Mark > > -- > Dave: Just a question. What use is a unicyle with no seat? And no pedals! > Mark: To answer a question with a question: What use is a skateboard? > Dave: Skateboards have wheels. > Mark: My wheel has a wheel!-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-May-31 16:35 UTC
Re: [Xen-users] xen over quemu OR quemu in Xen domU on a system with HVM-capable CPU
> > Plan 9''s own website includes a howto for getting Plan 9 natively running > > on Xen. > > > > > Particular question about Plan 9. > > > As far as I know Plan 9 works well as paravirtualized guest > > > in Xen 2. > > > But what about Xen 3? > > > > The port was updated for Xen 3 (non-PAE), I have a working install here > > which I access using Linux drawterm (a Linux implementation of the plan9 > > network display thingy) - seems fine. > > non-PAE? > > And what about 64 bit hosts?I don''t believe it''ll work on 64-bit either :-( Actually, OpenBSD (and probably other "minority" ports like NetBSD, the development code for FreeBSD, GNU/Hurd) probably expects to run on 32-bit non-PAE as well.> Oh! > I forgot GNU/Hurd. > As far as I know GNU/Hurd can run as Xen guest? > At least I have seen page where described how to use GRUB to run > GNU/Hurd in Xen domain > [http://osdir.com/ml/boot-loaders.grub.devel/2007-01/msg00002.html]. So > I''ve decided that GNU/Hurd can run inside Xen. > > Am I right?Yes, Hurd does can on Xen. I managed to build GNU Mach and boot it on Xen, but haven''t managed to get the Hurd running on top of it. I''ve not heard much about this port for a while, though. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users