Commit Graph

12312 Commits

Author SHA1 Message Date
cmchao 011d87d033 hw/omap2.c : separate synctimer module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao c58d37cfdc hw/omap2.c : separate gptimer module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao d82310f759 hw/omap2.c : separate gpio module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao e5c6b25a14 hw/omap1.c : separate gpio module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:35 +02:00
Markus Armbruster f83ccb3eab virtio-serial: Simplify virtio_serial_load()
For all i, ports_map[i] is used in and only in the i-th iteration.
Replace the dynamic array by a scalar variable.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:38:58 +02:00
Markus Armbruster 81bf96d3d2 usb-serial: Fail instead of crash when chardev is missing
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:35:46 +02:00
Jun Koi bf298f83c3 A bit optimization for tlb_set_page()
This patch avoids handling write watchpoints on read-only memory access.
It also breaks the searching loop for watchpoint once the setup for
handling watchpoint later is done.

Signed-off-by: Jun Koi <junkoi2004@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:25:55 +02:00
Aurelien Jarno 6fbab86925 target-mips: fix DINSU instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:00:31 +02:00
Aurelien Jarno 33dd298323 MIPS: fix fulong bios loading
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 19:39:45 +02:00
Aurelien Jarno aa8f40090a target-mips: enable movn/movz on loongson 2E & 2F
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:26:34 +02:00
Aurelien Jarno 15656e09cd mips-dis: add support for Godson integer instructions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:26:34 +02:00
Aurelien Jarno 45e7e4bc75 r2d: fix pflash mapping
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:26:34 +02:00
Paolo Bonzini d1d74664ea lsi53c895a: fix Phase Mismatch Jump
lsi_bad_phase has a bug in the choice of pmjad1/pmjad2.  This does
not matter with Linux guests because it uses just one routine for
both, but it breaks Windows 64-bit guests.  This is the text
from the spec:

   "[The PMJCTL] bit controls which decision mechanism is used
   when jumping on phase mismatch. When this bit is cleared the
   LSI53C895A will use Phase Mismatch Jump Address 1 (PMJAD1) when
   the WSR bit is cleared and Phase Mismatch Jump Address 2 (PMJAD2)
   when the WSR bit is set.  When this bit is set the LSI53C895A will
   use jump address one (PMJAD1) on data out (data out, command,
   message out) transfers and jump address two (PMJAD2) on data in
   (data in, status, message in) transfers."

Which means:

    CCNTL0.PMJCTL
        0              SCNTL2.WSR = 0             PMJAD1
        0              SCNTL2.WSR = 1             PMJAD2
        1                    out                  PMJAD1
        1                    in                   PMJAD2

In qemu, what you get instead is:

    CCNTL0.PMJCTL
        0                    out                  PMJAD1
        0                    in                   PMJAD2    <<<<<
        1                    out                  PMJAD1
        1                    in                   PMJAD1    <<<<<

Considering that qemu always has SCNTL2.WSR cleared, the two marked cases
(corresponding to phase mismatch on input) are always jumping to the
wrong PMJAD register.  The patch implements the correct semantics.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen 051c190bce MIPS: Initial support of fulong mini pc (machine construction)
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen 5bc6fba851 MIPS: Initial support of fulong mini pc (CPU definition)
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen 30235a54dc MIPS: Initial support of VIA USB controller used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen 016512f3d4 MIPS: Initial support of VIA IDE controller used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen edf79e66c0 Initial support of vt82686b south bridge used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:51 +02:00
Huacai Chen d0f7453d13 MIPS: Initial support of bonito north bridge used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:51 +02:00
Richard Henderson 48bb3750e1 tcg-s390: new TCG Target
Original patch from Ulrich Hecht, further work from Alexander Graf
and Richard Henderson.

Cc: Ulrich Hecht <uli@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:51 +02:00
Richard Henderson b9e946c781 tcg-ppc: Conditionally reserve TCG_GUEST_BASE_REG.
We need not reserve the register unless we're going to use it.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: malc <av1474@comtv.ru>
2010-06-29 23:30:36 +04:00
Sheng Yang 408392b30d kvm: Fix cpu_is_bsp() compilation warning
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2010-06-28 13:06:03 -03:00
Marcelo Tosatti ddced198cd kvm: init mp_state
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2010-06-28 13:06:03 -03:00
Sheng Yang f1665b21f1 kvm: Enable XSAVE live migration support
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-06-28 13:06:03 -03:00
Sheng Yang 51e49430c0 Enable XSAVE related CPUID
We can support it in KVM now. The 0xd leaf is queried from KVM.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-06-28 13:06:03 -03:00
Sheng Yang c958a8bd9b kvm: Extend kvm_arch_get_supported_cpuid() to support index
Would use it later for XSAVE related CPUID.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-06-28 13:06:03 -03:00
Andre Przywara 8935499831 fix CPUID vendor override
the meaning of vendor_override is actually the opposite of how it
is currently used :-(
Fix it to allow KVM to export the non-native CPUID vendor if
explicitly requested by the user.

The intended behavior is:
With TCG:
  - always inject the configured vendor (either hard-coded, in config
    files or via ",vendor=" commandline)
With KVM:
  - by default inject the host's vendor
  - if the user specifies ",vendor=" on the commandline, use this
    instead of the host's vendor
  - all pre-configured vendors (hard-coded, config file) are ignored

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-06-28 13:06:03 -03:00
Jan Kiszka be41cbe036 kvm: Switch kvm_update_guest_debug to run_on_cpu
Guest debugging under KVM is currently broken once io-threads are
enabled. Easily fixable by switching the fake on_vcpu to the real
run_on_cpu implementation.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2010-06-28 13:06:03 -03:00
Stefan Weil 4972d59211 win32: Add missing function ffs
mingw32 does not include function ffs.

Commit c6d29ad6e2 added a
declaration for ffs, but an implementation was missing.

For compilations with optimization, the compiler creates
inline code, so the implementation is not always needed.

Without optimization, linking fails without this patch.

v2: Use __builtin_ffs as suggested by Richard Henderson

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:25:25 +03:00
Stefan Weil 5635efc388 win32: Add define for missing EPROTONOSUPPORT
mingw32 does not define EPROTONOSUPPORT (which is used by
migration.c and maybe future patches), so add a
definition which uses a supported errno value.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:09:56 +03:00
Stefan Weil 924ef7ee64 .gitignore: Ignore libdis*, qemu-options.def
libdis, libdis-user and qemu-options.def are generated
directories / files and should be ignored by git.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:09:29 +03:00
Jan Kiszka 427bd8d694 x86: Clean up CPU reset
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:08:34 +03:00
Jan Kiszka 052be86bc3 x86: Fix INIT processing
This fixes a regression of 0e26b7b892: Reset halted also on INIT.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:07:45 +03:00
Artyom Tarasenko 94c5f455d3 mask all interrupts when MASTER_DISABLE is set
The MASTER_DISABLE bit (aka mask-all) masks all the interrupts.

According to Sun-4M System Architecture
"The level–15 interrupt sources [...] are maskable with the Interrupt Target
Mask Register. While these interrupts are considered ’non–maskable’ within
the SPARC IU, a mask capability is provided to allow the boot firmware
to establish a basic environment before receiving any level–15 interrupts,
which are non–maskable within SPARC. A mask–all bit is provided to allow
disabling of all external interrupts during change of the CIT."

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 19:06:44 +03:00
Blue Swirl 3a5c16fcb8 fw_cfg: convert to qdev
Convert fw_cfg to qdev.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 16:04:55 +00:00
Blue Swirl 738012bec4 Remove useless device dependency of HAS_AUDIO
System architecture dictates whether HAS_AUDIO is defined. It's then
useless to check for HAS_AUDIO in files which are only used on those
architectures which always have audio.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-27 16:04:31 +00:00
Alex Williamson 8a91110738 virtio-pci: fix bus master bug setting on load
The comment suggests we're checking for the driver in the ready
state and bus master disabled, but the code is checking that it's
not in the ready state.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Found-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Juan Quintela 511c023103 Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Juan Quintela 8ca5e80118 Exit if incoming migration fails
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Venkateswararao Jujjuri (JV) 63729c3692 virtio-9p: Implement Security model for mksock using mknod.
This patch uses mknod to create socket.

On Host/Fileserver:
-rw-------. 1 virfsuid virtfsgid 0 2010-05-11 09:57 asocket1

On Guest/Client:
srwxr-xr-x 1 guestuser guestuser 0 2010-05-11 12:57 asocket1

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Venkateswararao Jujjuri (JV) 1c29331248 virtio-9p: Implement Security model for mknod
Mapped mode stores extended attributes in the user space of the extended
attributes. Given that the user space extended attributes are available
to regular files only, special files are created as regular files on the
fileserver and appropriate mode bits are added to the extended attributes.
This method presents all special files and symlinks as regular files on the
fileserver while they are represented as special files on the guest mount.

On Host/Fileserver:
-rw-------. 1 virfsuid virtfsgid 0 2010-05-11 09:36 afifo
-rw-------. 1 virfsuid virtfsgid 0 2010-05-11 09:32 blkdev
-rw-------. 1 virfsuid virtfsgid 0 2010-05-11 09:33 chardev

On Guest/Client:
prw-r--r-- 1 guestuser guestuser 0 2010-05-11 12:36 afifo
brw-r--r-- 1 guestuser guestuser 0, 0 2010-05-11 12:32 blkdev
crw-r--r-- 1 guestuser guestuser 4, 5 2010-05-11 12:33 chardev

In the passthrough securit model, specifal files are directly created
on the fileserver. But the user credential

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Venkateswararao Jujjuri (JV) 879c28133d virtio-9p: Security model for symlink and readlink
Mapped mode stores extended attributes in the user space of the extended
attributes. Given that the user space extended attributes are available
to regular files only, special files are created as regular files on the
fileserver and appropriate mode bits are added to the extended attributes.
This method presents all special files and symlinks as regular files on the
fileserver while they are represented as special files on the guest mount.

Implemntation of symlink in mapped security model:

A regular file is created and the link target is written to it.
readlink() reads it back from the file.

On Guest/Client:
lrwxrwxrwx 1 root root 6 2010-05-11 12:20 asymlink -> afile

On Host/Fileserver:
-rw-------. 1 root root 6 2010-05-11 09:20 asymlink
afile

Under passthrough model, it just calls underlying symlink() readlink()
system calls are used.

Under both security models, client user credentials are changed
after the filesystem objec creation.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Venkateswararao Jujjuri (JV) 00ec5c3760 virtio-9p: Security model for mkdir
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:51 -05:00
Venkateswararao Jujjuri (JV) 4750a96f6b virtio-9p: Security model for create/open2
In the mapped security model, VirtFS server intercepts and maps
the file object create and get/set attribute requests. Files on the fileserver
will be created with VirtFS servers (QEMU) user credentials and the
client-users credentials are stored in extended attributes. On the request
to get attributes, server extracts the client-users credentials
from extended attributes and sends them to the client.

On Host/Fileserver:
-rw-------. 2 virfsuid virtfsgid 0 2010-05-11 09:19 afile

On Guest/Client:
-rw-r--r-- 2 guestuser guestuser 0 2010-05-11 12:19 afile

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Venkateswararao Jujjuri (JV) 1237ad7607 virtio-9p: Implemented Security model for lstat and fstat
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Venkateswararao Jujjuri (JV) f7613bee32 virtio-9p: Security model for chown
mapped model changes the owner in the extended attributes.
passthrough model does the change through lchown() as the
server don't need to follow the link and client will send the
actual filesystem object.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Venkateswararao Jujjuri (JV) e95ead32ef virtio-9p: Security model for chmod
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Venkateswararao Jujjuri (JV) 758e8e38eb virtio-9p: Make infrastructure for the new security model.
This patch adds required infrastructure for the new security model.

- A new configure option for attr/xattr.
- if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined.
- Defines routines related to both security models.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Venkateswararao Jujjuri (JV) 9ce56db6f0 virtio-9p: Introduces an option to specify the security model.
The new option is:

-fsdev fstype,id=myid,path=/share_path/,security_model=[mapped|passthrough]
-virtfs fstype,path=/share_path/,security_model=[mapped|passthrough],mnt_tag=tag

In the case of mapped security model, files are created with QEMU user
credentials and the client-user's credentials are saved in extended attributes.
Whereas in the case of passthrough security model, files on the
filesystem are directly created with client-user's credentials.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:30 -05:00
Venkateswararao Jujjuri (JV) fac4f11147 virtio-9p: Rearrange fileop structures
This patch rearranges the fileop structures by moving the structure definitions
from virtio-9p.c to virtio-9p.h file. No functional changes.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:30 -05:00