[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] spapr DRC and awaiting_allocation
From: |
Bharata B Rao |
Subject: |
Re: [Qemu-ppc] spapr DRC and awaiting_allocation |
Date: |
Fri, 9 Jun 2017 12:18:34 +0530 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Jun 09, 2017 at 12:32:46AM +1000, David Gibson wrote:
> Hi Bharata,
>
> I'm trying to understand the awaiting_allocation flag in the DRC code,
> and it's not making much sense to me. It was introduced in aab9913
> "spapr_drc: Prevent detach racing against attach for CPU DR", which
> claims that a hot unplug racing with a not-completed hot plug of a CPU
> can crash the guest.
>
> The change made only appears to affect the case where this happens:
> host guest
> attach() CPU
> notify guest
> detach() CPU
> RTAS set_allocation_state USABLE
>
> But in that case, I'd expect the set_allocation_state to simply fail
> (becuase the DRC is now awaiting_release) and for the guest to cope
> with that failure.
>
> Can you remember the mechanism by which the guest was crashed?
I dug up the old bugzilla (for PowerKVM-3.1) which lists the following
as the reproducer.
4. Create & Run the following script
# cat cpu_hotplug_stress.sh
#!/bin/bash
for i in {0..5}
do
sed "s/X/$i/g" cpu_hp.xml>temp_cpu_hp.xml
virsh attach-device sles12 temp_cpu_hp.xml --live
done
for i in {5..0}
do
sed "s/X/$i/g" cpu_hp.xml>temp_cpu_hp.xml
virsh detach-device sles12 temp_cpu_hp.xml --live
done
5. Guest will be crashed, check the dmesg on host machine
[ 8489.089952] qemu-system-ppc[21593]: unhandled signal 11 at 0000000000000014
nip 00003fff8a891a4c lr 00003fff8a891a44 code 30001
Remember that this was when in-kernel CPU hotplug wasn't yet available.
I will spend some more time on this and come back later.
Regards,
Bharata.