sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

1193 Commits

Author SHA1 Message Date
Grant Likely 412beee6a0 arm: add device tree support
If compiled with CONFIG_FDT, allow user to specify a device tree file using
the -dtb argument.  If the machine supports it then the dtb will be loaded
into memory and passed to the kernel on boot.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[Peter Maydell: Use machine opt rather than global to pass dtb filename]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-02 11:56:38 +00:00
Jan Kiszka 3741715cf2 usb: Resolve warnings about unassigned bus on usb device creation
When creating an USB device the old way, there is no way to specify the
target bus. Thus the warning issued by usb_create makes no sense and
rather confuses our users.

Resolve this by passing a bus reference to the usbdevice_init handler
and letting those handlers forward it to usb_create.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-27 15:40:53 +01:00
Peter Maydell 967c0da73a vl.c: Avoid segfault when started with no arguments
Fix a bug (introduced in commit a0abe47) where a command line which
specified no machine arguments (either explicitly or implicitly via
-kernel &co) would result in a segfault because of a NULL pointer
returned from qemu_opts_find(qemu_find_opts("machine"), 0).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-24 13:36:06 -06:00
Gerd Hoffmann 53370b78ec suspend: add qmp events
Send qmp events on suspend and wakeup so libvirt
has a chance to track the vm state.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-24 13:36:04 -06:00
Gerd Hoffmann 95b363b5c6 suspend: add infrastructure
This patch adds some infrastructure to handle suspend and resume to
qemu.  First there are two functions to switch state and second there
is a suspend notifier:

 * qemu_system_suspend_request is supposed to be called when the
   guest asks for being be suspended, for example via ACPI.

 * qemu_system_wakeup_request is supposed to be called on events
   which should wake up the guest.

 * qemu_register_suspend_notifier can be used to register a notifier
   which will be called when the guest is suspended.  Machine types
   and device models can hook in there to modify state if needed.

 * qemu_register_wakeup_notifier can be used to register a notifier
   which will be called when the guest is woken up.  Machine types
   and device models can hook in there to modify state if needed.

 * qemu_system_wakeup_enable can be used to enable/disable wakeup
   events.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-24 13:36:02 -06:00
Anthony Liguori 85f3855303 Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
  slirp/misc: fix gcc __warn_memset_zero_len warnings
  vl.c: Increase width of machine name column in "-M ?" output
  tcg: Remove unneeded include statements
2012-02-24 09:51:24 -06:00
Markus Armbruster ef0c4a0d89 gdbstub: Error locations for -gdb
Stash away the option argument with add_device_config(), so we still
have its location when we get around to parsing it.

This doesn't improve any messages I can see just yet, but that'll
change shortly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-24 09:06:58 -06:00
Markus Armbruster d9a5954dbf vl.c: Error locations for options using add_device_config()
These are -bt, -serial, -virtcon, -parallel, -debugcon, -usbdevice.
Improves messages emitted via proper error reporting interfaces.  For
instance:

    $ qemu-system-x86_64 -nodefaults -S -usb -usbdevice net:vlan=xxx
    qemu-system-x86_64: Parameter 'vlan' expects a number

becomes:

    qemu-system-x86_64: -usbdevice net:vlan=xxx: Parameter 'vlan' expects a number

Many more remain unimproved, because they're fprintf()ed.  The next
few commits will take care of that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-24 09:06:58 -06:00
Peter Maydell 3b26486acd vl.c: Increase width of machine name column in "-M ?" output
Increase the width of the column used for the machine name in
the "-M ?" output from 10 to 20 spaces. This fixes the formatting
so it looks nice for architectures where a few of the machines
have overly long names. (Our current longest machine name is
"petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-23 08:59:51 +00:00
Peter Maydell a0abe474d5 Make kernel, initrd and append be machine_opts
Make kernel, initrd, append be machine opts (ie -machine kernel=foo)
with the old plain command line arguments as legacy/convenience
equivalents.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 09:02:52 -06:00
Jordan Justen 2c8cffa599 vl: make find_default_machine externally visible
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 09:02:17 -06:00
Paolo Bonzini 31552529a7 notifier: switch to QLIST
Notifiers do not need to access both ends of the list, and using
a QLIST also simplifies the API.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17 08:33:32 -06:00
Anthony Liguori a19255a369 Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
  linux-user: brk() debugging
  virtio: Remove unneeded g_free() check in virtio_cleanup()
  net: remove extra spaces in help messages
  fmopl: Fix typo in function name
  vl.c: Fix typo in variable name
  ide: fix compilation errors when DEBUG_IDE is set
  cpu-exec.c: Correct comment about this file and indentation cleanup
  CODING_STYLE: Clarify style for enum and function type names
  linux-user: fail execve() if env/args too big
2012-02-17 06:48:47 -06:00
Peter Maydell 9de36b1a7c Make -machine/-enable-kvm options merge into a single list
Make the "machine" option list use list merging, so that multiple
-machine arguments (and the -enable-kvm argument) all merge together
into a single list. Drop the calls to qemu_opts_reset() which meant
that only the last -machine or -enable-kvm option had any effect.

This fixes the bug where "-enable-kvm -machine foo" would ignore
the '-enable-kvm' option, and "-machine foo -enable-kvm" would
ignore the '-machine foo' option.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17 09:10:13 +01:00
Anthony Liguori 65b31cc207 Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony:
  AHCI: Masking of IRQs actually masks them
  sheepdog: fix co_recv coroutine context
  AHCI: Fix port reset race
  rewrite QEMU_BUILD_BUG_ON
  qcow2: Keep unknown header extension when rewriting header
  qcow2: Update whole header at once
  vpc: Round up image size during fixed image creation
  vpc: Add support for Fixed Disk type
  iSCSI: add configuration variables for iSCSI
  qemu-io: add write -z option for bdrv_co_write_zeroes
  qed: add .bdrv_co_write_zeroes() support
  qed: replace is_write with flags field
  block: perform zero-detection during copy-on-read
  block: add .bdrv_co_write_zeroes() interface
  cutils: extract buffer_is_zero() from qemu-img.c
2012-02-15 17:18:04 -06:00
Andreas Färber 83f7d43a9e qom: Unify type registration
Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: malc <av1474@comtv.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15 09:39:21 -06:00
Peter Maydell 1b785a9758 vl.c: Fix typo in variable name
Fix a typo in a local variable name.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-10 10:44:52 +00:00
Ronnie Sahlberg f9dadc9855 iSCSI: add configuration variables for iSCSI
This patch adds configuration variables for iSCSI to set
initiator-name to use when logging in to the target,
which type of header-digest to negotiate with the target
and username and password for CHAP authentication.

This allows specifying a initiator-name either from the command line
-iscsi initiator-name=iqn.2004-01.com.example:test
or from a configuration file included with -readconfig
    [iscsi]
      initiator-name = iqn.2004-01.com.example:test
      header-digest = CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
      user = CHAP username
      password = CHAP password

If you use several different targets, you can also configure this on a per
target basis by using a group name:
    [iscsi "iqn.target.name"]
    ...

The configuration file can be read using -readconfig.
Example :
qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1
 -readconfig iscsi.conf

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-09 16:17:50 +01:00
Anthony Liguori e87f7fc679 s390x: fix qom-ification fall-out
Tested-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-06 11:16:20 -06:00
Michael Roth d34e8f6e9d main-loop: For tools, initialize timers as part of qemu_init_main_loop()
In some cases initializing the alarm timers can lead to non-negligable
overhead from programs that link against qemu-tool.o. At least,
setting a max-resolution WinMM alarm timer via mm_start_timer() (the
current default for Windows) can increase the "tick rate" on Windows
OSs and affect frequency scaling, and in the case of tools that run
in guest OSs such has qemu-ga, the impact can be fairly dramatic
(+20%/20% user/sys time on a core 2 processor was observed from an idle
Windows XP guest).

This patch doesn't address the issue directly (not sure what a good
solution would be for Windows, or what other situations it might be
noticeable), but it at least limits the scope of the issue to programs
that "opt-in" to using the main-loop.c functions by only enabling alarm
timers when qemu_init_main_loop() is called, which is already required
to make use of those facilities, so existing users shouldn't be
affected.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-01 14:45:02 -06:00
Jan Kiszka 25de593506 Improve default machine options usability
So far we overwrite the machine options completely with defaults if no
accel=value is provided. More user friendly is to fill in only
unspecified options. The new qemu_opts_set_defaults enables this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-01 14:45:01 -06:00
Jan Kiszka 433acf0dac mc146818rtc: Use lost_tick_policy property
Allow to configure the MC146818 RTC via the new lost tick policy
property and replace rtc_td_hack with this mechanism.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-01 14:45:01 -06:00
Blue Swirl c5bd4f3d2d vga: fix -nodefaults -device VGA
Flag -nodefaults should also imply no VGA. This was broken in
a369da5f31.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-01-25 17:59:39 +00:00
Anthony Liguori 5b4448d27d Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master:
  kvm: Activate in-kernel irqchip support
  kvm: x86: Add user space part for in-kernel IOAPIC
  kvm: x86: Add user space part for in-kernel i8259
  kvm: x86: Add user space part for in-kernel APIC
  kvm: x86: Establish IRQ0 override control
  kvm: Introduce core services for in-kernel irqchip support
  memory: Introduce memory_region_init_reservation
  ioapic: Factor out base class for KVM reuse
  ioapic: Drop post-load irr initialization
  i8259: Factor out base class for KVM reuse
  i8259: Completely privatize PicState
  apic: Open-code timer save/restore
  apic: Factor out base class for KVM reuse
  apic: Introduce apic_report_irq_delivered
  apic: Inject external NMI events via LINT1
  apic: Stop timer on reset
  kvm: Move kvmclock into hw/kvm folder
  msi: Generalize msix_supported to msi_supported
  hyper-v: initialize Hyper-V CPUID leaves.
  hyper-v: introduce Hyper-V support infrastructure.

Conflicts:
	Makefile.target

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-23 11:00:26 -06:00
Blue Swirl a369da5f31 vga: improve VGA logic
Improve VGA selection logic, push check for device availabilty to vl.c.
Create the devices at board level unconditionally.

Remove now unused pci_try_create*() functions.

Make PCI VGA devices optional.

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-01-22 07:27:06 +00:00
Jan Kiszka 9b5b76d449 kvm: x86: Establish IRQ0 override control
KVM is forced to disable the IRQ0 override when we run with in-kernel
irqchip but without IRQ routing support of the kernel. Set the fwcfg
value correspondingly. This aligns us with qemu-kvm.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-01-19 12:14:42 +01:00
M. Mohan Kumar 84a87cc4cc hw/9pfs: Add support to use named socket for proxy FS
Add option to use named socket for communicating between proxy helper
and qemu proxy FS. Access to socket can be given by using command line
options -u and -g.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04 21:23:55 +05:30
M. Mohan Kumar 4c793dda22 hw/9pfs: Add new proxy filesystem driver
Add new proxy filesystem driver to add root privilege to qemu process.
It needs a helper process to be started by root user.

Following command line can be used to utilize proxy filesystem driver
-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04 20:13:39 +05:30
Aneesh Kumar K.V 99519f0a77 hw/9pfs: Move opt validation to FsDriver callback
This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04 19:51:28 +05:30
Vasilis Liaskovitis 991dfefdee Set numa topology for max_cpus
qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. However
SeaBIOS always expects to setup max_cpus number of SRAT cpu entries
(MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs
with smp_cpus != max_cpus (e.g. -smp 2,maxcpus=4), Seabios will mistakenly use
memory SRAT info for setting up CPU SRAT entries for the offline CPUs. Wrong
SRAT memory entries are also created. This breaks NUMA in a guest.
Fix by setting up SRAT info for max_cpus in qemu-kvm.

Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22 14:53:01 -02:00
Alon Levy 42ed372753 g_thread_init users: don't call it if glib >= 2.31
since commit f9b29ca03 included in release 2.31 (docs below say 2.32 but
that is not correct) and onwards g_thread_init is deprecated and calling
it is not required:

 http://developer.gnome.org/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init

 g_thread_init has been deprecated since version 2.32 and should not be
 used in newly-written code. This function is no longer necessary. The
 GLib threading system is automatically initialized at the start of your
 program.

Fixes bulid failure when warnings are treated as errors on fedora 17.

I only tested the change to vl.c, and copy pasted to the two other
locations (couldn't decide if a wrapper for calling g_thread_init is
uglier).

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-20 15:44:31 -06:00
Anthony Liguori 1de81d2832 qdev: fix hotplug when no -device is specified
The peripheral[-anon] containers are initialized lazily but since they sit on
sysbus, they can not be created after realize.  This was causing an abort() to
occur during hotplug if no -device option was used.

This was spotted by qemu-test::device-add.sh

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19 16:39:16 -06:00
Michael Ellerman a3adb7ad3b vl.c: In qemu -h output, only print options for the arch we are running as
Only print options in the help output that are accepted by our arch.
This is less confusing for users and also for other programs that
consume the help output.

The options affected are:

 -g and -prom-env only displayed on PPC or SPARC

 -win2k-hack, -rtc-td-hack, -no-fd-bootchk, -no-acpi, -no-hpet,
 -acpitable, -smbios only displayed on i386

 -semihosting only displayed on ARM, M68K or XTENSA

 -old-param only displayed on ARM

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19 10:27:33 -06:00
Michael Ellerman 77bd1119ba vl.c: Move option generation logic into a wrapper file
In vl.c and qemu-options.h we define macros and include qemu-options.def
in order to generate different content. Move the bulk of the def'ing and
undef'ing into a wrapper, this will make it cleaner when we add another
macro in the next patch.

AFAICS undefining GEN_DOCS services no purpose, but I've left it for now.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19 10:27:33 -06:00
michael@ozlabs.org 15d37e709f vl.c: Print the actual program name in help output
In help() we do what boils down to:

  printf("%s", "qemu");

This seems to be an artifact of be995c2764
("removed unused code"), which removed some ifdef'ery that used to print
a different name depending on CONFIG_SOFTMMU.

Instead print the actual program name, originally from argv[0].

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15 09:27:23 -06:00
Dong Xu Wang 07f35073c6 fix spelling in main directory
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-02 10:50:57 +00:00
Markus Armbruster 961b42b9dc vl: Tighten parsing of -m argument
strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.
Things like "-m 1024," are now caught.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 16:20:52 -06:00
Markus Armbruster c03417b438 vl: Tighten parsing of -numa's parameter mem
strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.

Things like

    -smp 4 -numa "node,mem=1024,cpus=0-1" -numa "node,mem=1024 cpus=2-3"

are now caught.  Before, the second -numa's argument was silently
interpreted as just "node,mem=1024".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-28 16:20:52 -06:00
Max Filippov 0abe905d29 vl.c: prohibit simultaneous use of -icount with kvm or xen
With -icount, The vm_clock is updated with help from TCG (it counts
instructions at 2^ICOUNT ns/instructions). With KVM, the instruction
count is not available so KVM cannot provide this help.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-11 12:49:53 -06:00
Andreas Färber d423675c94 vl.c: Fail gracefully if no machine is found
machine defaults to find_default_machine(),
then gets overridden via -M and machine_parse().

If no -M is specified and find_default_machine() returns NULL
(when no machine compiled in), exit with an error.

Avoids a segfault when setting machine->max_cpus.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-11 08:27:06 -06:00
Markus Armbruster 1bf6ccd372 Clean up assertion in get_boot_devices_list()
g_strdup() can't fail, remove assertion.  Assert its argument can't be
null, because that's not obvious (add_boot_device_path() ensures it).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-09 12:06:20 -06:00
Gleb Natapov f54c556c08 qemu_timedate_diff() shouldn't modify its argument.
The caller of qemu_timedate_diff() does not expect that tm it passes to
the function will be modified, but mktime() is destructive and modifies
its argument. Pass a copy of tm to it and set tm_isdst so that mktime()
will not rely on it since its value may be outdated.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-07 10:57:37 -06:00
Andreas Färber db529aabfa vl.c: Guard against GThread double-initialization
GThread-ERROR **: GThread system may only be initialized once.
aborting...

Making the g_thread_init() call in vl.c conditional resolves an abort on
Mac OS X, where coroutine-gthread.c seems to call it before vl.c.

Reported-by: Juan Pineda <juan@logician.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Daniel P. Berrange <berrange@redhat.com>
2011-11-01 20:41:06 +01:00
Anthony Liguori d439b79d73 Merge remote-tracking branch 'aneesh/for-upstream-7' into staging 2011-10-31 11:06:02 -05:00
Aneesh Kumar K.V 9db221ae73 hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tag
v_synth when -virtfs_synth command line option is specified
in qemu. The synthetic file system can be mounted in guest
using 9p using the below command line

mount -t 9p -oversion=9p2000.L,trans=virtio v_synth  <mountpint>

Synthetic file system enabled different qemu subsystem to register
callbacks for read and write events from guest. The subsystem
can create directories and files in the synthetic file system as show
in ex below

    qemu_v9fs_synth_mkdir(NULL, 0777, "test2", &node);
    qemu_v9fs_synth_add_file(node, 0777, "testfile",
                             my_test_read, NULL, NULL);

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:18 +05:30
M. Mohan Kumar 2c74c2cb4b hw/9pfs: Read-only support for 9p export
A new fsdev parameter "readonly" is introduced to control accessing 9p export.
"readonly" can be used to specify the access type. By default "rw" access
is given to 9p export.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31 12:34:17 +05:30
Luiz Capitulino f795e743bd Drop qemu-objects.h from modules that don't require it
Previous commits dropped most qobjects usage from qemu modules
(now they are a low level interface used by the QAPI). However,
some modules still include the qemu-objects.h header file.

This commit drops qemu-objects.h from some of those modules
and includes qjson.h instead, which is what they actually need.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27 11:48:47 -02:00
Paolo Bonzini 99435906cc simplify main loop functions
Provide a clean example of how to use the main loop in the tools.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:31 +02:00
Paolo Bonzini d3b12f5dec main-loop: create main-loop.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00
Paolo Bonzini 44a9b356ad main-loop: create main-loop.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:30 +02:00