Re: [PATCH 1/1] lscpu: correct the Virtualization type on Xen DomU PV guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 19, 2016 at 05:03:41AM -0700, Dongli Zhang wrote:
> 
> > + Is the file always available (including old XEN versions)? 
> 
> This file (/sys/hypervisor/properties/features) has been available since Linux 2.6.31 
> (drivers/xen/sys-hypervisor.c)
> 
> > + There is also path_read_u64() to avoid path_fopen() & fscanf().
> 
> I will change to path_read_u64.
> 
> 
> I also made a new flow to detect the Xen virtualization type according to
> the features on this path to maximize the number of versions of existing
> Xen and Linux to support. Xen versions from Xen 3.3.0 to the current Xen
> unstable would be able to help detect PV based on
> XENFEAT_mmu_pt_update_preserve_ad. Xen versions from Xen 4.4.0 to the
> newest would be able to help detect PVH (which has been introduced since
> Xen 4.4.0).
> 
> if cpuid returns XenVMMXenVMM
> 	virtype = full
> 	if _PATH_SYS_HYP_FEATURES (the file) exists
> 		if XENFEAT_mmu_pt_update_preserve_ad is set (supported since Xen 3.3.0)
> 			virtype = para
> 		else if XENFEAT_supervisor_mode_kernel is set and
> 				XENFEAT_hvm_callback_vector is set (supported since Xen 4.4.0)
> 			virtype = para
> 		end if
> 	end if
> end if
> 
> Please let me know your feedback and suggestion so that I would send the
> new patch soon.

Looks good, go ahead ;-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux