Bug 658169

Summary: Inventory script gets HVM value wrong on ia64
Product: [Retired] Beaker Reporter: Matt Brodeur <mbrodeur>
Component: inventoryAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 0.5CC: bpeck, mcsontos, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-22 05:54:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matt Brodeur 2010-11-29 15:12:31 UTC
Description of problem:
This is a specific facet of 541294 but it comes up often enough to get its own bug.

When /distribution/inventory is run on any ia64 system, it reports HVM=0 into the database.  This is incorrect on at least half of the ia64s we have.

The aggravation here is compounded by the fact that scripted changes are apparently not logged.  Searching a system's history can show the HVM value being manually changed to "1", but it will be "0" in the DB if the inventory script has been run since.

Comment 1 Dan Callaghan 2010-12-06 06:23:42 UTC
(In reply to comment #0)
> The aggravation here is compounded by the fact that scripted changes are
> apparently not logged.  Searching a system's history can show the HVM value
> being manually changed to "1", but it will be "0" in the DB if the inventory
> script has been run since.

This is bug 658503 which is slated for 0.6.0.

Comment 2 Dan Callaghan 2010-12-22 02:54:10 UTC
(In reply to comment #0)
> When /distribution/inventory is run on any ia64 system, it reports HVM=0 into
> the database.  This is incorrect on at least half of the ia64s we have.

Do you have any hints as to how I can detect hardware virtualisation support on ia64?

Right now the scripts test for the presence of the kvm_amd or kvm_intel kernel module, which is only going to work on x86_64: KVM support exists for ia64 but it appears to be unsupported and we don't ship it. Xen is frustratingly vague [1] about what is required for HVM support on ia64. There is also nothing interesting which I can see in /proc/cpuinfo.

Comment 3 Dan Callaghan 2010-12-22 02:54:31 UTC
The missing link for my previous comment:

[1] http://wiki.xen.org/xenwiki/XenIA64/HowTo

Comment 4 Dan Callaghan 2010-12-22 03:04:32 UTC
I had a look at the Xen source, at arch/ia64/vmx/vmx_init.c:109 it uses some magic to fetch available processor features and then tests for a particular bit which indicates HVM support. I found the same information exported to userspace in /proc/pal/cpu0/processor_info, so our script could look in there to see if the necessary bit is set.

Comment 5 Dan Callaghan 2010-12-22 05:54:27 UTC
This is fixed in /distribution/install 1.1-38, which is now live.

http://git.fedorahosted.org/git?p=beaker.git;a=commitdiff;h=724586b09bb0214b734c087e6d60bee176ade303

Comment 6 Dan Callaghan 2010-12-22 05:56:08 UTC
(In reply to comment #5)
> This is fixed in /distribution/install 1.1-38

This was of course a typo, I meant /distribution/inventory