Skip to content

Commit

Permalink
upstream 57fa5ca - 0.12.1 - Jan 7, 2010
Browse files Browse the repository at this point in the history
woohoo we're only in the previous decade now! :D
  • Loading branch information
gdwnldsKSC committed Sep 24, 2024
1 parent 4c4ff1d commit c7319d0
Show file tree
Hide file tree
Showing 66 changed files with 742 additions and 448 deletions.
4 changes: 4 additions & 0 deletions outside_qemu_tree_custom/FAKE_KVM_FUNCTIONS.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size) {
return 0;
}

int kvm_log_stop(target_phys_addr_t phys_addr, ram_addr_t size) {
return 0;
}

#endif
38 changes: 38 additions & 0 deletions qemu/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
version 0.12.1:
- loader: fix rom loading at address 0 (fixes target-arm) (Aurelien Jarno)
- loader: fix rom_copy (fixes multiboot) (Kevin Wolf)

version 0.12.0:

- Update to SeaBIOS 0.5.0
- e1000: fix device link status in Linux (Anthony Liguori)
- monitor: fix QMP for balloon command (Luiz Capitulino)
- QMP: Return an empty dict by default (Luiz Capitulino)
- QMP: Only handle converted commands (Luiz Capitulino)
- pci: support PCI based option rom loading (Gerd Hoffman/Anthony Liguori)
- Fix backcompat for hotplug of SCSI controllers (Daniel P. Berrange)
- fdc: fix migration from 0.11 (Juan Quintela)
- vmware-vga: fix segv on cursor resize. (Dave Airlie)
- vmware-vga: various fixes (Dave Airlie/Anthony Liguori)
- qdev: improve property error reporting. (Gerd Hoffmann)
- fix vga names in default_list (Gerd Hoffmann)
- usb-host: check mon before using it. (Gerd Hoffmann)
- usb-net: use qdev for -usbdevice (Gerd Hoffmann)
- monitor: Catch printing to non-existent monitor (Luiz Capitulino)
- Avoid permanently disabled QEMU monitor when UNIX migration fails (Daniel P. Berrange)
- Fix loading of ELF multiboot kernels (Kevin Wolf)
- qemu-io: Fix memory leak (Kevin Wolf)
- Fix thinko in linuxboot.S (Paolo Bonzini)
- target-i386: Fix evaluation of DR7 register (Jan Kiszka)
- vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles (Anthony Liguori)
- S390: Bail out without KVM (Alexander Graf)
- S390: Don't tell guest we're updating config space (Alexander Graf)
- target-s390: Fail on unknown instructions (Alexander Graf)
- osdep: Fix runtime failure on older Linux kernels (Andre Przywara)
- Fix a make -j race (Juergen Lock)
- target-alpha: Fix generic ctz64. (Richard Henderson)
- s390: Fix buggy assignment (Stefan Weil)
- target-mips: fix user-mode emulation startup (Nathan Froyd)
- target-i386: Update CPUID feature set for TCG (Andre Przywara)
- s390: fix build on 32 bit host (Michael S. Tsirkin)

version 0.12.0-rc2:

- v2: properly save kvm system time msr registers (Glauber Costa)
Expand Down
2 changes: 1 addition & 1 deletion qemu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a

$(filter %-user,$(SUBDIR_RULES)): libuser.a

libuser.a:
libuser.a: $(GENERATED_HEADERS)
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libuser V="$(V)" TARGET_DIR="libuser/" all,)

ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
Expand Down
7 changes: 6 additions & 1 deletion qemu/Makefile.user
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

include ../config-host.mak
include $(SRC_PATH)/rules.mak
-include config.mak

.PHONY: all

VPATH=$(SRC_PATH)
# Do not take %.o from $(SRC_PATH), only %.c and %.h
# All %.o for user targets should be built with -fpie, when
# configured with --enable-user-pie, so we don't want to
# take %.o from $(SRC_PATH), since they built without -fpie
vpath %.c %.h $(SRC_PATH)

QEMU_CFLAGS+=-I..

Expand Down
34 changes: 23 additions & 11 deletions qemu/QMP/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,57 @@
Introduction
-------------

The QEMU Monitor Protocol (QMP) is a JSON[1] based protocol for QEMU.
The QEMU Monitor Protocol (QMP) allows applications to communicate with
QEMU's Monitor.

By using it applications can control QEMU in reliable and "parseable" way,
QMP also provides asynchronous events support.
QMP is JSON[1] based and has the following features:

- Lightweight, text-based, easy to parse data format
- Asynchronous events support
- Stability

For more information, please, refer to the following files:

o qmp-spec.txt QEMU Monitor Protocol current draft specification
o qmp-spec.txt QEMU Monitor Protocol current specification
o qmp-events.txt List of available asynchronous events

There are also two simple Python scripts available:

o qmp-shell A shell
o vm-info Show some informations about the Virtal Machine
o vm-info Show some information about the Virtual Machine

[1] http://www.json.org

Usage
-----

To enable QMP, QEMU has to be started in "control mode". This is done
by passing the flag "control" to the "-monitor" command-line option.
To enable QMP, QEMU has to be started in "control mode". There are
two ways of doing this, the simplest one is using the the '-qmp'
command-line option.

For example:

$ qemu [...] -monitor control,tcp:localhost:4444,server
$ qemu [...] -qmp tcp:localhost:4444,server

Will start QEMU in control mode, waiting for a client TCP connection
on localhost port 4444.

To manually test it you can connect with telnet and issue commands:
It is also possible to use the '-mon' command-line option to have
more complex combinations. Please, refer to the QEMU's manpage for
more information.

Simple Testing
--------------

To manually test QMP one can connect with telnet and issue commands:

$ telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"capabilities": []}}
{ "execute": "query-version" }
{"return": "0.11.50"}
{"return": {"qemu": "0.11.50", "package": ""}}

Contact
-------
Expand Down
60 changes: 34 additions & 26 deletions qemu/QMP/qmp-spec.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
QEMU Monitor Protocol Draft Specification - Version 0.1
QEMU Monitor Protocol Specification - Version 0.1

1. Introduction
===============
Expand Down Expand Up @@ -27,9 +27,9 @@ the JSON standard:

http://www.ietf.org/rfc/rfc4627.txt

For convenience, json-objects mentioned in this document will have its members
in a certain order. However, in real protocol usage json-objects members can
be in ANY order, thus no particular order should be assumed.
For convenience, json-object members and json-array elements mentioned in
this document will be in a certain order. However, in real protocol usage
they can be in ANY order, thus no particular order should be assumed.

2.1 General Definitions
-----------------------
Expand Down Expand Up @@ -85,12 +85,13 @@ without errors.

The format is:

{ "return": json-value, "id": json-value }
{ "return": json-object, "id": json-value }

Where,

- The "return" member contains the command returned data, which is defined
in a per-command basis or "OK" if the command does not return data
in a per-command basis or an empty json-object if the command does not
return data
- The "id" member contains the transaction identification associated
with the command execution (if issued by the Client)

Expand All @@ -102,15 +103,15 @@ completed because of an error condition.

The format is:

{ "error": { "class": json-string, "data": json-value, "desc": json-string },
{ "error": { "class": json-string, "data": json-object, "desc": json-string },
"id": json-value }

Where,

- The "class" member contains the error class name (eg. "ServiceUnavailable")
- The "data" member contains specific error data and is defined in a
per-command basis, it will be an empty json-object if the error has no data
- The "desc" member is a human-readable error message. Clients should
- The "desc" member is a human-readable error message. Clients should
not attempt to parse this message.
- The "id" member contains the transaction identification associated with
the command execution (if issued by the Client)
Expand All @@ -127,15 +128,15 @@ to the Client at any time. They are called 'asynchronous events'.

The format is:

{ "event": json-string, "data": json-value,
{ "event": json-string, "data": json-object,
"timestamp": { "seconds": json-number, "microseconds": json-number } }

Where,

- The "event" member contains the event's name
- The "data" member contains event specific data, which is defined in a
per-event basis, it is optional
- The "timestamp" member contains the exact time of when the event ocurred
- The "timestamp" member contains the exact time of when the event occurred
in the Server. It is a fixed json-object with time in seconds and
microseconds

Expand All @@ -157,39 +158,46 @@ S: {"QMP": {"capabilities": []}}
---------------------------

C: { "execute": "stop" }
S: {"return": "OK"}
S: {"return": {}}

3.3 KVM information
-------------------

C: {"execute": "query-kvm", "id": "example"}
S: {"return": "enabled", "id": "example"}
C: { "execute": "query-kvm", "id": "example" }
S: {"return": {"enabled": true, "present": true}, "id": "example"}

3.4 Parsing error
------------------

C: { "execute": }
S: {"error": {"class": "JSONParsing", "data": {}}}
S: {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data":
{}}}

3.5 Powerdown event
-------------------

S: {"timestamp": {"seconds": 1258551470, "microseconds": 802384}, "event":
"POWERDOWN"}

4. Notes to Client implementors
-------------------------------
4. Compatibility Considerations
--------------------------------

4.1 It is recommended to always start the Server in pause mode, thus the
Client is able to perform any setup procedure without the risk of
race conditions and related problems
In order to achieve maximum compatibility between versions, Clients must not
assume any particular:

4.2 It is recommended to always check the capabilities json-array, issued
with the greeting message, at connection time
- Size of json-objects or length of json-arrays
- Order of json-object members or json-array elements
- Amount of errors generated by a command, that is, new errors can be added
to any existing command in newer versions of the Server

4.3 Json-objects or json-arrays mentioned in this document are not fixed
and no particular size or number of members/elements should be assumed.
New members/elements can be added at any time.
Additionally, Clients should always:

4.4 No particular order of json-objects members should be assumed, they
can change at any time
- Check the capabilities json-array at connection time
- Check the availability of commands with 'query-commands' before issuing them

5. Recommendations to Client implementors
-----------------------------------------

5.1 The Server should be always started in pause mode, thus the Client is
able to perform any setup procedure without the risk of race conditions
and related problems
2 changes: 1 addition & 1 deletion qemu/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.92
0.12.1
2 changes: 2 additions & 0 deletions qemu/check-qdict.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ START_TEST(qdict_put_exists_test)

value = qdict_get_int(tests_dict, key);
fail_unless(value == 2);

fail_unless(qdict_size(tests_dict) == 1);
}
END_TEST

Expand Down
2 changes: 1 addition & 1 deletion qemu/config-host.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CONFIG_STATIC 1
#define CONFIG_SLIRP 1
#define CONFIG_ADLIB 1
#define QEMU_VERSION "0.11.92"
#define QEMU_VERSION "0.12.1"
#define QEMU_PKGVERSION "MS-VisualStudio-2022"
#define CONFIG_UNAME_RELEASE ""
#define CONFIG_AUDIO_DRIVERS &winwave_audio_driver, \
Expand Down
3 changes: 3 additions & 0 deletions qemu/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2652,3 +2652,6 @@ d=libuser
mkdir -p $d
rm -f $d/Makefile
ln -s $source_path/Makefile.user $d/Makefile
if test "$static" = "no" -a "$user_pie" = "yes" ; then
echo "QEMU_CFLAGS+=-fpie" > $d/config.mak
fi
3 changes: 2 additions & 1 deletion qemu/cpu-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,8 @@ static inline int64_t cpu_get_real_ticks (void)
#endif
}

#elif (defined(__mips_isa_rev) && __mips_isa_rev >= 2) || defined(__linux__)
#elif defined(__mips)) && \
((defined(__mips_isa_rev) && __mips_isa_rev > = 2) || defined(__linux__))
/*
* binutils wants to use rdhwr only on mips32r2
* but as linux kernel emulate it, it's fine
Expand Down
2 changes: 1 addition & 1 deletion qemu/cpu-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ typedef int sig_atomic_t;
\
/* Core interrupt code */ \
jmp_buf jmp_env; \
int32_t exception_index; \
int exception_index; \
\
CPUState *next_cpu; /* next CPU sharing TB cache */ \
int cpu_index; /* CPU index (informative) */ \
Expand Down
2 changes: 1 addition & 1 deletion qemu/host-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static inline int ctz64(uint64_t val)
{
#if QEMU_GNUC_PREREQ(3, 4)
if (val)
return __builtin_ctz(val);
return __builtin_ctzll(val);
else
return 64;
#else
Expand Down
5 changes: 4 additions & 1 deletion qemu/hw/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ typedef struct QEMUMachine {
int no_serial:1,
no_parallel:1,
use_virtcon:1,
no_vga:1;
no_vga:1,
no_floppy:1,
no_cdrom:1,
no_sdcard:1;
int is_default;
GlobalProperty *compat_props;
struct QEMUMachine *next;
Expand Down
4 changes: 1 addition & 3 deletions qemu/hw/cirrus_vga.c
Original file line number Diff line number Diff line change
Expand Up @@ -3227,9 +3227,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
pci_register_bar((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,
PCI_BASE_ADDRESS_SPACE_MEMORY, cirrus_pci_mmio_map);
}

/* ROM BIOS */
rom_add_vga(VGABIOS_CIRRUS_FILENAME);
return 0;
}

Expand All @@ -3244,6 +3241,7 @@ static PCIDeviceInfo cirrus_vga_info = {
.qdev.size = sizeof(PCICirrusVGAState),
.qdev.vmsd = &vmstate_pci_cirrus_vga,
.init = pci_cirrus_vga_initfn,
.romfile = VGABIOS_CIRRUS_FILENAME,
.config_write = pci_cirrus_write_config,
};

Expand Down
10 changes: 1 addition & 9 deletions qemu/hw/e1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,6 @@ static int pci_e1000_init(PCIDevice *pci_dev)

pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
pci_config_set_device_id(pci_conf, E1000_DEVID);
*(uint16_t *)(pci_conf+0x04) = cpu_to_le16(0x0407);
*(uint16_t *)(pci_conf+0x06) = cpu_to_le16(0x0010);
pci_conf[0x08] = 0x03;
pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET);
Expand Down Expand Up @@ -1142,14 +1141,6 @@ static int pci_e1000_init(PCIDevice *pci_dev)
d->dev.qdev.info->name, d->dev.qdev.id, d);

qemu_format_nic_info_str(&d->nic->nc, macaddr);

if (!pci_dev->qdev.hotplugged) {
static int loaded = 0;
if (!loaded) {
rom_add_option("pxe-e1000.bin");
loaded = 1;
}
}
return 0;
}

Expand All @@ -1167,6 +1158,7 @@ static PCIDeviceInfo e1000_info = {
.qdev.vmsd = &vmstate_e1000,
.init = pci_e1000_init,
.exit = pci_e1000_uninit,
.romfile = "pxe-e1000.bin",
.qdev.props = (Property[]) {
DEFINE_NIC_PROPERTIES(E1000State, conf),
DEFINE_PROP_END_OF_LIST(),
Expand Down
Loading

0 comments on commit c7319d0

Please sign in to comment.