[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/17] s390x: keep hint on virtio managing size
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH 10/17] s390x: keep hint on virtio managing size |
Date: |
Mon, 18 Apr 2011 23:03:59 +0200 |
On 18.04.2011, at 21:06, Aurelien Jarno wrote:
> On Fri, Apr 15, 2011 at 05:32:51PM +0200, Alexander Graf wrote:
>> The s390x virtio bus keeps management information on virtio after the top
>> of the guest's RAM. We need to be able to tell the guest the size of its
>> RAM (without virtio stuff), but also be able to trap when the guest accesses
>> RAM outside of its scope (including virtio stuff).
>>
>> So we need a variable telling us the size of the virtio stuff, so we can
>> calculate the highest available RAM address from that.
>>
>> While at it, also increase the maximum number of virtio pages, so we play
>> along well with more recent kernels that spawn a ridiculous number of virtio
>> console adapters.
>>
>> Signed-off-by: Alexander Graf <address@hidden>
>> ---
>> hw/s390-virtio-bus.c | 3 +++
>> hw/s390-virtio-bus.h | 2 +-
>> target-s390x/cpu.h | 3 +++
>> 3 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
>> index bb49e39..a90963b 100644
>> --- a/hw/s390-virtio-bus.c
>> +++ b/hw/s390-virtio-bus.c
>> @@ -60,6 +60,9 @@ static const VirtIOBindings virtio_s390_bindings;
>>
>> static ram_addr_t s390_virtio_device_num_vq(VirtIOS390Device *dev);
>>
>> +/* length of VirtIO device pages */
>> +target_phys_addr_t virtio_size = S390_DEVICE_PAGES * TARGET_PAGE_SIZE;
>> +
>
> If this variable is never written, can it be declared const?
Does that improve anything for exported variables? Do they get put into a ro
section then?
Alex
- Re: [Qemu-devel] [PATCH 08/17] s390x: Dispatch interrupts to KVM or the real CPU, (continued)
- [Qemu-devel] [PATCH 13/17] s390x: Adjust internal kvm code, Alexander Graf, 2011/04/15
- [Qemu-devel] [PATCH 01/17] tcg: extend max tcg opcodes on 32bit, Alexander Graf, 2011/04/15
- [Qemu-devel] [PATCH 06/17] s390x: Prepare cpu.h for emulation, Alexander Graf, 2011/04/15
- [Qemu-devel] [PATCH 07/17] s390x: Enable s390x-softmmu target, Alexander Graf, 2011/04/15
- [Qemu-devel] [PATCH 10/17] s390x: keep hint on virtio managing size, Alexander Graf, 2011/04/15
- [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Alexander Graf, 2011/04/15
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Riku Voipio, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Alexander Graf, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Riku Voipio, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Jan-Simon Möller, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Alexander Graf, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Aurelien Jarno, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Alexander Graf, 2011/04/18
- Re: [Qemu-devel] [PATCH 02/17] s390x: s390x-linux-user support, Aurelien Jarno, 2011/04/18