Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Wei Liu
On Mon, Oct 21, 2019 at 04:02:33PM +0100, Andrew Cooper wrote: > On 21/10/2019 11:26, Roger Pau Monné wrote: > >>> + > >>> +cpuid(0x4000, , , , ); > >>> +if ( (ebx == 0x7263694d) && /* "Micr" */ > >>> + (ecx == 0x666f736f) && /* "osof" */ > >>> + (edx == 0x76482074) )

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Wei Liu
On Mon, Oct 21, 2019 at 05:11:26PM +0200, Roger Pau Monné wrote: > On Mon, Oct 21, 2019 at 03:56:51PM +0100, Wei Liu wrote: > > On Mon, Oct 21, 2019 at 12:22:25PM +0200, Roger Pau Monné wrote: > > [...] > > > > +bool __init hyperv_probe(void) > > > > +{ > > > > +uint32_t eax, ebx, ecx, edx; >

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Roger Pau Monné
On Mon, Oct 21, 2019 at 03:56:51PM +0100, Wei Liu wrote: > On Mon, Oct 21, 2019 at 12:22:25PM +0200, Roger Pau Monné wrote: > [...] > > > +bool __init hyperv_probe(void) > > > +{ > > > +uint32_t eax, ebx, ecx, edx; > > > +bool hyperv_guest = false; > > > > I don't think you need this

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Andrew Cooper
On 21/10/2019 11:26, Roger Pau Monné wrote: >>> + >>> +cpuid(0x4000, , , , ); >>> +if ( (ebx == 0x7263694d) && /* "Micr" */ >>> + (ecx == 0x666f736f) && /* "osof" */ >>> + (edx == 0x76482074) ) /* "t Hv" */ >> I guess there are no HyperV headers to import that have

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Wei Liu
On Mon, Oct 21, 2019 at 12:22:25PM +0200, Roger Pau Monné wrote: [...] > > +bool __init hyperv_probe(void) > > +{ > > +uint32_t eax, ebx, ecx, edx; > > +bool hyperv_guest = false; > > I don't think you need this local variable, you can return true in if > the if condition matches, and

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Roger Pau Monné
On Mon, Oct 21, 2019 at 12:22:25PM +0200, Roger Pau Monné wrote: > On Mon, Sep 30, 2019 at 04:00:43PM +0100, Wei Liu wrote: > > We use the same code structure as we die for Xen. > > > > As starters, detect Hyper-V in probe routine. More complex > > functionalities will be added later. > > > >

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-21 Thread Roger Pau Monné
On Mon, Sep 30, 2019 at 04:00:43PM +0100, Wei Liu wrote: > We use the same code structure as we die for Xen. > > As starters, detect Hyper-V in probe routine. More complex > functionalities will be added later. > > Signed-off-by: Wei Liu > --- > xen/arch/x86/Kconfig | 9 >

Re: [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-09-30 Thread Wei Liu
On Mon, Sep 30, 2019 at 04:00:43PM +0100, Wei Liu wrote: > We use the same code structure as we die for Xen. Urgh. There is a rather unfortunate typo. No software is worth dying for. :-) Wei. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

[Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-09-30 Thread Wei Liu
We use the same code structure as we die for Xen. As starters, detect Hyper-V in probe routine. More complex functionalities will be added later. Signed-off-by: Wei Liu --- xen/arch/x86/Kconfig | 9 xen/arch/x86/guest/Makefile| 1 +