This patch prevents the sheepdog driver from sleeping in coroutine
context long time.
The first patch makes the driver use a non-blocking socket and the
second one fixes a bug that yielded coroutines aren't entered.
Changes from v2:
- add a patch to use non-blocking fd
- add explanation why it
Using a blocking socket in the coroutine context reduces the chance of
switching to other work. This patch makes the sheepdog driver use a
non-blocking fd always.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/
If an io_flush handler is not set, qemu_aio_wait doesn't invoke
callbacks.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 27abef2..4245328 100644
--- a/block/sheepdog
this patch adopts the loop unrolling idea of bitmap_is_zero() to
speed up the skipping of large areas with zeros in find_next_bit().
this routine is extensively used to find dirty pages in
live migration.
testing only the find_next_bit performance on a zeroed bitfield
the loop onrolling decrease
Il 12/03/2013 07:48, Richard Henderson ha scritto:
> On 2013-03-11 04:17, Paolo Bonzini wrote:
>> == hw/pci ==
>> hw/alpha_typhoon.c hw/pci/host-typhoon.c
>
> Why wouldn't this go into hw/alpha/, really?
Sure. I think the Alpha-specific interrupt delivery parts should b
On 01/03/2013 14:33, Paolo Bonzini wrote:
Done with this script:
cd hw
for i in `find . -name '*.h' | sed 's/^..//'`; do
echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved.
Instead, files in hw/dataplane
On Tue, Mar 12, 2013 at 02:29:42PM +0800, Asias He wrote:
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index 39c1966..4a97ca1 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
These changes break the build for non-Linux hosts. Please introduce a
CONFIG_VHOST_SCSI and #ifdef appropriate
Il 12/03/2013 09:19, KONRAD Frédéric ha scritto:
> On 01/03/2013 14:33, Paolo Bonzini wrote:
>> Done with this script:
>>
>> cd hw
>> for i in `find . -name '*.h' | sed 's/^..//'`; do
>>echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
>> done | sed -i -f - `find . -type f`
>>
>> This is so that
On 12/03/2013 09:19, KONRAD Frédéric wrote:
On 01/03/2013 14:33, Paolo Bonzini wrote:
Done with this script:
cd hw
for i in `find . -name '*.h' | sed 's/^..//'`; do
echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
done | sed -i -f - `find . -type f`
This is so that paths remain valid as fil
On Mon, Mar 11, 2013 at 02:44:03PM +0100, Peter Lieven wrote:
> I ever since had a few VMs which are very hard to migrate because of a lot of
> memory I/O. I found that finding the next dirty bit
> seemed to be one of the culprits (apart from removing locking which Paolo is
> working on).
>
> I
From: KONRAD Frederic
These structures must be made public to avoid two memory allocations for
refactored virtio devices.
Signed-off-by: KONRAD Frederic
Reviewed-by: Andreas Färber
Changes V4 <- V3:
* Rebased on current git.
Changes V3 <- V2:
* Style correction spotted by Andreas (vir
于 2013-1-15 15:03, Wenchao Xia 写道:
于 2013-1-14 18:06, Stefan Hajnoczi 写道:
On Mon, Jan 14, 2013 at 10:56:30AM +0800, Wenchao Xia wrote:
于 2013-1-11 17:12, Stefan Hajnoczi 写道:
On Fri, Jan 11, 2013 at 02:22:28PM +0800, Wenchao Xia wrote:
于 2013-1-10 20:41, Stefan Hajnoczi 写道:
On Thu, Jan 10, 20
Am 12.03.2013 um 09:35 schrieb Stefan Hajnoczi :
> On Mon, Mar 11, 2013 at 02:44:03PM +0100, Peter Lieven wrote:
>> I ever since had a few VMs which are very hard to migrate because of a lot
>> of memory I/O. I found that finding the next dirty bit
>> seemed to be one of the culprits (apart from
Il 07/03/2013 03:06, liu ping fan ha scritto:
> > From what I gathered from the other thread, the path forward was to
> > replace the global iohandler list that we currently use to drive
> > NetClient events and replace it with a GSource and GMainContext, rather
> > than relying on AioContexts.
>
Il 07/03/2013 03:53, Liu Ping Fan ha scritto:
> From: Liu Ping Fan
>
> With refcnt, NetClientState's caller can run agaist reclaimer.
>
> Signed-off-by: Liu Ping Fan
> ---
> hw/qdev-properties-system.c | 14 +
> include/net/net.h |3 ++
> net/hub.c
Il 07/03/2013 03:53, Liu Ping Fan ha scritto:
> From: Liu Ping Fan
>
> Forward packet to other hub ports by their AioContext.
>
> Signed-off-by: Liu Ping Fan
> ---
> hw/qdev-properties-system.c |1 +
> include/block/aio.h |1 +
> include/net/net.h |5 +
> incl
Il 07/03/2013 03:53, Liu Ping Fan ha scritto:
> From: Liu Ping Fan
>
> Introduce nc->send_lock, it shield off the race of nc->peer's reader and
> deleter. With it, after deleter finish, no new qemu_send_packet_xx()
> can reach ->send_queue, so no new reference(packet->sender) to nc will
> be appe
This patch add support for a new way to initialize chardev devices.
Instead of calling a initialization function with a QemuOpts we will
now create a (qapi) ChardevBackend, optionally call a function to
fill ChardevBackend from QemuOpts, then go create the chardev using
the new qapi code path which
This patch switches over the parallel chardev initialization
to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qemu-char.c | 37 +
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 8bedabb..2bc1021 1006
Hi,
v3 of this series. Rebased to latest master, picked up a fix from Igor,
fixed a tyops in the udp commit message. No changes in the actual code
and in the qapi interface.
The plumbing has changed quite a bit though as the chardev backend table
has been replaced by a backend driver registra
This patch adds 'msmouse' support to qapi and also switches over
the msmouse chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
backends/msmouse.c |4 ++--
include/char/char.h |3 +++
qapi-schema.json|3 ++-
qemu-char.c |3 +++
4 files
This patch switches over the serial chardev initialization
to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qemu-char.c | 37 +
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 10f5f57..8bedabb 100644
This patch switches over the 'null' chardev initialization
to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qemu-char.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 38890ed..2bf12cd 100644
--- a/qemu-char.c
+++ b/qemu-cha
This adds mux chardev support to the qapi and also makes the qapi-based
chardev creation path handle the "mux=on" option correctly.
---
qapi-schema.json | 14 +-
qemu-char.c | 35 ---
2 files changed, 45 insertions(+), 4 deletions(-)
diff --git
This patch switches over the 'file' chardev initialization
to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qemu-char.c | 43 +++
1 file changed, 15 insertions(+), 28 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 1991c82..66ae8aa
This patch adds 'braille' support to qapi and also switches over
the braille chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
backends/baum.c |4 ++--
include/char/char.h |3 +++
qapi-schema.json|3 ++-
qemu-char.c |5 +
4 fil
Il 07/03/2013 03:53, Liu Ping Fan ha scritto:
> From: Liu Ping Fan
>
> Signed-off-by: Liu Ping Fan
> ---
> net/hub.c | 27 ++-
> 1 files changed, 26 insertions(+), 1 deletions(-)
You are introducing three locks. Please document for each one how can
concurrent access
This patch adds 'console' support to qapi and also switches over the
console chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qapi-schema.json |3 ++-
qemu-char.c |9 +++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/qapi-sche
Hi,
> git://git.kraxel.org/qemu chardev.3
Pushed chardev.4 ...
> chardev: add vc support to qapi
> [fixup] vc
... with these two guys squashed.
sorry for the trouble,
Gerd
Signed-off-by: Lei Li
---
qga/commands-win32.c | 32
1 file changed, 32 insertions(+)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 7e8ecb3..0a2bb34 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -22,6 +22,12 @@
#define SHTDN_RE
Signed-off-by: Lei Li
---
qga/commands-win32.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 0a2bb34..e000324 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -140,6 +140,40 @@ int64_t qmp_g
From: Igor Mitsyanko
Current colon position in "waiting for telnet connection" message template
produces messages like:
QEMU waiting for connection on: telnet::127.0.0.1,server
After moving a colon to the right, we will get a correct messages like:
QEMU waiting for connection on: telnet:127.
This patch series attempts to add Windows implementation
for qemu-ga commands guest-get-time and guest-set-time.
The previous thread about the interfaces introduced and
the POSIX-specific command implementation has already
been accepted, the reference link:
http://article.gmane.org/gmane.comp.em
Am 11.03.2013 um 19:03 hat Ján Tomko geschrieben:
> On 03/04/2013 04:40 PM, Kevin Wolf wrote:
> > Am 04.03.2013 um 16:19 hat Daniel P. Berrange geschrieben:
> >> On Mon, Mar 04, 2013 at 04:05:50PM +0100, Kevin Wolf wrote:
> >>>
> >>> I'm not talking about the QEMU cli, but about qcow2 as the format
Signed-off-by: Gerd Hoffmann
---
qemu-char.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/qemu-char.c b/qemu-char.c
index ef10200..a1c668f 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3713,6 +3713,9 @@ ChardevReturn *qmp_chardev_add(const char *id,
ChardevBackend *backend,
This patch adds 'vc' support to qapi and also switches over the
vc chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
include/ui/console.h |4 ++--
qapi-schema.json | 20 -
ui/console.c | 61 +
This patch adds 'stdio' support to qapi and also switches over the
stdio chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qapi-schema.json | 16 +++-
qemu-char.c | 26 --
2 files changed, 35 insertions(+), 7 deletions
On 11 March 2013 22:15, Andreas Färber wrote:
> Am 11.03.2013 19:14, schrieb Peter Maydell:
>> Hi; I'm currently looking at fixing the warnings that qemu generates in
>> MacOSX syslog regarding CPSGetCurrentProcess and CPSEnableForegroundOperation
>> being deprecated. The new API for doing this is
This patch adds 'memory' support to qapi and also switches over
the memory chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qapi-schema.json | 14 +-
qemu-char.c | 30 +++---
2 files changed, 36 insertions(+), 8 delet
This patch adds 'udp' support to qapi.
Signed-off-by: Gerd Hoffmann
---
include/qemu/sockets.h |1 +
qapi-schema.json | 16 +++-
qemu-char.c| 44 ++--
util/qemu-sockets.c| 25 +
4 files ch
This reverts commit 8a14952c9d2f5fa2b3caa6dc286b62ed5d26bca7.
---
hmp-commands.hx | 63 +++
1 file changed, 31 insertions(+), 32 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 69c707d..79bbcc6 100644
--- a/hmp-commands.hx
++
Am 10.03.2013 um 10:57 hat Dietmar Maurer geschrieben:
> > The difference between this approach and Dietmar's series is that the backup
> > archive format is implemented outside QEMU and runs as a separate program.
> >
> > This way, management tools like proxmox, oVirt, OpenStack, and others can
>
This patch adds 'spicevmc' and 'spiceport' support to qapi and also
switches over the spice chardev initialization to the new qapi code
path.
---
include/ui/qemu-spice.h |7 --
qapi-schema.json| 26 +++-
qemu-char.c |8 ++
spice-qemu-char.c
This patch switches over the pty chardev initialization
to the new qapi code path.
Bonus: Taking QemuOpts out of the loop allows some nice
cleanups along the way.
Signed-off-by: Gerd Hoffmann
---
qemu-char.c | 35 ++-
1 file changed, 10 insertions(+), 25 deleti
From: KONRAD Frederic
Here the virtio-blk-pci is modified for the new API. The device
virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk
during the init. The properties are not changed.
Signed-off-by: KONRAD Frederic
---
hw/virtio-pci.c | 115 ++
From: KONRAD Frederic
The configuration field must not be a pointer as it will be used for virtio-blk
properties. So *blk is replaced by blk in VirtIOBlock structure.
Signed-off-by: KONRAD Frederic
---
hw/virtio-blk.c | 8
hw/virtio-blk.h | 2 +-
2 files changed, 5 insertions(+), 5 de
From: KONRAD Frederic
Create virtio-blk which extends virtio-device, so it can be connected on
virtio-bus.
Signed-off-by: KONRAD Frederic
---
hw/virtio-blk.c | 98 ++---
hw/virtio-blk.h | 28 +
hw/virtio-pci.c | 11 +--
3
On Tue, Mar 12, 2013 at 04:05:41PM +0900, MORITA Kazutaka wrote:
> This patch prevents the sheepdog driver from sleeping in coroutine
> context long time.
>
> The first patch makes the driver use a non-blocking socket and the
> second one fixes a bug that yielded coroutines aren't entered.
>
> Ch
From: KONRAD Frederic
This is the next part of virtio-refactoring.
Basically it creates virtio-blk device which extends virtio-device.
Then a virtio-blk can be connected on a virtio-bus.
virtio-blk-pci, virtio-blk-s390x, virtio-blk-ccw are created too, they extend
respectively virtio-pci, virtio
From: KONRAD Frederic
Here the virtio-blk-s390 is modified for the new API. The device
virtio-blk-s390 extends virtio-s390-device as before. It creates and
connects a virtio-blk during the init. The properties are not modified.
Signed-off-by: KONRAD Frederic
---
hw/s390x/s390-virtio-bus.c | 30
From: KONRAD Frederic
Use QOM casts inside virtio-blk.
Signed-off-by: KONRAD Frederic
---
hw/virtio-blk.c | 33 ++---
hw/virtio-blk.h | 2 +-
2 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 935aad4..556d6d9 1
This patch adds 'pipe' support to qapi and also switches over the
pipe chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann
---
qapi-schema.json |3 ++-
qemu-char.c | 31 ++-
2 files changed, 24 insertions(+), 10 deletions(-)
diff
From: KONRAD Frederic
The qdev field is no longer needed, just drop it.
Signed-off-by: KONRAD Frederic
---
hw/virtio-blk.c | 3 +--
hw/virtio-blk.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 556d6d9..fffeeae 100644
--- a/hw/virt
From: KONRAD Frederic
Here the virtio-ccw-s390 is modified for the new API. The device
virtio-ccw-s390 extends virtio-ccw-device as before. It creates and
connects a virtio-ccw during the init. The properties are not modified.
Signed-off-by: KONRAD Frederic
---
hw/s390x/virtio-ccw.c | 37 +
From: KONRAD Frederic
As all virtio-blk-* are switched to the new API, we can remove the separate
init/exit for the old API.
Signed-off-by: KONRAD Frederic
---
hw/virtio-blk.c | 85 ++---
hw/virtio.h | 2 --
2 files changed, 21 insertion
On Mon, Mar 11, 2013 at 04:20:03PM +0100, Benoît Canet wrote:
> > > +if (dedup) {
> > > +version = 3;
> > > +}
> >
> > Lazy refcounts don't force the version. It would be consistent to
> > refrain from forcing the version too.
>
> I don't understand. Aren't the incompatible featu
On Sat, Mar 09, 2013 at 11:21:01AM +0200, Dmitry Fleytman wrote:
> This set of patches implements VMWare VMXNET3 paravirtual NIC device.
> The device supports of all the device features including offload capabilties,
> VLANs and etc.
> The device is tested on different OSes:
> Fedora 15
> U
Il 14/02/2013 21:21, Satoru Moriya ha scritto:
> We have some plans to migrate legacy enterprise systems which require
> low latency (10 msec order) to kvm virtualized environment. In our
> usecase, the system runs with other untrusted guests and so locking
> memory which is used by the system is n
Am 07.03.2013 19:12, schrieb Igor Mammedov:
> commit 55e5c2850 breaks CPU not found return value, and returns
> CPU corresponding to the last non NULL env.
> Fix it by returning CPU only if env is not NULL, otherwise CPU is
> not found and function should return NULL.
>
> Signed-off-by: Igor Mamme
From: Igor Mammedov
Commit 55e5c2850 breaks CPU not found return value, and returns
CPU corresponding to the last non NULL env.
Fix it by returning CPU only if env is not NULL, otherwise CPU is
not found and function should return NULL.
Signed-off-by: Igor Mammedov
Signed-off-by: Andreas Färber
No functional change, just less usages of first_cpu and next_cpu fields.
env is passed to cpu_memory_rw_debug(), which in turn passes it to
target-specific cpu_get_phys_page_debug(). Changing both would be a
larger refactoring, so defer that by using env_ptr for now.
Reviewed-by: Luiz Capitulino
This avoids adding a duplicate stub for CONFIG_USER_ONLY.
Suggested-by: Eduardo Habkost
Reviewed-by: Eduardo Habkost
Reviewed-by: Juan Quintela
Signed-off-by: Andreas Färber
---
include/migration/vmstate.h | 12 ++--
savevm.c|7 ---
2 Dateien geändert, 10
Store legacy name in SuperHCPUClass for -cpu ? and for case-insensitive
class lookup.
List CPUs by iterating over TYPE_SUPERH_CPU subclasses.
Signed-off-by: Andreas Färber
---
target-sh4/cpu-qom.h |7 ++
target-sh4/cpu.c | 180 +++-
targe
In comparison to DeviceClass::vmsd, CPU VMState is split in two,
"cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1.
Therefore add a CPU-specific CPUClass::vmsd field.
Unlike the legacy CPUArchState registration, rather register CPUState.
Signed-off-by: Juan Quintela
Signed-
Expose vmstate_cpu as vmstate_x86_cpu and hook it up to CPUClass::vmsd.
Adapt opaques and VMState fields to X86CPU. Drop cpu_{save,load}().
Reviewed-by: Eduardo Habkost
Signed-off-by: Andreas Färber
---
target-i386/cpu-qom.h |4 +
target-i386/cpu.c |2 +
target-i386/cpu.h |2
Reviewed-by: Juan Quintela
Reviewed-by: Eduardo Habkost
Signed-off-by: Andreas Färber
---
include/migration/vmstate.h |4
stubs/vmstate.c |2 ++
2 Dateien geändert, 6 Zeilen hinzugefügt(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 20d
Move it to qom/cpu.c to avoid build failures depending on include order
of cpu-qom.h and exec/cpu-all.h.
Change opaques of various ..._irq_handler() functions to the
appropriate CPU type to facilitate using cpu_reset_interrupt().
Fix Coding Style issues while at it (missing braces, indentation).
Reindent, add missing braces and drop/adjust whitespace.
Prepares for CPUArchState-to-CPUState field movements in
cpu_cris_handle_mmu_fault(), do_interruptv10() and do_interrupt().
The remaining functions were so minor that they can be fixed in one go.
Acked-by: Edgar E. Iglesias
Signed-off-by:
They are never changed once initialized, and moving them to the class
will allow to inspect them before instantiating.
Signed-off-by: Andreas Färber
---
hw/sh4/sh7750.c | 10 +++---
target-sh4/cpu-qom.h |6 ++
target-sh4/cpu.c | 18 +-
target-sh4/cpu.h
Add a vmstate_lm32_cpu referencing the previous VMStateDescription as a
sub-struct and hook it up to CPUClass::vmsd. Drop cpu_{save,load}().
Acked-by: Michael Walle
Signed-off-by: Andreas Färber
---
target-lm32/cpu-qom.h |4
target-lm32/cpu.c |1 +
target-lm32/cpu.h |2
Hello,
This is my current QOM CPU patch queue. Please pull.
It includes:
* qemu_get_cpu() bugfix and more uses,
* sh4 CPU subclasses,
* declarative VMStateDescription for CPUState,
* x86 CPU VMState conversion to CPUState,
* CPUState field movements and do_interrupt callback.
I am mostly unavail
This setter avoids redefining each VMStateDescription value to
vmstate_dummy by not referencing the value for CONFIG_USER_ONLY.
Suggested-by: Juan Quintela
Reviewed-by: Eduardo Habkost
Signed-off-by: Andreas Färber
---
include/qom/cpu.h | 21 +
1 Datei geändert, 21 Zeilen
Move it to qom/cpu.h to avoid issues with include order.
Change pc_acpi_smi_interrupt() opaque to X86CPU.
Signed-off-by: Andreas Färber
---
cpus.c |2 +-
exec.c |2 +-
hw/alpha_typhoon.c | 10 --
hw/apic.c| 21 +++
No functional change, just a reduction of CPU loops.
The mon_cpu field is left untouched for now since changing that requires
a number of larger prerequisites, including cpu_synchronize_state() and
mon_get_cpu().
Reviewed-by: Luiz Capitulino
Reviewed-by: Markus Armbruster
Signed-off-by: Andreas
Enable ARMCPUInfo to specify a custom class_init functions.
Introduce arm_v7m_class_init() and use it for "cortex-m3" model.
Instead of forwarding from arm_cpu_do_interrupt() to do_interrupt_v7m(),
override CPUClass::do_interrupt with arm_v7m_cpu_do_interrupt()
in arm_v7m_class_init().
Acked-by:
This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.
It will also allow to override the interrupt handling for certain CPU
families.
Signed-off-by: Andreas Färber
---
cpu-exec.c | 36 +++
On Mon, Mar 11, 2013 at 07:23:02PM +0800, Wenchao Xia wrote:
> In the use of snapshot a way to retrieve related info at runtime is needed,
> so this serial of patches will merge some code for qemu and qemu-img, and add
> following interfaces for qemu:
>
> 1) qmp: query-images, show image info fo
This removes the never-used pte64_invalidate() function, and makes
ppcmas_tlb_check() static, since it's only used within that file.
Signed-off-by: David Gibson
---
target-ppc/cpu.h|3 ---
target-ppc/mmu_helper.c | 11 +++
2 files changed, 3 insertions(+), 11 deletions(-)
The poorly named get_segment() function handles most of the address
translation logic for hash-based MMUs. It has many ugly conditionals on
whether the MMU is 32-bit or 64-bit.
This patch splits the function into 32 and 64-bit versions, using the
switch on mmu_type that's already in the caller
(g
Currently support for both 32-bit and 64-bit hash MMUs share an
implementation of pte_check. But there are enough differences that this
means the shared function has several very ugly conditionals on "is_64b".
This patch cleans things up by separating out the 64-bit version
(putting it into mmu-h
The get_pteg_offset() helper function is currently shared between 32-bit
and 64-bit hash mmus, taking a parameter for the hash pte size. In the
64-bit paths, it's only called in one place, and it's a trivial
calculation. This patch, therefore, open codes it for 64-bit. The
remaining version, whi
cpu_get_phys_page_debug() is a trivial wrapper around
get_physical_address(). But even the signature of
get_physical_address() has some things we'd like to clean up on a
per-mmu basis, so this patch moves the test on mmu model out to
cpu_get_phys_page_debug(), moving the version for 64-bit hash MM
This large patch series makes a serious overhaul of the MMU
implementation for target-ppc. Previously all the quite dissimilar
PowerPC MMU variants attempted to use a more-or-less common code path,
with dependencies on env->mmu_model scattered throughout. The
resulting confused code was not worth
As a first step to disentangling the handling for 64-bit hash MMUs from
the rest, we move the code handling the Segment Lookaside Buffer (SLB)
(which only exists on 64-bit hash MMUs) into a new mmu-hash64.c file.
Signed-off-by: David Gibson
---
target-ppc/Makefile.objs |5 +-
target-ppc/cpu.
32-bit and 64-bit hash MMU implementations currently share a find_pte
function. This results in a whole bunch of ugly conditionals in the shared
function, and not all that much actually shared code.
This patch separates out the 32-bit and 64-bit versions, putting then
in mmu-hash64.c and mmu-has3
Currently cpu.h contains a number of definitions relating to the 64-bit
hash MMU. Some are used in the MMU emulation code, but some are only used
in the spapr MMU management hcall implementations.
This patch moves these definitions (except for a few that are needed
more widely) into mmu-hash64.h
cpu_ppc_handle_mmu_fault() calls get_physical_address() (whose behaviour
depends on MMU type) then, if that fails, issues an appropriate exception
- which again has a number of dependencies on MMU type.
This patch starts converting cpu_ppc_handle_mmu_fault() to have a
single switch on MMU type, ca
Depending on the MSR state, for 64-bit hash MMUs, get_physical_address
can either call check_physical (which has further tests for mmu type)
or get_segment64. Similarly for 32-bit hash MMUs we can either call
check_physucal or get_bat() and get_segment32().
This patch splits off the whole get_phy
The PowerPC 620 was the very first 64-bit PowerPC implementation, but
hardly anyone ever actually used the chips. qemu notionally supports the
620, but since we don't actually have code to implement the segment table,
the support is broken (quite likely in other ways too).
This patch, therefore,
In the code for handling BATs, the hash32_bat_size_prot() and
hash32_bat_601_size_prot() functions are passed the BAT contents by
reference (pointer) for no clear reason, since they only need the values
within.
This patch removes this odd usage, and uses the resulting change to clean
up the caller
One LOG_MMU statement in mmu_helper.c has an odd check on the effective
address being translated. I can see no reason for this; I suspect it was
a debugging hack from long ago. This patch removes it.
Signed-off-by: David Gibson
---
target-ppc/mmu_helper.c | 10 --
1 file changed, 4 i
The functions for looking up BATs (Block Address Translation - essentially
a level 0 TLB) are shared between the classic 32-bit hash MMUs and the
6xx style software loaded TLB implementations.
This patch splits out a copy for the 32-bit hash MMUs, to facilitate
cleaning it up. The remaining versi
The newly separated paths for hash mmus rely on several helper functions
which are still shared with 32-bit hash mmus: pp_check(), check_prot() and
pte_update_flags(). While these don't have ugly ifdefs on the mmu type,
they're not very well thought out, so sharing them impedes cleaning up the
has
On the ppc hash mmus, no-execute can be set at the segment level (on more
recent 64-bit hash mmus it can also be set at the page level). This patch
separates out this check to make it clearer what is going on, and avoiding
excessive indentation of the remaining translation code.
Signed-off-by: Da
The nx field in mmu_ctx_hash64 is used in two different functions. But its
used for slightly different things in each place, and the value is never
propagated between them. In other words, it might as well be two local
variables. This patch makes it so.
Signed-off-by: David Gibson
---
target-
On real hardware the ppc hash page table is stored in memory; accordingly
our mmu emulation code can read a hash page table in guest memory. But,
when paravirtualized under PAPR, the real hash page table is in host
memory, accessible to the guest only via hypercalls. We model this by
also allowin
hash32_bat_size_prot() and its 601 variant, as the name suggests, returns
both a BAT's size - needed to search for a matching BAT - and its
permissions, only relevant once a matching BAT has been located.
There's no particular advantage to combining these, so we split these roles
into seperate fun
At present a large chunk of ppc_hash32_translate() is taken up with an
ugly if selecting between direct store segments (hardly ever used) and
normal paged segments. This patch clarifies the flow of code by
handling direct store segments immediately then returning, leaving the
straight line code to
find_pte{32,64}() are poorly named, since they both find a PTE and do
permissions checking of it. This patch makes them only locate a matching
PTE, moving the permission checking and other logic to the caller. We
rename the resulting search functions ppc_hash{32,64}_htab_lookup().
Signed-off-by:
This further separates the unusual case handling of direct store segments
from the main translation path by moving its logic into a helper function,
with some tiny cleanups along the way.
Signed-off-by: David Gibson
---
target-ppc/mmu-hash32.c | 117 -
1 - 100 of 278 matches
Mail list logo