Bug 1572839 - Unexpected command run successfully with invalid cache size
Summary: Unexpected command run successfully with invalid cache size
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: ppc64le
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: David Gibson
QA Contact: xianwang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-28 03:12 UTC by Junxiang Li
Modified: 2018-05-02 03:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-01 01:27:43 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.