This patch move the 9p device registration into its own file
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
If virtio is not enabled then we should not pull in
virtfs files
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
v9fs_complete_rename() mistakenly renames files with similar name
as we don't check if the matched name is really an offspring.
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
QEMU supports socket chardevs that establish connections like a server
or a client. The QEMUMonitorProtocol class only supports connecting as
a client. It is not possible to connect race-free when launching QEMU
since trying to connect before QEMU has bound and is listening on the
socket results in failure.
Add the QEMUMonitorProtocol(server=True) argument to bind and listen on
the socket. The QEMU process can then be launched and connects to the
already existing QMP socket without a race condition:
qmp = qmp.QEMUMonitorProtocol(monitor_path, server=True)
popen = subprocess.Popen(args)
qmp.accept()
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
The get_events() function polls for new QMP events and then returns. It
can be useful to wait for the next QMP event so add the boolean 'wait'
keyword argument.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This **CHANGES** the human monitor "nmi" command behavior.
Currently it accepts an CPU argument which, when provided, will send
the NMI to the specified CPU. This feature is of discussable value
though and HMP shouldn't have more features than QMP, so let's use
QMP's instead (it's also simpler).
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
inject-nmi command injects an NMI on all CPUs of guest.
It is only supported for x86 guest currently, it will
returns "Unsupported" error for non-x86 guest.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Fix an integer overflow that can happen for signed 32 bit types
when using FLOAT_MIXENG. (Note that at the moment this is only true
when using the MacOSX coreaudio audio driver.)
Signed-off-by: Juha Riihim?ki <juha.riihimaki@nokia.com>
[Peter Maydell: Removed unnecessary casts]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: malc <av1474@comtv.ru>
Also include the PCC_OFS in the return value. For user mode we
can pretend the PCC_OFS value is always zero.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Reads the page table how PALcode would, except that the virtual
page table base register is not used.
Signed-off-by: Richard Henderson <rth@twiddle.net>
In particular, SWPIPL is used quite a lot by the Linux kernel.
Doing this inline makes it significantly easier to step through
without the debugger getting confused by the mode switch.
Signed-off-by: Richard Henderson <rth@twiddle.net>
We had two different methods in use, both of which referenced ENV,
and neither of which indicated to the generic code when different
compilation modes are not compatible.
Signed-off-by: Richard Henderson <rth@twiddle.net>
These aren't actually used yet, but we can at least access
them via the HW_MFPR and HW_MTPR instructions.
Signed-off-by: Richard Henderson <rth@twiddle.net>
The EXC_M_* constants were being set for the EV6, not as set for
the Unix kernel entry point.
Use PS_USER_MODE instead of hard-coding access to the PS register.
Signed-off-by: Richard Henderson <rth@twiddle.net>
This gets the PC right after an arithmetic exception. Also tidies
the code in the TLB fault handlers to use common code.
Signed-off-by: Richard Henderson <rth@twiddle.net>
There's no need to attempt to match EXCP_* values with PALcode entry
point offsets. Instead, compress all the values to make for more
efficient switch statements within QEMU.
We will be doing TLB fill within QEMU proper, not within the PALcode,
so all of the ITB/DTB miss, double fault, and access exceptions can
be compressed to EXCP_MMFAULT.
Compress all of the EXCP_CALL_PAL exceptions into one.
Use env->error_code to store the specific entry point.
Signed-off-by: Richard Henderson <rth@twiddle.net>
With all of the pre-existing code that would not compile gone,
this is the earliest point at which the target can be enabled.
There is no machine defined yet, so this will crash on startup.
Enable the target anyway, to make sure that further compilation
problems do not creep back in.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Delete all the code that tried to emulate the real IPRs of some
unnamed CPU. Replace those with just 3 slots that we can use to
communicate trap information between the helper functions that
signal exceptions and the OS trap handler.
Signed-off-by: Richard Henderson <rth@twiddle.net>
All of the "raw" memory accesses should be "phys" instead. Fix
some confusion about argument ordering of the store routines.
Fix the implementation of store-conditional.
Delete the "alt-mode" helpers. Because we only implement two
mmu modes, let /a imply user-mode unconditionally.
Leave some combinations of virt access without permission
checks as unimplemented. There are too many hoops through
which to jump, and these insns will not be needed in the
emulation palcode.
Signed-off-by: Richard Henderson <rth@twiddle.net>
We were failing to generate EXC_DEBUG in the EXIT_PC_UPDATED path.
This caused us not to stop at the instruction after a branch, but
on the instruction afterward.
Signed-off-by: Richard Henderson <rth@twiddle.net>
The QEMU emulation PALcode will use EV6 PALcode insns regardless
of the "real" cpu instruction set being emulated.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Thanks to Tobias Hoffmann <th55@gmx.de> for this patch.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
After NACKing a read operation, a raising SCL should not trigger a new
read from the slave. Introduce a new state which just waits for a stop
or start condition after NACK.
Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
There is little in common with user and softmmu versions of cpu_resume_signal(),
split them.
Fix coding style for the user emulator part.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
All you could ever achieve with it is break stuff, so removing it
should be safe.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
virtio-serial-bus needs to treat "virtconsole" devices specially. It
uses VirtIOSerialPort member is_console to recognize them. It gets
its value via property initialization. Cute hack, except it lets
users mess with it: "-device virtconsole,is_console=0" isn't plugged
into port 0 as it should.
Move the flag to VirtIOSerialPortInfo. Keep the property for backward
compatibility; its value has no effect.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
virtio_serial_init() allocates the VirtIOSerialBus dynamically, but
virtio_serial_exit() doesn't free it.
Fix by getting rid of the allocation.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Instead of calling flush_queued_data when unthrottling, schedule
a bh. That way we can return immediately to the caller, and the
flush uses the same call path as a have_data for callbackee.
No migration change is required because bh are called from vm_stop.
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>