(0.12) S390 patches
cover (0.12) S390 patches
While trying out 0.12-rc2 on my S390x, I stumbled over several issues.
This set fixes them, making KVM on S390x work great again.
Alexander Graf (3):
S390: Loop through virtio console devices add default virtcon initialization
S390: Don't tell guest we're updating config space
hw/s390-virtio-bus.c | 2 +- hw/s390-virtio.c | 6 +++++- vl.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-)
PATCH 1/3 S390: Loop through virtio console devices
We used to always create one single virtio console device. This breaks when either zero of multiple virtio console devices are requested, so let's use the same code as on x86.
--- hw/s390-virtio.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
hw/s390-virtio.c +5 -1
@@ -201,7 +201,11 @@ static void s390_init(ram_addr_t ram_size, }/* Create VirtIO console */ -qdev_init_nofail (qdev_create ((BusState *)s390_bus,"virtio-console-s390" )); +for (i =0 ; i <MAX_VIRTIO_CONSOLES ; i++) { +if (virtcon_hds[i]) { +qdev_init_nofail (qdev_create ((BusState *)s390_bus,"virtio-console-s390" )); + } + }/* Create VirtIO network adapters */ for (i =0 ; i < nb_nics; i++) {
Signature · 1 line
1.6.0.2
PATCH 2/3 add default virtcon initialization
In reply to Alexander GrafWhen going through the default devices, we don't initialize the virtio console, unless we're doing -nographic.
I suppose that's just a leftover from the recent code restructuring, so let's put it in.
--- vl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
vl.c +2 -0
@@ -5712,6 +5712,8 @@ int main(int argc, char **argv, char **envp)add_device_config (DEV_PARALLEL ,"vc:80Cx24C" );if (default_monitor)monitor_parse ("vc:80Cx24C" ,"readline" ); +if (default_virtcon) +add_device_config (DEV_VIRTCON ,"vc:80Cx24C" ); }if (default_vga) vga_interface_type =VGA_CIRRUS ;
Signature · 1 line
1.6.0.2
PATCH 3/3 S390: Don't tell guest we're updating config space
In reply to Alexander GrafCurrently we always set the "config space changed" bit to 1 when triggering any virtio interrupt. While that worked in 2.6.27, newer kernels interpret that value as "only the config space changed and nothing else happened".
Since we usually trigger interrupts to tell the guest that something did happen, we just not tell it the config space changed for now until we implement the correct callback for that.
--- hw/s390-virtio-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/s390-virtio-bus.c +1 -1
@@ -307,7 +307,7 @@ static void virtio_s390_notify(void *opaque, uint16_t vector)uint64_t token =s390_virtio_device_vq_token (dev, vector);/* XXX kvm dependency! */ -kvm_s390_virtio_irq (s390_cpu_addr2state (0 ),1 , token); +kvm_s390_virtio_irq (s390_cpu_addr2state (0 ),0 , token); }/**************** S390 Virtio Bus Device Descriptions *******************/
Signature · 1 line
1.6.0.2