qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] block ais migration for machines <= 2.9
Date: Thu, 21 Sep 2017 11:40:47 +0800	[thread overview]
Message-ID: <f0fcf8d6-e341-c53d-1198-3457ec2a007a@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170920160417.GB3132@work-vm>



在 2017/9/21 上午12:04, Dr. David Alan Gilbert 写道:
> * Christian Borntraeger (borntraeger@de.ibm.com) wrote:
>> Something like the following seems to do the tricks.
>> Needs proper patch description, review, full test with different kernel versions.....
> Without knowing anything about 'ais' - will this break migration from
> 2.10 -> 2.10+this fix?
I think it doesn't break. I will have a try later.
>
> Dave
>
>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>> index 1c7af39..2ff32ba 100644
>> --- a/hw/s390x/s390-virtio-ccw.c
>> +++ b/hw/s390x/s390-virtio-ccw.c
>> @@ -212,6 +212,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
>>       s390mc->cpu_model_allowed = true;
>>       s390mc->css_migration_enabled = true;
>>       s390mc->gs_allowed = true;
>> +    s390mc->ais_allowed = true;
>>       mc->init = ccw_init;
>>       mc->reset = s390_machine_reset;
>>       mc->hot_add_cpu = s390_hot_add_cpu;
>> @@ -305,6 +306,11 @@ bool gs_allowed(void)
>>       return false;
>>   }
>>   
>> +bool ais_allowed(void)
>> +{
>> +    return get_machine_class()->ais_allowed;
>> +}
>> +
>>   static char *machine_get_loadparm(Object *obj, Error **errp)
>>   {
>>       S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
>> @@ -533,6 +539,7 @@ static void ccw_machine_2_9_class_options(MachineClass *mc)
>>       S390CcwMachineClass *s390mc = S390_MACHINE_CLASS(mc);
>>   
>>       s390mc->gs_allowed = false;
>> +    s390mc->ais_allowed = false;
>>       ccw_machine_2_10_class_options(mc);
>>       SET_MACHINE_COMPAT(mc, CCW_COMPAT_2_9);
>>       s390mc->css_migration_enabled = false;
>> diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
>> index 41a9d28..bba8660 100644
>> --- a/include/hw/s390x/s390-virtio-ccw.h
>> +++ b/include/hw/s390x/s390-virtio-ccw.h
>> @@ -41,6 +41,7 @@ typedef struct S390CcwMachineClass {
>>       bool cpu_model_allowed;
>>       bool css_migration_enabled;
>>       bool gs_allowed;
>> +    bool ais_allowed;
>>   } S390CcwMachineClass;
>>   
>>   /* runtime-instrumentation allowed by the machine */
>> @@ -49,6 +50,8 @@ bool ri_allowed(void);
>>   bool cpu_model_allowed(void);
>>   /* guarded-storage allowed by the machine */
>>   bool gs_allowed(void);
>> +/* ais allowed by the machine */
>> +bool ais_allowed(void);
>>   
>>   /**
>>    * Returns true if (vmstate based) migration of the channel subsystem
>> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
>> index c4c5791..531d474 100644
>> --- a/target/s390x/kvm.c
>> +++ b/target/s390x/kvm.c
>> @@ -309,7 +309,9 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>>       }
>>   
>>       /* Try to enable AIS facility */
>> -    kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0);
>> +    if (ais_allowed()) {
>> +       kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0);
>> +    }
>>   
>>       qemu_mutex_init(&qemu_sigp_mutex);
>>
>>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
>

  reply	other threads:[~2017-09-21  3:41 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 10:40 [Qemu-devel] [PULL 00/40] s390x: fixes, enhancements for 2.10 softfreeze Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 01/40] s390x/kvm: Rework cmma management Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 02/40] linux-headers: update to 4.13-rc0 Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 03/40] s390x/migration: Storage attributes device Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 04/40] s390x/migration: Monitor commands for storage attributes Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 05/40] s390x/cpumodel: clean up spacing and comments Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 06/40] s390x/cpumodel: provide compat handling for new cpu features Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 07/40] s390x: add flags field for registering I/O adapter Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 08/40] s390x/flic: introduce modify_ais_mode callback Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 09/40] s390x/flic: introduce inject_airq callback Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 10/40] s390x/sic: realize SIC handling Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 11/40] s390x/css: update css_adapter_interrupt Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 12/40] s390x: add helper get_machine_class Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 13/40] s390x: add css_migration_enabled to machine class Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 14/40] s390x/css: add missing css state conditionally Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 15/40] s390x/css: add ORB to SubchDev Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 16/40] s390x/css: activate ChannelSubSys migration Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 17/40] s390x/css: use SubchDev.orb Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 18/40] pc-bios/s390-ccw: Move libc functions to separate header Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 19/40] pc-bios/s390-ccw: Move ebc2asc to sclp.c Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 20/40] pc-bios/s390-ccw: Move virtio-block related functions into a separate file Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 21/40] pc-bios/s390-ccw: Add a write() function for stdio Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 22/40] pc-bios/s390-ccw: Move byteswap functions to a separate header Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 23/40] pc-bios/s390-ccw: Remove unused structs from virtio.h Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 24/40] pc-bios/s390-ccw: Add code for virtio feature negotiation Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 25/40] roms/SLOF: Update submodule to latest status Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 26/40] pc-bios/s390-ccw: Add core files for the network bootloading program Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 27/40] pc-bios/s390-ccw: Add virtio-net driver code Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 28/40] pc-bios/s390-ccw: Link libnet into the netboot image and do the TFTP load Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 29/40] pc-bios/s390: add s390-netboot.img Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 30/40] pc-bios/s390: rebuild s390-ccw.img Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 31/40] s390x: initialize cpu firstly Christian Borntraeger
2017-07-14 10:40 ` [Qemu-devel] [PULL 32/40] s390x/cpumodel: add zpci, aen and ais facilities Christian Borntraeger
2017-07-17 17:23   ` David Hildenbrand
2017-07-17 18:12     ` Christian Borntraeger
2017-07-18 14:49       ` David Hildenbrand
2017-07-14 10:41 ` [Qemu-devel] [PULL 33/40] s390x/flic: migrate ais states Christian Borntraeger
2017-09-20 12:39   ` Christian Borntraeger
2017-09-20 12:53     ` [Qemu-devel] block ais migration for machines <= 2.9 Christian Borntraeger
2017-09-20 12:59       ` Cornelia Huck
2017-09-20 14:04         ` Christian Borntraeger
2017-09-20 16:04       ` Dr. David Alan Gilbert
2017-09-21  3:40         ` Yi Min Zhao [this message]
2017-09-21  7:41         ` Christian Borntraeger
2017-09-20 16:20       ` no-reply
2017-07-14 10:41 ` [Qemu-devel] [PULL 34/40] s390x/cpumodel: wire up new hardware features Christian Borntraeger
2017-07-17 17:30   ` David Hildenbrand
2017-07-17 18:14     ` Christian Borntraeger
2017-07-18 14:52       ` David Hildenbrand
2017-07-14 10:41 ` [Qemu-devel] [PULL 35/40] s390x/cpumodel: we are always in zarchitecture mode Christian Borntraeger
2017-07-17 17:33   ` David Hildenbrand
2017-07-17 17:36     ` David Hildenbrand
2017-07-14 10:41 ` [Qemu-devel] [PULL 36/40] s390x/cpumodel: add esop/esop2 to z12 model Christian Borntraeger
2017-07-14 10:41 ` [Qemu-devel] [PULL 37/40] s390x/kvm: Enable KSS facility for nested virtualization Christian Borntraeger
2017-07-17 17:35   ` David Hildenbrand
2017-07-17 18:12     ` Christian Borntraeger
2017-07-14 10:41 ` [Qemu-devel] [PULL 38/40] s390x/kvm: enable guarded storage Christian Borntraeger
2017-07-14 10:41 ` [Qemu-devel] [PULL 39/40] s390x/arch_dump: also dump guarded storage control block Christian Borntraeger
2017-07-14 10:41 ` [Qemu-devel] [PULL 40/40] s390x/gdb: add gs registers Christian Borntraeger
2017-07-14 14:32 ` [Qemu-devel] [PULL 00/40] s390x: fixes, enhancements for 2.10 softfreeze Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0fcf8d6-e341-c53d-1198-3457ec2a007a@linux.vnet.ibm.com \
    --to=zyimin@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).