qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] qemu VGA endian swap low level drawing changes


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [RFC] qemu VGA endian swap low level drawing changes
Date: Tue, 17 Jun 2014 19:18:11 +1000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/17/2014 03:36 PM, Paolo Bonzini wrote:
> Il 17/06/2014 06:59, Benjamin Herrenschmidt ha scritto:
>> Thanks. I've tried the other approach of adding new functions which
>> means no overhead (hopefully) for the non-swap case and less invasive
>> changes to vga_template.c.
>>
>> Patch below. What do you think ? This or the previous approach ? Then we
>> can discuss how we actually trigger the endian change and where we store
>> the state :-)
> 
> This is definitely more readable.  Anyway Gerd is the VGA guy. :)

I am that lucky person who got to do endianness-on-fly-switching
QOM'fication :)

We have 2 ways of doing this:

1. implement a VGA register in QEMU and use it from the guest;
there is a try to discuss it in "[Qemu-devel] Endian control register";
requires guest changes;

2. on SPAPR we have H_SET_MODE hypercall which guest uses when it switches
endianness and current hack is to change the flag directly in VGA device
from this hypercall handler. Instead of that hack, we could have added a
device callback:

void DeviceClass::endianness_notify(DeviceState *dev,
                enum device_endian endianness);

or even an Interface (with the same method alone). And in H_SET_MODE we
could walk through all devices in the system and poke ones which implement
a callback or an interface. virtio could benefit from this as well.

Ideas?


-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]