~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/arm-virt/0005-target-arm-support-coprocessor-registers-which-do-io

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
commit 749825a8769523adf6cb140ed3eeef360862f932
 
2
Author: Peter Maydell <peter.maydell@linaro.org>
 
3
Date:   Fri Aug 9 17:07:19 2013 +0100
 
4
 
 
5
    target-arm: Support coprocessor registers which do I/O
 
6
    
 
7
    Add an ARM_CP_IO flag which an ARMCPRegInfo definition can use to
 
8
    indicate that the register's implementation does I/O and thus
 
9
    its accesses need to be surrounded by gen_io_start()/gen_io_end()
 
10
    in order for icount to work. Most notably, cp registers which
 
11
    implement clocks or timers need this.
 
12
    
 
13
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
14
    Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
 
15
 
 
16
Index: qemu/target-arm/cpu.h
 
17
===================================================================
 
18
--- qemu.orig/target-arm/cpu.h  2013-10-09 15:38:09.146456444 -0500
 
19
+++ qemu/target-arm/cpu.h       2013-10-09 15:38:09.130456444 -0500
 
20
@@ -494,6 +494,9 @@
 
21
  * old must have the OVERRIDE bit set.
 
22
  * NO_MIGRATE indicates that this register should be ignored for migration;
 
23
  * (eg because any state is accessed via some other coprocessor register).
 
24
+ * IO indicates that this register does I/O and therefore its accesses
 
25
+ * need to be surrounded by gen_io_start()/gen_io_end(). In particular,
 
26
+ * registers which implement clocks or timers require this.
 
27
  */
 
28
 #define ARM_CP_SPECIAL 1
 
29
 #define ARM_CP_CONST 2
 
30
@@ -501,13 +504,14 @@
 
31
 #define ARM_CP_SUPPRESS_TB_END 8
 
32
 #define ARM_CP_OVERRIDE 16
 
33
 #define ARM_CP_NO_MIGRATE 32
 
34
+#define ARM_CP_IO 64
 
35
 #define ARM_CP_NOP (ARM_CP_SPECIAL | (1 << 8))
 
36
 #define ARM_CP_WFI (ARM_CP_SPECIAL | (2 << 8))
 
37
 #define ARM_LAST_SPECIAL ARM_CP_WFI
 
38
 /* Used only as a terminator for ARMCPRegInfo lists */
 
39
 #define ARM_CP_SENTINEL 0xffff
 
40
 /* Mask of only the flag bits in a type field */
 
41
-#define ARM_CP_FLAG_MASK 0x3f
 
42
+#define ARM_CP_FLAG_MASK 0x7f
 
43
 
 
44
 /* Return true if cptype is a valid type field. This is used to try to
 
45
  * catch errors where the sentinel has been accidentally left off the end
 
46
Index: qemu/target-arm/translate.c
 
47
===================================================================
 
48
--- qemu.orig/target-arm/translate.c    2013-10-09 15:38:09.146456444 -0500
 
49
+++ qemu/target-arm/translate.c 2013-10-09 15:38:09.134456444 -0500
 
50
@@ -6287,6 +6287,10 @@
 
51
             break;
 
52
         }
 
53
 
 
54
+        if (use_icount && (ri->type & ARM_CP_IO)) {
 
55
+            gen_io_start();
 
56
+        }
 
57
+
 
58
         if (isread) {
 
59
             /* Read */
 
60
             if (is64) {
 
61
@@ -6376,14 +6380,20 @@
 
62
                     store_cpu_offset(tmp, ri->fieldoffset);
 
63
                 }
 
64
             }
 
65
+        }
 
66
+
 
67
+        if (use_icount && (ri->type & ARM_CP_IO)) {
 
68
+            /* I/O operations must end the TB here (whether read or write) */
 
69
+            gen_io_end();
 
70
+            gen_lookup_tb(s);
 
71
+        } else if (!isread && !(ri->type & ARM_CP_SUPPRESS_TB_END)) {
 
72
             /* We default to ending the TB on a coprocessor register write,
 
73
              * but allow this to be suppressed by the register definition
 
74
              * (usually only necessary to work around guest bugs).
 
75
              */
 
76
-            if (!(ri->type & ARM_CP_SUPPRESS_TB_END)) {
 
77
-                gen_lookup_tb(s);
 
78
-            }
 
79
+            gen_lookup_tb(s);
 
80
         }
 
81
+
 
82
         return 0;
 
83
     }
 
84