Next set of s390x patches
Changes v1->v2:
- Fix declaration of reset_dev_types[]
The following changes since commit ee9dfed242610ecb91418270fd46b875ed56e201:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20151020-1' into staging (2015-10-20 12:56:45 +0100)
are available in the git repository at:
git://github.com/cohuck/qemu tags/s390x-20151021-v2
for you to fetch changes up to 1cd4e0f6f0a6b1978a5868b41d4faae2071dc4ee:
s390x/cmma: clean up cmma reset (2015-10-21 12:21:30 +0200)
----------------------------------------------------------------
More s390x patches. The first ones are fixes: A regression, missed compat and a missed part of the SIMD support. The others contain optimizations and cleanup.
----------------------------------------------------------------
Christian Borntraeger (1):
s390x/kvm: Fix vector validity bit in device machine checks
Cornelia Huck (2):
s390x/virtio-ccw: fix 2.4 virtio compat
s390x: flagify mcic values
David Hildenbrand (5):
s390x: unify device reset during subsystem_reset() s390x/ipl: we always have an ipl device
s390x: machine reset function with new ipl cpu handling
s390x: reset crypto only on clear reset and QEMU reset s390x/cmma: clean up cmma reset
Tony Krowiak (1):
util/qemu-config: fix missing machine command line options
hw/s390x/ipl.c | 53 +++++++++++++++++++------------------ hw/s390x/ipl.h | 5 +++- hw/s390x/s390-virtio-ccw.c | 44 +++++++++++++++++++------------ hw/s390x/s390-virtio.c | 15 +++++++++++ hw/s390x/s390-virtio.h | 1 + target-s390x/cpu.h | 65 ++++++++++++++++++++++++++++++++++++++++++---- target-s390x/kvm.c | 32 ++++++++++++++++------- target-s390x/misc_helper.c | 12 ++++----- util/qemu-config.c | 8 ++++++ 9 files changed, 168 insertions(+), 67 deletions(-)
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 5/9] s390x: unify device reset during subsystem_reset()
From: David Hildenbrand <[email protected]>
We have to manually reset several devices that are not on a bus: Let's collect them in an array.
--- hw/s390x/s390-virtio-ccw.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-)
hw/s390x/s390-virtio-ccw.c +14 -17
@@ -35,26 +35,23 @@ typedef struct S390CcwMachineState {bool dea_key_wrap; } S390CcwMachineState; +static const char *const reset_dev_types[] = { +"virtual-css-bridge" , +"s390-sclp-event-facility" , +"s390-flic" , +"diag288" , +}; +void subsystem_reset (void ) { -DeviceState *css, *sclp, *flic, *diag288; +DeviceState *dev; +int i; - css =DEVICE (object_resolve_path_type ("" ,"virtual-css-bridge" ,NULL )); -if (css) { -qdev_reset_all (css); - } - sclp =DEVICE (object_resolve_path_type ("" , -"s390-sclp-event-facility" ,NULL )); -if (sclp) { -qdev_reset_all (sclp); - } - flic =DEVICE (object_resolve_path_type ("" ,"s390-flic" ,NULL )); -if (flic) { -qdev_reset_all (flic); - } - diag288 =DEVICE (object_resolve_path_type ("" ,"diag288" ,NULL )); -if (diag288) { -qdev_reset_all (diag288); +for (i =0 ; i <ARRAY_SIZE (reset_dev_types); i++) { + dev =DEVICE (object_resolve_path_type ("" , reset_dev_types[i],NULL )); +if (dev) { +qdev_reset_all (dev); + } } }
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 7/9] s390x: machine reset function with new ipl cpu handling
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
Current implementation depends on the order of resets getting triggered.
If a cpu reset is triggered after the ipl device reset, the CPU is stopped and the VM will not run. In fact, that hinders us from converting the ipl device into a TYPE_DEVICE. Let's change that by manually configuring the ipl cpu during a system reset, so we have full control and can demangle that code.
Also remove the superflous cpu parameter from s390_update_iplstate on the way.
--- hw/s390x/ipl.c | 27 ++++++++++++++------------- hw/s390x/ipl.h | 3 +++ hw/s390x/s390-virtio-ccw.c | 1 + hw/s390x/s390-virtio.c | 13 +++++++++++++ hw/s390x/s390-virtio.h | 1 + 5 files changed, 32 insertions(+), 13 deletions(-)
hw/s390x/ipl.c +14 -13
@@ -223,7 +223,7 @@ static Property s390_ipl_properties[] = {* - -1 if no valid boot device was found * - ccw id of the boot device otherwise */ -static uint64_t s390_update_iplstate (CPUS390XState *env,S390IPLState *ipl) +static uint64_t s390_update_iplstate (S390IPLState *ipl) {DeviceState *dev_st;
@@ -282,26 +282,27 @@ void s390_reipl_request(void)qemu_system_reset_request (); } +void s390_ipl_prepare_cpu (S390CPU *cpu) +{ +S390IPLState *ipl =get_ipl_device (); + + cpu->env.psw.addr = ipl->start_addr; + cpu->env.psw.mask =IPL_PSW_MASK ; + +if (!ipl->kernel || ipl->iplb_valid) { + cpu->env.psw.addr = ipl->bios_start_addr; + cpu->env.regs[7 ] =s390_update_iplstate (ipl); + } +} +static void s390_ipl_reset (DeviceState *dev) {S390IPLState *ipl =S390_IPL (dev); -S390CPU *cpu =S390_CPU (qemu_get_cpu (0 )); -CPUS390XState *env = &cpu->env; - - env->psw.addr = ipl->start_addr; - env->psw.mask =IPL_PSW_MASK ;if (!ipl->reipl_requested) { ipl->iplb_valid = false; } ipl->reipl_requested = false; - -if (!ipl->kernel || ipl->iplb_valid) { - env->psw.addr = ipl->bios_start_addr; - env->regs[7 ] =s390_update_iplstate (env, ipl); - } - -s390_cpu_set_state (CPU_STATE_OPERATING , cpu); }static void s390_ipl_class_init (ObjectClass *klass,void *data)
hw/s390x/ipl.h +3 -0
@@ -12,6 +12,8 @@ #ifndef HW_S390_IPL_H #define HW_S390_IPL_H +#include "cpu.h" + typedef struct IplParameterBlock { uint8_t reserved1[110]; uint16_t devno;
@@ -19,6 +21,7 @@ typedef struct IplParameterBlock { } IplParameterBlock;void s390_ipl_update_diag308 (IplParameterBlock *iplb); +void s390_ipl_prepare_cpu (S390CPU *cpu);IplParameterBlock *s390_ipl_get_iplb (void );void s390_reipl_request (void );
hw/s390x/s390-virtio-ccw.c +1 -0
@@ -161,6 +161,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)NMIClass *nc =NMI_CLASS (oc); mc->init = ccw_init; + mc->reset = s390_machine_reset; mc->block_default_type =IF_VIRTIO ; mc->no_cdrom =1 ; mc->no_floppy =1 ;
hw/s390x/s390-virtio.c +13 -0
@@ -40,6 +40,7 @@#include "hw/s390x/s390_flic.h" #include "hw/s390x/s390-virtio.h" #include "hw/s390x/storage-keys.h" +#include "hw/s390x/ipl.h" #include "cpu.h" //#define DEBUG_S390
@@ -314,6 +315,17 @@ void s390_nmi(NMIState *n, int cpu_index, Error **errp) } } +void s390_machine_reset (void ) +{ +S390CPU *ipl_cpu =S390_CPU (qemu_get_cpu (0 )); + +qemu_devices_reset (); + +/* all cpus are stopped - configure and start the ipl cpu only */ +s390_ipl_prepare_cpu (ipl_cpu); +s390_cpu_set_state (CPU_STATE_OPERATING , ipl_cpu); +} +static void s390_machine_class_init (ObjectClass *oc,void *data) {MachineClass *mc =MACHINE_CLASS (oc);
@@ -322,6 +334,7 @@ static void s390_machine_class_init(ObjectClass *oc, void *data) mc->alias ="s390" ; mc->desc ="VirtIO based S390 machine" ; mc->init = s390_init; + mc->reset = s390_machine_reset; mc->block_default_type =IF_VIRTIO ; mc->max_cpus =255 ; mc->no_serial =1 ;
hw/s390x/s390-virtio.h +1 -0
@@ -27,5 +27,6 @@ void s390_init_ipl_dev(const char *kernel_filename, bool enforce_bios);void s390_create_virtio_net (BusState *bus,const char *name);void s390_nmi (NMIState *n,int cpu_index,Error **errp); +void s390_machine_reset (void );void s390_memory_init (ram_addr_t mem_size);#endif
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 9/9] s390x/cmma: clean up cmma reset
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
The cmma reset is per VM, so we don't need a cpu object. We can directly make use of kvm_state, as it is already available when the reset is called. By moving the cmma reset in our machine reset function, we can avoid a manual reset handler.
--- hw/s390x/s390-virtio.c | 1 + target-s390x/cpu.h | 9 ++++----- target-s390x/kvm.c | 8 ++------ target-s390x/misc_helper.c | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-)
hw/s390x/s390-virtio.c +1 -0
@@ -320,6 +320,7 @@ void s390_machine_reset(void)S390CPU *ipl_cpu =S390_CPU (qemu_get_cpu (0 ));qemu_devices_reset (); +s390_cmma_reset ();s390_crypto_reset ();/* all cpus are stopped - configure and start the ipl cpu only */
target-s390x/cpu.h +4 -5
@@ -1160,7 +1160,7 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, int vq, bool assign);int kvm_s390_cpu_restart (S390CPU *cpu);int kvm_s390_get_memslot_count (KVMState *s); -void kvm_s390_clear_cmma_callback (void *opaque); +void kvm_s390_cmma_reset (void );int kvm_s390_set_cpu_state (S390CPU *cpu,uint8_t cpu_state);void kvm_s390_reset_vcpu (S390CPU *cpu);int kvm_s390_set_mem_limit (KVMState *s,uint64_t new_limit,uint64_t *hw_limit);
@@ -1190,7 +1190,7 @@ static inline int kvm_s390_cpu_restart(S390CPU *cpu) {return -ENOSYS ; } -static inline void kvm_s390_clear_cmma_callback (void *opaque) +static inline void kvm_s390_cmma_reset (void ) { }static inline int kvm_s390_get_memslot_count (KVMState *s)
@@ -1229,11 +1229,10 @@ static inline int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit)return 0 ; } -static inline void cmma_reset (S390CPU *cpu) +static inline void s390_cmma_reset (void ) {if (kvm_enabled ()) { -CPUState *cs =CPU (cpu); -kvm_s390_clear_cmma_callback (cs->kvm_state); +kvm_s390_cmma_reset (); } }
target-s390x/kvm.c +2 -6
@@ -173,16 +173,15 @@ int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, uint64_t *hw_limit)return kvm_vm_ioctl (s,KVM_SET_DEVICE_ATTR , &attr); } -void kvm_s390_clear_cmma_callback (void *opaque) +void kvm_s390_cmma_reset (void ) {int rc; -KVMState *s = opaque;struct kvm_device_attr attr = { .group =KVM_S390_VM_MEM_CTRL , .attr =KVM_S390_VM_MEM_CLR_CMMA , }; - rc =kvm_vm_ioctl (s,KVM_SET_DEVICE_ATTR , &attr); + rc =kvm_vm_ioctl (kvm_state,KVM_SET_DEVICE_ATTR , &attr);trace_kvm_clear_cmma (rc); }
@@ -200,9 +199,6 @@ static void kvm_s390_enable_cmma(KVMState *s) } rc =kvm_vm_ioctl (s,KVM_SET_DEVICE_ATTR , &attr); -if (!rc) { -qemu_register_reset (kvm_s390_clear_cmma_callback, s); - }trace_kvm_enable_cmma (rc); }
target-s390x/misc_helper.c +2 -2
@@ -127,7 +127,7 @@ static int modified_clear_reset(S390CPU *cpu)CPU_FOREACH (t) {run_on_cpu (t, s390_do_cpu_full_reset, t); } -cmma_reset (cpu); +s390_cmma_reset ();subsystem_reset ();s390_crypto_reset (); scc->load_normal (CPU (cpu));
@@ -146,7 +146,7 @@ static int load_normal_reset(S390CPU *cpu)CPU_FOREACH (t) {run_on_cpu (t, s390_do_cpu_reset, t); } -cmma_reset (cpu); +s390_cmma_reset ();subsystem_reset (); scc->initial_cpu_reset (CPU (cpu)); scc->load_normal (CPU (cpu));
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 6/9] s390x/ipl: we always have an ipl device
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
Both s390 machines unconditionally create an ipl device, so no need to handle the missing case.
Now we can also change s390_ipl_update_diag308() to return void.
--- hw/s390x/ipl.c | 26 ++++++++++++-------------- hw/s390x/ipl.h | 2 +- target-s390x/misc_helper.c | 7 ++----- 3 files changed, 15 insertions(+), 20 deletions(-)
hw/s390x/ipl.c +12 -14
@@ -95,6 +95,11 @@ static const VMStateDescription vmstate_ipl = { } }; +static S390IPLState *get_ipl_device (void ) +{ +return S390_IPL (object_resolve_path_type ("" ,TYPE_S390_IPL ,NULL )); +} +static uint64_t bios_translate_addr (void *opaque,uint64_t srcaddr) {uint64_t dstaddr = *(uint64_t *) opaque;
@@ -251,25 +256,19 @@ out:return (uint32_t ) (ipl->cssid <<24 | ipl->ssid <<16 | ipl->devno); } -int s390_ipl_update_diag308 (IplParameterBlock *iplb) +void s390_ipl_update_diag308 (IplParameterBlock *iplb) { -S390IPLState *ipl; +S390IPLState *ipl =get_ipl_device (); - ipl =S390_IPL (object_resolve_path (TYPE_S390_IPL ,NULL )); -if (ipl) { - ipl->iplb = *iplb; - ipl->iplb_valid = true; -return 0 ; - } -return -1 ; + ipl->iplb = *iplb; + ipl->iplb_valid = true; }IplParameterBlock *s390_ipl_get_iplb (void ) { -S390IPLState *ipl; +S390IPLState *ipl =get_ipl_device (); - ipl =S390_IPL (object_resolve_path (TYPE_S390_IPL ,NULL )); -if (!ipl || !ipl->iplb_valid) { +if (!ipl->iplb_valid) {return NULL ; }return &ipl->iplb;
@@ -277,9 +276,8 @@ IplParameterBlock *s390_ipl_get_iplb(void)void s390_reipl_request (void ) { -S390IPLState *ipl; +S390IPLState *ipl =get_ipl_device (); - ipl =S390_IPL (object_resolve_path (TYPE_S390_IPL ,NULL )); ipl->reipl_requested = true;qemu_system_reset_request (); }
hw/s390x/ipl.h +1 -1
@@ -18,7 +18,7 @@ typedef struct IplParameterBlock {uint8_t reserved2[88 ]; } IplParameterBlock; -int s390_ipl_update_diag308 (IplParameterBlock *iplb); +void s390_ipl_update_diag308 (IplParameterBlock *iplb);IplParameterBlock *s390_ipl_get_iplb (void );void s390_reipl_request (void );
target-s390x/misc_helper.c +2 -5
@@ -233,11 +233,8 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3) } iplb =g_malloc0 (sizeof (struct IplParameterBlock ));cpu_physical_memory_read (addr, iplb,sizeof (struct IplParameterBlock )); -if (!s390_ipl_update_diag308 (iplb)) { - env->regs[r1 +1 ] =DIAG_308_RC_OK ; - }else { - env->regs[r1 +1 ] =DIAG_308_RC_INVALID ; - } +s390_ipl_update_diag308 (iplb); + env->regs[r1 +1 ] =DIAG_308_RC_OK ;g_free (iplb);return ;case 6 :
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 8/9] s390x: reset crypto only on clear reset and QEMU reset
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
Initializing VM crypto in initial cpu reset has multiple problems
1. We call the exact same function #VCPU times, although one time is enough
2. On SIGP initial cpu reset, we exchange the wrapping key while other VCPUs are running. Bad!
3. It is simply wrong. According to the Pop, a reset happens only during a clear reset.
So, we have to reset the keys
- on modified clear reset
- on load clear (QEMU reset - via machine reset)
- on qemu start (via machine reset)
--- hw/s390x/s390-virtio.c | 1 + target-s390x/cpu.h | 11 +++++++++++ target-s390x/kvm.c | 4 +--- target-s390x/misc_helper.c | 1 + 4 files changed, 14 insertions(+), 3 deletions(-)
hw/s390x/s390-virtio.c +1 -0
@@ -320,6 +320,7 @@ void s390_machine_reset(void)S390CPU *ipl_cpu =S390_CPU (qemu_get_cpu (0 ));qemu_devices_reset (); +s390_crypto_reset ();/* all cpus are stopped - configure and start the ipl cpu only */ s390_ipl_prepare_cpu (ipl_cpu);
target-s390x/cpu.h +11 -0
@@ -1166,6 +1166,7 @@ void kvm_s390_reset_vcpu(S390CPU *cpu);int kvm_s390_set_mem_limit (KVMState *s,uint64_t new_limit,uint64_t *hw_limit);void kvm_s390_vcpu_interrupt_pre_save (S390CPU *cpu);int kvm_s390_vcpu_interrupt_post_load (S390CPU *cpu); +void kvm_s390_crypto_reset (void );#else static inline void kvm_s390_io_interrupt(uint16_t subchannel_id, uint16_t subchannel_nr,
@@ -1215,6 +1216,9 @@ static inline int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) {return 0 ; } +static inline void kvm_s390_crypto_reset (void ) +{ +}#endif static inline int s390_set_memory_limit (uint64_t new_limit,uint64_t *hw_limit)
@@ -1261,6 +1265,13 @@ static inline int s390_assign_subch_ioeventfd(EventNotifier *notifier,return kvm_s390_assign_subch_ioeventfd (notifier, sch_id, vq, assign); } +static inline void s390_crypto_reset (void ) +{ +if (kvm_enabled ()) { +kvm_s390_crypto_reset (); + } +} +#ifdef CONFIG_KVM static inline bool vregs_needed (void *opaque) {
target-s390x/kvm.c +1 -3
@@ -249,7 +249,7 @@ static void kvm_s390_init_dea_kw(void) } } -static void kvm_s390_init_crypto (void ) +void kvm_s390_crypto_reset (void ) {kvm_s390_init_aes_kw ();kvm_s390_init_dea_kw ();
@@ -301,8 +301,6 @@ void kvm_s390_reset_vcpu(S390CPU *cpu)if (kvm_vcpu_ioctl (cs,KVM_S390_INITIAL_RESET ,NULL )) {error_report ("Initial CPU reset failed on CPU %i" , cs->cpu_index); } - -kvm_s390_init_crypto (); }static int can_sync_regs (CPUState *cs,int regs)
target-s390x/misc_helper.c +1 -0
@@ -129,6 +129,7 @@ static int modified_clear_reset(S390CPU *cpu) }cmma_reset (cpu);subsystem_reset (); +s390_crypto_reset (); scc->load_normal (CPU (cpu));cpu_synchronize_all_post_reset ();resume_all_vcpus ();
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 1/9] util/qemu-config: fix missing machine command line options
In reply to Cornelia HuckFrom: Tony Krowiak <[email protected]>
Commit 0a7cf217 ("util/qemu-config: fix regression of qmp_query_command_line_options") aimed to restore parsing of global machine options, but missed two: "aes-key-wrap" and "dea-key-wrap" (which were present in the initial version of that patch). Let's add them to the machine_opts again.
qmp_query_command_line_options")
Message-Id: <[email protected]>
--- util/qemu-config.c | 8 ++++++++ 1 file changed, 8 insertions(+)
util/qemu-config.c +8 -0
@@ -219,6 +219,14 @@ static QemuOptsList machine_opts = { .name = "suppress-vmdesc", .type = QEMU_OPT_BOOL, .help = "Set on to disable self-describing migration", + },{ + .name = "aes-key-wrap", + .type = QEMU_OPT_BOOL, + .help = "enable/disable AES key wrapping using the CPACF wrapping key", + },{ + .name = "dea-key-wrap", + .type = QEMU_OPT_BOOL, + .help = "enable/disable DEA key wrapping using the CPACF wrapping key", }, {/* End of list */ } }
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 3/9] s390x/kvm: Fix vector validity bit in device machine checks
In reply to Cornelia HuckFrom: Christian Borntraeger <[email protected]>
Device hotplugs trigger a crw machine check. All machine checks have validity bits for certain register types. With vector support we also have to claim that vector registers are valid. This is a band-aid suitable for stable. Long term we should create the full mcic value dynamically depending on the active features in the kernel interrupt handler.
--- target-s390x/kvm.c | 3 +++ 1 file changed, 3 insertions(+)
target-s390x/kvm.c +3 -0
@@ -2072,6 +2072,9 @@ void kvm_s390_crw_mchk(void) .u.mchk.cr14 = 1 << 28, .u.mchk.mcic = 0x00400f1d40330000ULL, }; +if (kvm_check_extension (kvm_state,KVM_CAP_S390_VECTOR_REGISTERS )) { + irq.u.mchk.mcic |=0x0000004000000000ULL ; + }kvm_s390_floating_interrupt (&irq); }
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 4/9] s390x: flagify mcic values
In reply to Cornelia HuckInstead of using magic values when building the machine check interruption code, add some defines as by chapter 11-14 in the PoP.
This should make it easier to catch problems like the missing vector register validity bit ("s390x/kvm: Fix vector validity bit in device machine checks"), and less hassle should we want to generate machine checks beyond the channel reports we currently support.
--- target-s390x/cpu.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ target-s390x/kvm.c | 23 +++++++++++++++++++---- 2 files changed, 64 insertions(+), 4 deletions(-)
target-s390x/cpu.h +45 -0
@@ -1275,4 +1275,49 @@ static inline bool vregs_needed(void *opaque)return 0 ; }#endif + +/* machine check interruption code */ + +/* subclasses */ +#define MCIC_SC_SD 0x8000000000000000ULL +#define MCIC_SC_PD 0x4000000000000000ULL +#define MCIC_SC_SR 0x2000000000000000ULL +#define MCIC_SC_CD 0x0800000000000000ULL +#define MCIC_SC_ED 0x0400000000000000ULL +#define MCIC_SC_DG 0x0100000000000000ULL +#define MCIC_SC_W 0x0080000000000000ULL +#define MCIC_SC_CP 0x0040000000000000ULL +#define MCIC_SC_SP 0x0020000000000000ULL +#define MCIC_SC_CK 0x0010000000000000ULL + +/* subclass modifiers */ +#define MCIC_SCM_B 0x0002000000000000ULL +#define MCIC_SCM_DA 0x0000000020000000ULL +#define MCIC_SCM_AP 0x0000000000080000ULL + +/* storage errors */ +#define MCIC_SE_SE 0x0000800000000000ULL +#define MCIC_SE_SC 0x0000400000000000ULL +#define MCIC_SE_KE 0x0000200000000000ULL +#define MCIC_SE_DS 0x0000100000000000ULL +#define MCIC_SE_IE 0x0000000080000000ULL + +/* validity bits */ +#define MCIC_VB_WP 0x0000080000000000ULL +#define MCIC_VB_MS 0x0000040000000000ULL +#define MCIC_VB_PM 0x0000020000000000ULL +#define MCIC_VB_IA 0x0000010000000000ULL +#define MCIC_VB_FA 0x0000008000000000ULL +#define MCIC_VB_VR 0x0000004000000000ULL +#define MCIC_VB_EC 0x0000002000000000ULL +#define MCIC_VB_FP 0x0000001000000000ULL +#define MCIC_VB_GR 0x0000000800000000ULL +#define MCIC_VB_CR 0x0000000400000000ULL +#define MCIC_VB_ST 0x0000000100000000ULL +#define MCIC_VB_AR 0x0000000040000000ULL +#define MCIC_VB_PR 0x0000000000200000ULL +#define MCIC_VB_FC 0x0000000000100000ULL +#define MCIC_VB_CT 0x0000000000020000ULL +#define MCIC_VB_CC 0x0000000000010000ULL +#endif
target-s390x/kvm.c +19 -4
@@ -2065,16 +2065,31 @@ void kvm_s390_io_interrupt(uint16_t subchannel_id,kvm_s390_floating_interrupt (&irq); } +static uint64_t build_channel_report_mcic (void ) +{ +uint64_t mcic; + +/* subclass: indicate channel report pending */ + mcic =MCIC_SC_CP | +/* subclass modifiers: none */ +/* storage errors: none */ +/* validity bits: no damage */ +MCIC_VB_WP |MCIC_VB_MS |MCIC_VB_PM |MCIC_VB_IA |MCIC_VB_FP | +MCIC_VB_GR |MCIC_VB_CR |MCIC_VB_ST |MCIC_VB_AR |MCIC_VB_PR | +MCIC_VB_FC |MCIC_VB_CT |MCIC_VB_CC ; +if (kvm_check_extension (kvm_state,KVM_CAP_S390_VECTOR_REGISTERS )) { + mcic |=MCIC_VB_VR ; + } +return mcic; +} +void kvm_s390_crw_mchk (void ) {struct kvm_s390_irq irq = { .type =KVM_S390_MCHK , .u.mchk.cr14 =1 <<28 , - .u.mchk.mcic =0x00400f1d40330000ULL , + .u.mchk.mcic =build_channel_report_mcic (), }; -if (kvm_check_extension (kvm_state,KVM_CAP_S390_VECTOR_REGISTERS )) { - irq.u.mchk.mcic |=0x0000004000000000ULL ; - }kvm_s390_floating_interrupt (&irq); }
Signature · 1 line
2.6.2
[Qemu-devel] [PULL v2 2/9] s390x/virtio-ccw: fix 2.4 virtio compat
In reply to Cornelia HuckCommit 542571d5 ("virtio-ccw: enable virtio-1") missed some virtio devices for the 2.4 compat handling. Add them.
--- hw/s390x/s390-virtio-ccw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
hw/s390x/s390-virtio-ccw.c +12 -0
@@ -262,6 +262,18 @@ static const TypeInfo ccw_machine_info = { .driver = "virtio-rng-ccw",\ .property = "max_revision",\ .value = "0",\ + },{\ + .driver = "virtio-net-ccw",\ + .property = "max_revision",\ + .value = "0",\ + },{\ + .driver = "virtio-scsi-ccw",\ + .property = "max_revision",\ + .value = "0",\ + },{\ + .driver = "vhost-scsi-ccw",\ + .property = "max_revision",\ + .value = "0",\ }, static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
Signature · 1 line
2.6.2
Peter Maydell
AppliedQuoted 11 lines · Cornelia Huck
Changes
v1->v2:
- Fix declaration of reset_dev_types[]The following changes since commit
ee9dfed242610ecb91418270fd46b875ed56e201:Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20151020-1' into staging (2015-10-20 12:56:45 +0100)
are available in the git repository at:
git://github.com/cohuck/qemutags/s390x-20151021-v2
Quoted 8 lines
for you to fetch changes up to
1cd4e0f6f0a6b1978a5868b41d4faae2071dc4ee:s390x/cmma: clean up cmma reset (2015-10-21 12:21:30 +0200)
----------------------------------------------------------------
More s390x patches. The first ones are fixes: A regression, missed compat and a missed part of the SIMD support. The others contain optimizations and cleanup.
Applied, thanks.
-- PMM