Bug 1572839

Summary: Unexpected command run successfully with invalid cache size
Product: Red Hat Enterprise Linux 7 Reporter: Junxiang Li <junli>
Component: qemu-kvm-rhevAssignee: David Gibson <dgibson>
Status: CLOSED NOTABUG QA Contact: xianwang <xianwang>
Severity: low Docs Contact:
Priority: low    
Version: 7.5CC: chayang, dgibson, jinzhao, junli, juzhang, knoel, michen, qzhang, virt-maint, xianwang, yuhuang
Target Milestone: rcKeywords: Automation
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-01 01:27:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Junxiang Li 2018-04-28 03:12:27 UTC
Description of problem:
Unexpected command run successfully with invalid cache size

Version-Release number of selected component (if applicable):
libvirt-3.9.0-14.el7_5.4
qemu-kvm-rhev-2.10.0-21.el7_5.2

How reproducible:
100%

Steps to Reproduce:
1. Prepare a guest and start it
2. Get the page size in host
# getconf PAGESIZE
output: 65536
3. Run virsh command
# virsh migrate-compcache avocado-vt-vm1 --size 65535

Actual results:
Exit status:0

Expected results:
error: internal error: unable to execute QEMU command 'migrate-set-cache-size': Parameter 'cache size' expects is smaller than page size

Additional info:
1. When I try --size 4095, the output is the expected results. 
But the page size is not 4096 in PPC64le.
2. Sorry for I'm not good at qemu commands, so I reproduce it with virsh.

Comment 2 Qunfang Zhang 2018-04-28 03:27:13 UTC
Hi, Junxiang

Is this a ppc64le specific bug or also reproduced on x86?

Thanks,
Qunfang

Comment 3 Junxiang Li 2018-04-28 03:34:24 UTC
(In reply to Qunfang Zhang from comment #2)
> Hi, Junxiang
> 
> Is this a ppc64le specific bug or also reproduced on x86?
> 
> Thanks,
> Qunfang

PPC64le specific bug, because the page size is 4096 on x86.

Comment 4 Qunfang Zhang 2018-04-28 06:16:31 UTC
(In reply to junli from comment #3)
> (In reply to Qunfang Zhang from comment #2)
> > Hi, Junxiang
> > 
> > Is this a ppc64le specific bug or also reproduced on x86?
> > 
> > Thanks,
> > Qunfang
> 
> PPC64le specific bug, because the page size is 4096 on x86.

Thanks.

Comment 5 David Gibson 2018-05-01 01:27:43 UTC
Although the typical page size in practice on power is 64kiB, the minimum architected size is 4kiB.  For various reasons, migration (precopy) operates on that minimum page size not the guest's actual current page size..

So, there's no actual bug here.

Comment 6 Junxiang Li 2018-05-02 01:38:36 UTC
(In reply to David Gibson from comment #5)
> Although the typical page size in practice on power is 64kiB, the minimum
> architected size is 4kiB.  For various reasons, migration (precopy) operates
> on that minimum page size not the guest's actual current page size..
> 
> So, there's no actual bug here.

So, the cache size is constant 4kiB on any archs?

Comment 7 David Gibson 2018-05-02 03:34:20 UTC
> So, the cache size is constant 4kiB on any archs?

Not necessarily, but the minimum cache size is 4kiB for ppc and ppc64.