* HVM hypercalls @ 2010-07-28 19:22 Ruslan Nikolaev 2010-07-29 1:05 ` Dan Magenheimer 2010-07-29 7:30 ` Juergen Gross 0 siblings, 2 replies; 20+ messages in thread From: Ruslan Nikolaev @ 2010-07-28 19:22 UTC (permalink / raw) To: xen-devel Hi I need to use hypercalls from HVM domain (e.g. HYPERVISOR_add_to_physmap). However, it does not work when I am trying to invoke it from HVM Linux guest. Basically, I don't see that anything happens on hypervisor's side. I also grep'ed the guest code for 'vmmcall'/'vmcall' and did not find anything. Is it possible to do it at all? Is it possible to make hypercalls from HVM domains or are they simply used for tools responsible to load HVM domain? Also, are they allowed (if allowed at all) from stubdom, ioemu, or both configurations? I am using latest Xen version (xen-4.0.1-rc). I also tried both official Linux distribution as an HVM domain and the version from Xen repositary. The computer has Nehalem processor with VMX. Thanks, Ruslan. ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: HVM hypercalls 2010-07-28 19:22 HVM hypercalls Ruslan Nikolaev @ 2010-07-29 1:05 ` Dan Magenheimer 2010-07-29 7:30 ` Juergen Gross 1 sibling, 0 replies; 20+ messages in thread From: Dan Magenheimer @ 2010-07-29 1:05 UTC (permalink / raw) To: Ruslan Nikolaev, xen-devel Xen only allows certain hypercalls from an HVM guest and the list is kept in tables in arch/x86/hvm/hvm.c. See http://xenbits.xensource.com/xen-unstable.hg?rev/72c6228b5f0f for an example of adding an existing hypercall so that it will be sent through to Xen. Note that there is no guarantee that any particular hypercall will work properly from an HVM guest... this is just the mechanism for getting a hypercall to be allowed by Xen. > -----Original Message----- > From: Ruslan Nikolaev [mailto:nruslan_devel@yahoo.com] > Sent: Wednesday, July 28, 2010 1:23 PM > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] HVM hypercalls > > Hi > > I need to use hypercalls from HVM domain (e.g. > HYPERVISOR_add_to_physmap). However, it does not work when I am trying > to invoke it from HVM Linux guest. Basically, I don't see that anything > happens on hypervisor's side. I also grep'ed the guest code for > 'vmmcall'/'vmcall' and did not find anything. Is it possible to do it > at all? Is it possible to make hypercalls from HVM domains or are they > simply used for tools responsible to load HVM domain? Also, are they > allowed (if allowed at all) from stubdom, ioemu, or both > configurations? > > I am using latest Xen version (xen-4.0.1-rc). I also tried both > official Linux distribution as an HVM domain and the version from Xen > repositary. The computer has Nehalem processor with VMX. > > Thanks, > Ruslan. > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-28 19:22 HVM hypercalls Ruslan Nikolaev 2010-07-29 1:05 ` Dan Magenheimer @ 2010-07-29 7:30 ` Juergen Gross 2010-07-29 18:55 ` Ruslan Nikolaev 2011-05-23 7:48 ` veeruyours 1 sibling, 2 replies; 20+ messages in thread From: Juergen Gross @ 2010-07-29 7:30 UTC (permalink / raw) To: Ruslan Nikolaev; +Cc: xen-devel On 07/28/2010 09:22 PM, Ruslan Nikolaev wrote: > Hi > > I need to use hypercalls from HVM domain (e.g. HYPERVISOR_add_to_physmap). However, it does not work when I am trying to invoke it from HVM Linux guest. Basically, I don't see that anything happens on hypervisor's side. I also grep'ed the guest code for 'vmmcall'/'vmcall' and did not find anything. Is it possible to do it at all? Is it possible to make hypercalls from HVM domains or are they simply used for tools responsible to load HVM domain? Also, are they allowed (if allowed at all) from stubdom, ioemu, or both configurations? > > I am using latest Xen version (xen-4.0.1-rc). I also tried both official Linux distribution as an HVM domain and the version from Xen repositary. The computer has Nehalem processor with VMX. This should work. We are using hypercalls from HVM domains without any problem on xen 3.3 and 4.0, one of them being HYPERVISOR_add_to_physmap. There must be something you are doing wrong. The following steps are required: - use the cpuid instruction to search for Xen signature. You should begin with index 0x40000000 and look for the text "XenVMMXenVMM" in the returned registers ebx, ecx and edx. Increment the index by 0x100 up to 0x40001000 if necessary. - get the xen msr register number via cpuid with index 0x40000x002 (x from step 1). The msr register number will be in register ebx. - write the physical address of a 4k page to the obtained msr register via wrmsr. This page will be used by the hypervisor to write the appropriate code for the hypercalls to. - each entry in that page occupies 32 bytes. You can do a specific hypercall by calling the function at the specific entry with the hypercall number as index Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-29 7:30 ` Juergen Gross @ 2010-07-29 18:55 ` Ruslan Nikolaev 2010-07-29 19:47 ` Jeremy Fitzhardinge 2011-05-23 7:48 ` veeruyours 1 sibling, 1 reply; 20+ messages in thread From: Ruslan Nikolaev @ 2010-07-29 18:55 UTC (permalink / raw) To: xen-devel Thank you very much! I'll try this. BTW is it required to do this for every module with HVM hypercalls or there is some shared initialization code in HVM guest (Linux) similar to one used in paravirtualized guests? If it's supposed to be in a module, is there any good example I can look at? AFAIK hypercall_page is being initialized on Xen side with appropriate vmcall/vmmcall code. Is this CPUID mechanism a standard way to obtain hypercall_page reference on HVM domain? Thank you! Ruslan. --- On Thu, 7/29/10, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote: > From: Juergen Gross <juergen.gross@ts.fujitsu.com> > Subject: Re: [Xen-devel] HVM hypercalls > To: "Ruslan Nikolaev" <nruslan_devel@yahoo.com> > Cc: xen-devel@lists.xensource.com > Date: Thursday, July 29, 2010, 11:30 AM > On 07/28/2010 09:22 PM, Ruslan > Nikolaev wrote: > > Hi > > > > I need to use hypercalls from HVM domain (e.g. > HYPERVISOR_add_to_physmap). However, it does not work when I > am trying to invoke it from HVM Linux guest. Basically, I > don't see that anything happens on hypervisor's side. I also > grep'ed the guest code for 'vmmcall'/'vmcall' and did not > find anything. Is it possible to do it at all? Is it > possible to make hypercalls from HVM domains or are they > simply used for tools responsible to load HVM domain? Also, > are they allowed (if allowed at all) from stubdom, ioemu, or > both configurations? > > > > I am using latest Xen version (xen-4.0.1-rc). I also > tried both official Linux distribution as an HVM domain and > the version from Xen repositary. The computer has Nehalem > processor with VMX. > > This should work. > We are using hypercalls from HVM domains without any > problem on xen 3.3 and > 4.0, one of them being HYPERVISOR_add_to_physmap. There > must be something > you are doing wrong. > > The following steps are required: > > - use the cpuid instruction to search for Xen signature. > You should begin with > index 0x40000000 and look for the text > "XenVMMXenVMM" in the returned > registers ebx, ecx and edx. Increment the index by > 0x100 up to 0x40001000 if > necessary. > - get the xen msr register number via cpuid with index > 0x40000x002 (x from > step 1). The msr register number will be in register > ebx. > - write the physical address of a 4k page to the obtained > msr register via > wrmsr. This page will be used by the hypervisor to > write the appropriate > code for the hypercalls to. > - each entry in that page occupies 32 bytes. You can do a > specific hypercall > by calling the function at the specific entry with > the hypercall number as > index > > > Juergen > > -- Juergen Gross > Principal Developer Operating > Systems > TSP ES&S SWE OS6 > > Telephone: +49 (0) 89 3222 2967 > Fujitsu Technology Solutions > e-mail: juergen.gross@ts.fujitsu.com > Domagkstr. 28 > > Internet: ts.fujitsu.com > D-80807 Muenchen > Company details: > ts.fujitsu.com/imprint.html > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-29 18:55 ` Ruslan Nikolaev @ 2010-07-29 19:47 ` Jeremy Fitzhardinge 2010-07-30 16:06 ` Ruslan Nikolaev 0 siblings, 1 reply; 20+ messages in thread From: Jeremy Fitzhardinge @ 2010-07-29 19:47 UTC (permalink / raw) To: Ruslan Nikolaev; +Cc: xen-devel On 07/29/2010 11:55 AM, Ruslan Nikolaev wrote: > Thank you very much! I'll try this. BTW is it required to do this for every module with HVM hypercalls or there is some shared initialization code in HVM guest (Linux) similar to one used in paravirtualized guests? > > If it's supposed to be in a module, is there any good example I can look at? > > AFAIK hypercall_page is being initialized on Xen side with appropriate vmcall/vmmcall code. Is this CPUID mechanism a standard way to obtain hypercall_page reference on HVM domain? What kernel are you working with? There's already code to implement pv-on-hvm support for various recent pvops kernels, so you can just base your work on those. J ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-29 19:47 ` Jeremy Fitzhardinge @ 2010-07-30 16:06 ` Ruslan Nikolaev 2010-07-31 0:07 ` Jeremy Fitzhardinge 0 siblings, 1 reply; 20+ messages in thread From: Ruslan Nikolaev @ 2010-07-30 16:06 UTC (permalink / raw) To: xen-devel I have 2 kernels: 1. From Xen repositary pvops-git (2.6.31.13). 2. From kernel.org: 2.6.32.16 Thank you! Ruslan. --- On Thu, 7/29/10, Jeremy Fitzhardinge <jeremy@goop.org> wrote: > From: Jeremy Fitzhardinge <jeremy@goop.org> > Subject: Re: [Xen-devel] HVM hypercalls > To: "Ruslan Nikolaev" <nruslan_devel@yahoo.com> > Cc: xen-devel@lists.xensource.com > Date: Thursday, July 29, 2010, 11:47 PM > On 07/29/2010 11:55 AM, Ruslan > Nikolaev wrote: > > Thank you very much! I'll try this. BTW is it required > to do this for every module with HVM hypercalls or there is > some shared initialization code in HVM guest (Linux) similar > to one used in paravirtualized guests? > > > > If it's supposed to be in a module, is there any good > example I can look at? > > > > AFAIK hypercall_page is being initialized on Xen side > with appropriate vmcall/vmmcall code. Is this CPUID > mechanism a standard way to obtain hypercall_page reference > on HVM domain? > > What kernel are you working with? There's already > code to implement pv-on-hvm support for various recent pvops > kernels, so you can just base your work on those. > > J > > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-30 16:06 ` Ruslan Nikolaev @ 2010-07-31 0:07 ` Jeremy Fitzhardinge 2010-08-03 19:48 ` Ruslan Nikolaev 0 siblings, 1 reply; 20+ messages in thread From: Jeremy Fitzhardinge @ 2010-07-31 0:07 UTC (permalink / raw) To: Ruslan Nikolaev; +Cc: xen-devel On 07/30/2010 09:06 AM, Ruslan Nikolaev wrote: > I have 2 kernels: > > 1. From Xen repositary pvops-git (2.6.31.13). You want 2.6.32.16 from xen.git - the branch is xen/stable-2.6.32.x J > 2. From kernel.org: 2.6.32.16 > > Thank you! > Ruslan. > > > --- On Thu, 7/29/10, Jeremy Fitzhardinge<jeremy@goop.org> wrote: > >> From: Jeremy Fitzhardinge<jeremy@goop.org> >> Subject: Re: [Xen-devel] HVM hypercalls >> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> >> Cc: xen-devel@lists.xensource.com >> Date: Thursday, July 29, 2010, 11:47 PM >> On 07/29/2010 11:55 AM, Ruslan >> Nikolaev wrote: >>> Thank you very much! I'll try this. BTW is it required >> to do this for every module with HVM hypercalls or there is >> some shared initialization code in HVM guest (Linux) similar >> to one used in paravirtualized guests? >>> If it's supposed to be in a module, is there any good >> example I can look at? >>> AFAIK hypercall_page is being initialized on Xen side >> with appropriate vmcall/vmmcall code. Is this CPUID >> mechanism a standard way to obtain hypercall_page reference >> on HVM domain? >> >> What kernel are you working with? There's already >> code to implement pv-on-hvm support for various recent pvops >> kernels, so you can just base your work on those. >> >> J >> >> > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-31 0:07 ` Jeremy Fitzhardinge @ 2010-08-03 19:48 ` Ruslan Nikolaev 2010-08-03 21:40 ` Jeremy Fitzhardinge 0 siblings, 1 reply; 20+ messages in thread From: Ruslan Nikolaev @ 2010-08-03 19:48 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: xen-devel I've just tried to configure newever version (2.6.32.16) from repositary. However, boot fails because no root device is found. I am using disk image (the line in HVM config is disk = [ 'file:/home/ruslan/fs1.img,hda,w' ]) I also tried to compile kernel with 'blktap' driver which is disabled in default kernel config, but it does not help. The previous version (2.6.31.13) worked fine with the same disk image and default configuration. Thanks, Ruslan. --- On Sat, 7/31/10, Jeremy Fitzhardinge <jeremy@goop.org> wrote: > From: Jeremy Fitzhardinge <jeremy@goop.org> > Subject: Re: [Xen-devel] HVM hypercalls > To: "Ruslan Nikolaev" <nruslan_devel@yahoo.com> > Cc: xen-devel@lists.xensource.com > Date: Saturday, July 31, 2010, 4:07 AM > On 07/30/2010 09:06 AM, Ruslan > Nikolaev wrote: > > I have 2 kernels: > > > > 1. From Xen repositary pvops-git (2.6.31.13). > > You want 2.6.32.16 from xen.git - the branch is > xen/stable-2.6.32.x > > J > > > 2. From kernel.org: 2.6.32.16 > > > > Thank you! > > Ruslan. > > > > > > --- On Thu, 7/29/10, Jeremy Fitzhardinge<jeremy@goop.org> > wrote: > > > >> From: Jeremy Fitzhardinge<jeremy@goop.org> > >> Subject: Re: [Xen-devel] HVM hypercalls > >> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> > >> Cc: xen-devel@lists.xensource.com > >> Date: Thursday, July 29, 2010, 11:47 PM > >> On 07/29/2010 11:55 AM, Ruslan > >> Nikolaev wrote: > >>> Thank you very much! I'll try this. BTW is it > required > >> to do this for every module with HVM hypercalls or > there is > >> some shared initialization code in HVM guest > (Linux) similar > >> to one used in paravirtualized guests? > >>> If it's supposed to be in a module, is there > any good > >> example I can look at? > >>> AFAIK hypercall_page is being initialized on > Xen side > >> with appropriate vmcall/vmmcall code. Is this > CPUID > >> mechanism a standard way to obtain hypercall_page > reference > >> on HVM domain? > >> > >> What kernel are you working with? There's > already > >> code to implement pv-on-hvm support for various > recent pvops > >> kernels, so you can just base your work on those. > >> > >> J > >> > >> > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-08-03 19:48 ` Ruslan Nikolaev @ 2010-08-03 21:40 ` Jeremy Fitzhardinge 2010-08-04 17:41 ` Ruslan Nikolaev 0 siblings, 1 reply; 20+ messages in thread From: Jeremy Fitzhardinge @ 2010-08-03 21:40 UTC (permalink / raw) To: Ruslan Nikolaev; +Cc: xen-devel On 08/03/2010 12:48 PM, Ruslan Nikolaev wrote: > I've just tried to configure newever version (2.6.32.16) from repositary. However, boot fails because no root device is found. I am using disk image (the line in HVM config is disk = [ 'file:/home/ruslan/fs1.img,hda,w' ]) > I also tried to compile kernel with 'blktap' driver which is disabled in default kernel config, but it does not help. What is your root= parameter? If you're using pv-on-hvm drivers, then the device will be named /dev/xvd[a-d] (for the moment). It's very strongly recommended that you don't use a device-based root name (ie, use LABEL= UUID= or LVM for your root device) so that your config is failsafe against root device name changes. J > The previous version (2.6.31.13) worked fine with the same disk image and default configuration. > > Thanks, > Ruslan. > > --- On Sat, 7/31/10, Jeremy Fitzhardinge<jeremy@goop.org> wrote: > >> From: Jeremy Fitzhardinge<jeremy@goop.org> >> Subject: Re: [Xen-devel] HVM hypercalls >> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> >> Cc: xen-devel@lists.xensource.com >> Date: Saturday, July 31, 2010, 4:07 AM >> On 07/30/2010 09:06 AM, Ruslan >> Nikolaev wrote: >>> I have 2 kernels: >>> >>> 1. From Xen repositary pvops-git (2.6.31.13). >> You want 2.6.32.16 from xen.git - the branch is >> xen/stable-2.6.32.x >> >> J >> >>> 2. From kernel.org: 2.6.32.16 >>> >>> Thank you! >>> Ruslan. >>> >>> >>> --- On Thu, 7/29/10, Jeremy Fitzhardinge<jeremy@goop.org> >> wrote: >>>> From: Jeremy Fitzhardinge<jeremy@goop.org> >>>> Subject: Re: [Xen-devel] HVM hypercalls >>>> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> >>>> Cc: xen-devel@lists.xensource.com >>>> Date: Thursday, July 29, 2010, 11:47 PM >>>> On 07/29/2010 11:55 AM, Ruslan >>>> Nikolaev wrote: >>>>> Thank you very much! I'll try this. BTW is it >> required >>>> to do this for every module with HVM hypercalls or >> there is >>>> some shared initialization code in HVM guest >> (Linux) similar >>>> to one used in paravirtualized guests? >>>>> If it's supposed to be in a module, is there >> any good >>>> example I can look at? >>>>> AFAIK hypercall_page is being initialized on >> Xen side >>>> with appropriate vmcall/vmmcall code. Is this >> CPUID >>>> mechanism a standard way to obtain hypercall_page >> reference >>>> on HVM domain? >>>> >>>> What kernel are you working with? There's >> already >>>> code to implement pv-on-hvm support for various >> recent pvops >>>> kernels, so you can just base your work on those. >>>> >>>> J >>>> >>>> >>> >>> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >>> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > > > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-08-03 21:40 ` Jeremy Fitzhardinge @ 2010-08-04 17:41 ` Ruslan Nikolaev 2010-08-05 7:25 ` Christoph Egger 2010-08-05 10:31 ` Stefano Stabellini 0 siblings, 2 replies; 20+ messages in thread From: Ruslan Nikolaev @ 2010-08-04 17:41 UTC (permalink / raw) To: xen-devel; +Cc: Jeremy Fitzhardinge Yes, I tried this but it does not seem to work. BTW in paravirtualized mode it works fine, the problem is only with HVM. I tried to specify root=/dev/xvda (my disk image has no partitions, entire disk image is a single file system). My config is (I also tried to comment out device model but it does not help): import os, re arch = os.uname()[4] if re.search('64', arch): arch_libdir = 'lib64' else: arch_libdir = 'lib' kernel = "/usr/lib/xen/boot/hvmloader" builder='hvm' vcpus=1 memory = 1024 shadow_memory = 8 name = "xenhvm1" disk = [ 'file:/home/ruslan/fs1.img,xvda,w' ] device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' # boot on floppy (a), hard disk (c) or CD-ROM (d) # default: hard disk, cd-rom, floppy boot="c" sdl=1 vnc=0 vncviewer=0 vncpasswd='' stdvga=1 serial='pty' usbdevice='tablet' Thanks, Ruslan --- On Wed, 8/4/10, Jeremy Fitzhardinge <jeremy@goop.org> wrote: > From: Jeremy Fitzhardinge <jeremy@goop.org> > Subject: Re: [Xen-devel] HVM hypercalls > To: "Ruslan Nikolaev" <nruslan_devel@yahoo.com> > Cc: xen-devel@lists.xensource.com > Date: Wednesday, August 4, 2010, 1:40 AM > On 08/03/2010 12:48 PM, Ruslan > Nikolaev wrote: > > I've just tried to configure newever version > (2.6.32.16) from repositary. However, boot fails because no > root device is found. I am using disk image (the line in HVM > config is disk = [ 'file:/home/ruslan/fs1.img,hda,w' ]) > > I also tried to compile kernel with 'blktap' driver > which is disabled in default kernel config, but it does not > help. > > What is your root= parameter? If you're using > pv-on-hvm drivers, then > the device will be named /dev/xvd[a-d] (for the > moment). It's very > strongly recommended that you don't use a device-based root > name (ie, > use LABEL= UUID= or LVM for your root device) so that your > config is > failsafe against root device name changes. > > J > > > The previous version (2.6.31.13) worked fine with the > same disk image and default configuration. > > > > Thanks, > > Ruslan. > > > > --- On Sat, 7/31/10, Jeremy Fitzhardinge<jeremy@goop.org> > wrote: > > > >> From: Jeremy Fitzhardinge<jeremy@goop.org> > >> Subject: Re: [Xen-devel] HVM hypercalls > >> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> > >> Cc: xen-devel@lists.xensource.com > >> Date: Saturday, July 31, 2010, 4:07 AM > >> On 07/30/2010 09:06 AM, Ruslan > >> Nikolaev wrote: > >>> I have 2 kernels: > >>> > >>> 1. From Xen repositary pvops-git (2.6.31.13). > >> You want 2.6.32.16 from xen.git - the branch is > >> xen/stable-2.6.32.x > >> > >> J > >> > >>> 2. From kernel.org: 2.6.32.16 > >>> > >>> Thank you! > >>> Ruslan. > >>> > >>> > >>> --- On Thu, 7/29/10, Jeremy Fitzhardinge<jeremy@goop.org> > >> wrote: > >>>> From: Jeremy Fitzhardinge<jeremy@goop.org> > >>>> Subject: Re: [Xen-devel] HVM hypercalls > >>>> To: "Ruslan Nikolaev"<nruslan_devel@yahoo.com> > >>>> Cc: xen-devel@lists.xensource.com > >>>> Date: Thursday, July 29, 2010, 11:47 PM > >>>> On 07/29/2010 > 11:55 AM, Ruslan > >>>> Nikolaev wrote: > >>>>> Thank you very much! I'll try this. > BTW is it > >> required > >>>> to do this for every module with HVM > hypercalls or > >> there is > >>>> some shared initialization code in HVM > guest > >> (Linux) similar > >>>> to one used in paravirtualized guests? > >>>>> If it's supposed to be in a module, is > there > >> any good > >>>> example I can look at? > >>>>> AFAIK hypercall_page is being > initialized on > >> Xen side > >>>> with appropriate vmcall/vmmcall code. Is > this > >> CPUID > >>>> mechanism a standard way to obtain > hypercall_page > >> reference > >>>> on HVM domain? > >>>> > >>>> What kernel are you working with? > There's > >> already > >>>> code to implement pv-on-hvm support for > various > >> recent pvops > >>>> kernels, so you can just base your work on > those. > >>>> > >>>> J > >>>> > >>>> > >>> > >>> > >>> > _______________________________________________ > >>> Xen-devel mailing list > >>> Xen-devel@lists.xensource.com > >>> http://lists.xensource.com/xen-devel > >>> > >> > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > >> > > > > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-08-04 17:41 ` Ruslan Nikolaev @ 2010-08-05 7:25 ` Christoph Egger 2010-08-05 10:31 ` Stefano Stabellini 1 sibling, 0 replies; 20+ messages in thread From: Christoph Egger @ 2010-08-05 7:25 UTC (permalink / raw) To: xen-devel; +Cc: Ruslan Nikolaev, Jeremy Fitzhardinge On Wednesday 04 August 2010 19:41:20 Ruslan Nikolaev wrote: > Yes, I tried this but it does not seem to work. BTW in paravirtualized mode > it works fine, the problem is only with HVM. > > I tried to specify root=/dev/xvda (my disk image has no partitions, entire > disk image is a single file system). > > My config is (I also tried to comment out device model but it does not > help): You can simplify your guest config file: > import os, re > arch = os.uname()[4] > if re.search('64', arch): > arch_libdir = 'lib64' > else: > arch_libdir = 'lib' Remove this part. > kernel = "/usr/lib/xen/boot/hvmloader" kernel = "hvmloader" > builder='hvm' > > vcpus=1 > > memory = 1024 > shadow_memory = 8 > name = "xenhvm1" > disk = [ 'file:/home/ruslan/fs1.img,xvda,w' ] > device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' device_model = "qemu-dm" > # boot on floppy (a), hard disk (c) or CD-ROM (d) > # default: hard disk, cd-rom, floppy > boot="c" > > sdl=1 > vnc=0 > vncviewer=0 > vncpasswd='' > stdvga=1 > serial='pty' > usbdevice='tablet' Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-08-04 17:41 ` Ruslan Nikolaev 2010-08-05 7:25 ` Christoph Egger @ 2010-08-05 10:31 ` Stefano Stabellini 1 sibling, 0 replies; 20+ messages in thread From: Stefano Stabellini @ 2010-08-05 10:31 UTC (permalink / raw) To: Ruslan Nikolaev; +Cc: Jeremy Fitzhardinge, xen-devel@lists.xensource.com On Wed, 4 Aug 2010, Ruslan Nikolaev wrote: > Yes, I tried this but it does not seem to work. BTW in paravirtualized mode it works fine, the problem is only with HVM. > > I tried to specify root=/dev/xvda (my disk image has no partitions, entire disk image is a single file system). > If your disk file represents a single partition and in your pv config file you have a disk entry like this one: disk = [ 'file:/home/ruslan/fs1.img,xvda1,w' ] then your disk is not going to work in HVM mode. Qemu must be able to handle your disk otherwise the bootloader won't be able to boot your kernel. > My config is (I also tried to comment out device model but it does not help): > > import os, re > arch = os.uname()[4] > if re.search('64', arch): > arch_libdir = 'lib64' > else: > arch_libdir = 'lib' > remove this part if you are using xl > kernel = "/usr/lib/xen/boot/hvmloader" > > builder='hvm' > > vcpus=1 > > memory = 1024 > shadow_memory = 8 > name = "xenhvm1" > disk = [ 'file:/home/ruslan/fs1.img,xvda,w' ] Even though xvda is currently supported it would be better to specify hda here if you only have one disk, because you need at least an IDE interface to boot. > device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' device_model='qemu-dm' especially if you are using xl ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2010-07-29 7:30 ` Juergen Gross 2010-07-29 18:55 ` Ruslan Nikolaev @ 2011-05-23 7:48 ` veeruyours 2011-05-23 8:22 ` Ian Campbell 1 sibling, 1 reply; 20+ messages in thread From: veeruyours @ 2011-05-23 7:48 UTC (permalink / raw) To: xen-devel Hi, I recently started working on XEN, and I am looking for ways to invoke hypercalls from HVM. I followed your instructions and succeeded in reading MSR register. But when i attempt to write the physical address of a 4K page from my HVM guest (2.6.30 kernel), i observed the XEN hypervisor reporting it as bad GMFN as follows. [root@f13 ~]# xm dmesg -c (XEN) traps.c:664:d17 Bad GMFN ffff88001e925 (MFN ffffffffffffffff) to MSR 40000000 Could you please help me in understanding what went wrong in my implementation. I am running XEN 4.0.1 on AMD 64bit machine with svm support and the dom0 kernel running 2.6.32.39. The Thanks & Regards, VSR. -- View this message in context: http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4418332.html Sent from the Xen - Dev mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Re: HVM hypercalls 2011-05-23 7:48 ` veeruyours @ 2011-05-23 8:22 ` Ian Campbell 2011-05-23 13:52 ` veerasena reddy 0 siblings, 1 reply; 20+ messages in thread From: Ian Campbell @ 2011-05-23 8:22 UTC (permalink / raw) To: veeruyours; +Cc: xen-devel@lists.xensource.com On Mon, 2011-05-23 at 08:48 +0100, veeruyours wrote: > Hi, > > I recently started working on XEN, and I am looking for ways to invoke > hypercalls from HVM. > I followed your instructions and succeeded in reading MSR register. > But when i attempt to write the physical address of a 4K page from my HVM > guest (2.6.30 kernel), i observed the XEN hypervisor reporting it as bad > GMFN as follows. > > [root@f13 ~]# xm dmesg -c > (XEN) traps.c:664:d17 Bad GMFN ffff88001e925 (MFN ffffffffffffffff) to MSR > 40000000 That supposed GMFN (fff88001e925) looks an awful lot like a virtual address and not a physical one to me, unless your guest really has >4TB of RAM assigned... > > Could you please help me in understanding what went wrong in my > implementation. > > I am running XEN 4.0.1 on AMD 64bit machine with svm support and the dom0 > kernel running 2.6.32.39. > > The > Thanks & Regards, > VSR. > > > -- > View this message in context: http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4418332.html > Sent from the Xen - Dev mailing list archive at Nabble.com. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Re: HVM hypercalls 2011-05-23 8:22 ` Ian Campbell @ 2011-05-23 13:52 ` veerasena reddy 2011-05-24 12:06 ` Ian Campbell 0 siblings, 1 reply; 20+ messages in thread From: veerasena reddy @ 2011-05-23 13:52 UTC (permalink / raw) To: Ian Campbell; +Cc: xen-devel@lists.xensource.com [-- Attachment #1.1: Type: text/plain, Size: 3450 bytes --] Hi, Thanks a lot for quick reply. I modified my code to get physical page address and now i do not see error message on XEN hypervisor. Could you please correct if am writing proper physical address or not? We can write the page address to hypervisor using wrmsr() but who should set hypercall_page which is declared as extern in hypercall.h on HVM? Because when i try to invoke HYPERCALL_xxxx(), it reported hypercall_page not declared. Do we need to enable CONFIG_XEN in HVM kernel in order to invoke hypercalls to hypervisor? Could you please share any sample code if you have to get a clear understanding of HVM hypercalls. { char id[13]; unsigned int msr1; unsigned long my_hpage_phys; int my_hpage_lo, my_hpage_hi; __asm__ __volatile__( "cpuid" : "=b" (*(int *)(&id[0])), "=d" (*(int *)(&id[8])), "=c" (*(int *)(&id[4])) : "a" (0x40000000) ); id[12]='\0'; printk("CPU ID read- %s\n", id); /* Read MSR register */ __asm__ __volatile__( "cpuid" : "=b" (*(int *)(&msr1)) : "a" (0x40000002) ); my_hpage_phys = __get_free_page(GFP_ATOMIC); hypercall_page = virt_to_phys(my_hpage_phys); printk("my_hpage_phys get_free = %lx\n", my_hpage_phys); printk("hypercal_page = %p\n", hypercall_page); my_hpage_lo = (unsigned long)hypercall_page & 0xffffffff; my_hpage_hi = (unsigned long)hypercall_page >> 32; printk("my_hpage lo = %x hi = %x\n", my_hpage_lo, my_hpage_hi); /* Write hypercall page address to MSR */ wrmsr(msr1, my_hpage_lo, my_hpage_hi); return 0; } ================= output on HVM ========== [root@localhost src]# dmesg my_hypercall_page @ ffffffffa0388000 CPU ID read- XenVMMXenVMM my_hpage_phys get_free = ffff880005c0b000 hypercal_page = 0000000005c0b000 my_hpage lo = 5c0b000 hi = 0 ============================ Thanks & Regards, VSR. On Mon, May 23, 2011 at 1:52 PM, Ian Campbell <Ian.Campbell@citrix.com>wrote: > On Mon, 2011-05-23 at 08:48 +0100, veeruyours wrote: > > Hi, > > > > I recently started working on XEN, and I am looking for ways to invoke > > hypercalls from HVM. > > I followed your instructions and succeeded in reading MSR register. > > But when i attempt to write the physical address of a 4K page from my HVM > > guest (2.6.30 kernel), i observed the XEN hypervisor reporting it as bad > > GMFN as follows. > > > > [root@f13 ~]# xm dmesg -c > > (XEN) traps.c:664:d17 Bad GMFN ffff88001e925 (MFN ffffffffffffffff) to > MSR > > 40000000 > > That supposed GMFN (fff88001e925) looks an awful lot like a virtual > address and not a physical one to me, unless your guest really has >4TB > of RAM assigned... > > > > > Could you please help me in understanding what went wrong in my > > implementation. > > > > I am running XEN 4.0.1 on AMD 64bit machine with svm support and the dom0 > > kernel running 2.6.32.39. > > > > The > > Thanks & Regards, > > VSR. > > > > > > -- > > View this message in context: > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4418332.html > > Sent from the Xen - Dev mailing list archive at Nabble.com. > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > [-- Attachment #1.2: Type: text/html, Size: 4571 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] 20+ messages in thread
* Re: Re: HVM hypercalls 2011-05-23 13:52 ` veerasena reddy @ 2011-05-24 12:06 ` Ian Campbell 2011-05-24 13:58 ` veeruyours 0 siblings, 1 reply; 20+ messages in thread From: Ian Campbell @ 2011-05-24 12:06 UTC (permalink / raw) To: veerasena reddy; +Cc: xen-devel@lists.xensource.com On Mon, 2011-05-23 at 14:52 +0100, veerasena reddy wrote: > Hi, > > Thanks a lot for quick reply. > > I modified my code to get physical page address and now i do not see > error message on XEN hypervisor. > Could you please correct if am writing proper physical address or not? > > We can write the page address to hypervisor using wrmsr() but who > should set hypercall_page which is declared as extern in hypercall.h > on HVM? Because when i try to invoke HYPERCALL_xxxx(), it reported > hypercall_page not declared. Do we need to enable CONFIG_XEN in HVM > kernel in order to invoke hypercalls to hypervisor? Which kernel are you running with? This should all be taken care of for you in a kernel with PVHVM support enabled. > Could you please share any sample code if you have to get a clear > understanding of HVM hypercalls. > > { > char id[13]; > unsigned int msr1; > unsigned long my_hpage_phys; > int my_hpage_lo, my_hpage_hi; > > __asm__ __volatile__( > "cpuid" > : "=b" (*(int *)(&id[0])), > "=d" (*(int *)(&id[8])), > "=c" (*(int *)(&id[4])) > : "a" (0x40000000) > ); > id[12]='\0'; > printk("CPU ID read- %s\n", id); > > /* Read MSR register */ > __asm__ __volatile__( > "cpuid" > : "=b" (*(int *)(&msr1)) > : "a" (0x40000002) > ); > > my_hpage_phys = __get_free_page(GFP_ATOMIC); > hypercall_page = virt_to_phys(my_hpage_phys); > printk("my_hpage_phys get_free = %lx\n", my_hpage_phys); > printk("hypercal_page = %p\n", hypercall_page); > > my_hpage_lo = (unsigned long)hypercall_page & 0xffffffff; > my_hpage_hi = (unsigned long)hypercall_page >> 32; > printk("my_hpage lo = %x hi = %x\n", my_hpage_lo, > my_hpage_hi); > /* Write hypercall page address to MSR */ > wrmsr(msr1, my_hpage_lo, my_hpage_hi); > > return 0; > } > > ================= output on HVM ========== > [root@localhost src]# dmesg > my_hypercall_page @ ffffffffa0388000 > CPU ID read- XenVMMXenVMM > my_hpage_phys get_free = ffff880005c0b000 > hypercal_page = 0000000005c0b000 > my_hpage lo = 5c0b000 hi = 0 > ============================ > > Thanks & Regards, > VSR. > > On Mon, May 23, 2011 at 1:52 PM, Ian Campbell > <Ian.Campbell@citrix.com> wrote: > On Mon, 2011-05-23 at 08:48 +0100, veeruyours wrote: > > Hi, > > > > I recently started working on XEN, and I am looking for ways > to invoke > > hypercalls from HVM. > > I followed your instructions and succeeded in reading MSR > register. > > But when i attempt to write the physical address of a 4K > page from my HVM > > guest (2.6.30 kernel), i observed the XEN hypervisor > reporting it as bad > > GMFN as follows. > > > > [root@f13 ~]# xm dmesg -c > > (XEN) traps.c:664:d17 Bad GMFN ffff88001e925 (MFN > ffffffffffffffff) to MSR > > 40000000 > > > That supposed GMFN (fff88001e925) looks an awful lot like a > virtual > address and not a physical one to me, unless your guest really > has >4TB > of RAM assigned... > > > > > > Could you please help me in understanding what went wrong in > my > > implementation. > > > > I am running XEN 4.0.1 on AMD 64bit machine with svm support > and the dom0 > > kernel running 2.6.32.39. > > > > The > > Thanks & Regards, > > VSR. > > > > > > -- > > View this message in context: > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4418332.html > > Sent from the Xen - Dev mailing list archive at Nabble.com. > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2011-05-24 12:06 ` Ian Campbell @ 2011-05-24 13:58 ` veeruyours 2011-05-24 14:09 ` Ian Campbell 0 siblings, 1 reply; 20+ messages in thread From: veeruyours @ 2011-05-24 13:58 UTC (permalink / raw) To: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 6157 bytes --] I am running 2.6.30 (downloaded from kernel.org) on top of CENTOS 5.4. Do u mean i should enable following option --> Processor type and features [*] Paravirtualized guest support ---> --> [ ] Xen guest support (NEW) But enabling this also selects PARAVIRT and does it make my guest PV guest or PVHVM guest? --- Paravirtualized guest support [*] Xen guest support (32) Maximum allowed size of a domain in gigabytes (NEW) [ ] Enable Xen debug and tuning parameters in debugfs [ ] KVM paravirtualized clock (NEW) [ ] KVM Guest support (NEW) -*- Enable paravirtualization code [ ] Paravirtualization layer for spinlocks Could you please suggest how to enable only PVHVM support? I am fine for moving to recent kernels if required. Thanks & Regards, VSR. On Tue, May 24, 2011 at 5:38 PM, Ian Campbell-12 [via Xen] < ml-node+4421864-1644938153-207502@n5.nabble.com> wrote: > On Mon, 2011-05-23 at 14:52 +0100, veerasena reddy wrote: > > > Hi, > > > > Thanks a lot for quick reply. > > > > I modified my code to get physical page address and now i do not see > > error message on XEN hypervisor. > > Could you please correct if am writing proper physical address or not? > > > > We can write the page address to hypervisor using wrmsr() but who > > should set hypercall_page which is declared as extern in hypercall.h > > on HVM? Because when i try to invoke HYPERCALL_xxxx(), it reported > > hypercall_page not declared. Do we need to enable CONFIG_XEN in HVM > > kernel in order to invoke hypercalls to hypervisor? > > Which kernel are you running with? > > This should all be taken care of for you in a kernel with PVHVM support > enabled. > > > Could you please share any sample code if you have to get a clear > > understanding of HVM hypercalls. > > > > { > > char id[13]; > > unsigned int msr1; > > unsigned long my_hpage_phys; > > int my_hpage_lo, my_hpage_hi; > > > > __asm__ __volatile__( > > "cpuid" > > : "=b" (*(int *)(&id[0])), > > "=d" (*(int *)(&id[8])), > > "=c" (*(int *)(&id[4])) > > : "a" (0x40000000) > > ); > > id[12]='\0'; > > printk("CPU ID read- %s\n", id); > > > > /* Read MSR register */ > > __asm__ __volatile__( > > "cpuid" > > : "=b" (*(int *)(&msr1)) > > : "a" (0x40000002) > > ); > > > > my_hpage_phys = __get_free_page(GFP_ATOMIC); > > hypercall_page = virt_to_phys(my_hpage_phys); > > printk("my_hpage_phys get_free = %lx\n", my_hpage_phys); > > printk("hypercal_page = %p\n", hypercall_page); > > > > my_hpage_lo = (unsigned long)hypercall_page & 0xffffffff; > > my_hpage_hi = (unsigned long)hypercall_page >> 32; > > printk("my_hpage lo = %x hi = %x\n", my_hpage_lo, > > my_hpage_hi); > > /* Write hypercall page address to MSR */ > > wrmsr(msr1, my_hpage_lo, my_hpage_hi); > > > > return 0; > > } > > > > ================= output on HVM ========== > > [root@localhost src]# dmesg > > my_hypercall_page @ ffffffffa0388000 > > CPU ID read- XenVMMXenVMM > > my_hpage_phys get_free = ffff880005c0b000 > > hypercal_page = 0000000005c0b000 > > my_hpage lo = 5c0b000 hi = 0 > > ============================ > > > > Thanks & Regards, > > VSR. > > > > On Mon, May 23, 2011 at 1:52 PM, Ian Campbell > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=4421864&i=0>> > wrote: > > On Mon, 2011-05-23 at 08:48 +0100, veeruyours wrote: > > > Hi, > > > > > > I recently started working on XEN, and I am looking for ways > > to invoke > > > hypercalls from HVM. > > > I followed your instructions and succeeded in reading MSR > > register. > > > But when i attempt to write the physical address of a 4K > > page from my HVM > > > guest (2.6.30 kernel), i observed the XEN hypervisor > > reporting it as bad > > > GMFN as follows. > > > > > > [root@f13 ~]# xm dmesg -c > > > (XEN) traps.c:664:d17 Bad GMFN ffff88001e925 (MFN > > ffffffffffffffff) to MSR > > > 40000000 > > > > > > That supposed GMFN (fff88001e925) looks an awful lot like a > > virtual > > address and not a physical one to me, unless your guest really > > has >4TB > > of RAM assigned... > > > > > > > > > > Could you please help me in understanding what went wrong in > > my > > > implementation. > > > > > > I am running XEN 4.0.1 on AMD 64bit machine with svm support > > and the dom0 > > > kernel running 2.6.32.39. > > > > > > The > > > Thanks & Regards, > > > VSR. > > > > > > > > > -- > > > View this message in context: > > > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4418332.html > > > Sent from the Xen - Dev mailing list archive at Nabble.com. > > > > > > _______________________________________________ > > > Xen-devel mailing list > > > [hidden email]<http://user/SendEmail.jtp?type=node&node=4421864&i=1> > > > http://lists.xensource.com/xen-devel > > > > > > > > > > > > _______________________________________________ > Xen-devel mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=4421864&i=2> > http://lists.xensource.com/xen-devel > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4421864.html > To unsubscribe from HVM hypercalls, click here<http://xen.1045712.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2541346&code=dmVlcnV5b3Vyc0BnbWFpbC5jb218MjU0MTM0NnwyMDQ5MTI4OTk2>. > > -- View this message in context: http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4422128.html Sent from the Xen - Dev mailing list archive at Nabble.com. [-- Attachment #1.2: Type: text/html, Size: 9525 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] 20+ messages in thread
* Re: Re: HVM hypercalls 2011-05-24 13:58 ` veeruyours @ 2011-05-24 14:09 ` Ian Campbell 2011-05-25 7:38 ` veeruyours 0 siblings, 1 reply; 20+ messages in thread From: Ian Campbell @ 2011-05-24 14:09 UTC (permalink / raw) To: veeruyours; +Cc: xen-devel@lists.xensource.com On Tue, 2011-05-24 at 14:58 +0100, veeruyours wrote: > I am running 2.6.30 (downloaded from kernel.org) on top of CENTOS 5.4. That is a very old kernel (June 2009 IIRC). > Do u mean i should enable following option > > --> Processor type and features > [*] Paravirtualized guest support ---> > --> [ ] Xen guest support (NEW) > > But enabling this also selects PARAVIRT and does it make my guest PV > guest or PVHVM guest? This kernel only support PV and not PVHVM. You need something newer for PVHVM, I forget exactly when it was but 2.6.38/39 is certainly new enough. Ian. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: HVM hypercalls 2011-05-24 14:09 ` Ian Campbell @ 2011-05-25 7:38 ` veeruyours 2011-05-25 8:13 ` Ian Campbell 0 siblings, 1 reply; 20+ messages in thread From: veeruyours @ 2011-05-25 7:38 UTC (permalink / raw) To: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 2305 bytes --] Hi, I downloaded 2.6.38.7 and seen the CONFIG_XEN_PVHVM available. This feature is automatically selected if XEN and X86_LOCAL_APIC are seletected. config XEN_PVHVM def_bool y depends on XEN depends on X86_LOCAL_APIC But, when i select XEN (CONFIG_XEN), it automatically selects "PARAVIRT". Does that make my HVM guest into PV guest? CONFIG_PARAVIRT: This changes the kernel so it can modify itself when it is run under a hypervisor, potentially improving performance significantly over full virtualization. However, when run without a hypervisor the kernel is theoretically slower and slightly larger. i do not want to convert HVM guest into PV, i just want to make hypercalls from HVM guest to hypervisor. Could you please suggest. Thanks & Regards, VSR. On Tue, May 24, 2011 at 7:39 PM, Ian Campbell-10 [via Xen] < ml-node+4422155-436573608-207502@n5.nabble.com> wrote: > On Tue, 2011-05-24 at 14:58 +0100, veeruyours wrote: > > I am running 2.6.30 (downloaded from kernel.org) on top of CENTOS 5.4. > > That is a very old kernel (June 2009 IIRC). > > > Do u mean i should enable following option > > > > --> Processor type and features > > [*] Paravirtualized guest support ---> > > --> [ ] Xen guest support (NEW) > > > > But enabling this also selects PARAVIRT and does it make my guest PV > > guest or PVHVM guest? > > This kernel only support PV and not PVHVM. You need something newer for > PVHVM, I forget exactly when it was but 2.6.38/39 is certainly new > enough. > > Ian. > > > _______________________________________________ > Xen-devel mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=4422155&i=0> > http://lists.xensource.com/xen-devel > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4422155.html > To unsubscribe from HVM hypercalls, click here<http://xen.1045712.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2541346&code=dmVlcnV5b3Vyc0BnbWFpbC5jb218MjU0MTM0NnwyMDQ5MTI4OTk2>. > > -- View this message in context: http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4424489.html Sent from the Xen - Dev mailing list archive at Nabble.com. [-- Attachment #1.2: Type: text/html, Size: 3979 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] 20+ messages in thread
* Re: Re: HVM hypercalls 2011-05-25 7:38 ` veeruyours @ 2011-05-25 8:13 ` Ian Campbell 0 siblings, 0 replies; 20+ messages in thread From: Ian Campbell @ 2011-05-25 8:13 UTC (permalink / raw) To: veeruyours; +Cc: xen-devel@lists.xensource.com On Wed, 2011-05-25 at 08:38 +0100, veeruyours wrote: > Hi, > > I downloaded 2.6.38.7 and seen the CONFIG_XEN_PVHVM available. This > feature is automatically selected if XEN and X86_LOCAL_APIC are > seletected. > > config XEN_PVHVM > def_bool y > depends on XEN > depends on X86_LOCAL_APIC > > But, when i select XEN (CONFIG_XEN), it automatically selects > "PARAVIRT". Does that make my HVM guest into PV guest? No. It makes your kernel capable of being used as either PV, PVHVM or just HVM kernel. The guest type is purely derived from the guest cfg file you use. PV vs PVHVM/HVM is controlled by specifying hvm=0|1. PVHVM vs HVM is controlled via the xen_platform_device=0|1 option, disabling the platform device (it is enabled by default) puts you back to just HVM mode. BTW, this sort of question really belongs on xen-users. Ian. > > CONFIG_PARAVIRT: > > This changes the kernel so it can modify itself when it is run > under a hypervisor, potentially improving performance significantly > over full virtualization. However, when run without a hypervisor the > kernel is theoretically slower and slightly larger. > > i do not want to convert HVM guest into PV, i just want to make > hypercalls from HVM guest to hypervisor. > > Could you please suggest. > > Thanks & Regards, > VSR. > > On Tue, May 24, 2011 at 7:39 PM, Ian Campbell-10 [via Xen] <[hidden > email]> wrote: > On Tue, 2011-05-24 at 14:58 +0100, veeruyours wrote: > > > I am running 2.6.30 (downloaded from kernel.org) on top of > CENTOS 5.4. > > > That is a very old kernel (June 2009 IIRC). > > > > Do u mean i should enable following option > > > > --> Processor type and features > > [*] Paravirtualized guest support ---> > > --> [ ] Xen guest support (NEW) > > > > But enabling this also selects PARAVIRT and does it make my > guest PV > > guest or PVHVM guest? > > > This kernel only support PV and not PVHVM. You need something > newer for > PVHVM, I forget exactly when it was but 2.6.38/39 is certainly > new > enough. > > Ian. > > > > _______________________________________________ > Xen-devel mailing list > [hidden email] > http://lists.xensource.com/xen-devel > > > > ______________________________________________________________ > If you reply to this email, your message will be added to the > discussion below: > http://xen.1045712.n5.nabble.com/HVM-hypercalls-tp2541346p4422155.html > > To unsubscribe from HVM hypercalls, click here. > > > > ______________________________________________________________________ > View this message in context: Re: HVM hypercalls > Sent from the Xen - Dev mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2011-05-25 8:13 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-28 19:22 HVM hypercalls Ruslan Nikolaev 2010-07-29 1:05 ` Dan Magenheimer 2010-07-29 7:30 ` Juergen Gross 2010-07-29 18:55 ` Ruslan Nikolaev 2010-07-29 19:47 ` Jeremy Fitzhardinge 2010-07-30 16:06 ` Ruslan Nikolaev 2010-07-31 0:07 ` Jeremy Fitzhardinge 2010-08-03 19:48 ` Ruslan Nikolaev 2010-08-03 21:40 ` Jeremy Fitzhardinge 2010-08-04 17:41 ` Ruslan Nikolaev 2010-08-05 7:25 ` Christoph Egger 2010-08-05 10:31 ` Stefano Stabellini 2011-05-23 7:48 ` veeruyours 2011-05-23 8:22 ` Ian Campbell 2011-05-23 13:52 ` veerasena reddy 2011-05-24 12:06 ` Ian Campbell 2011-05-24 13:58 ` veeruyours 2011-05-24 14:09 ` Ian Campbell 2011-05-25 7:38 ` veeruyours 2011-05-25 8:13 ` 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).