Skip to content

Commit

Permalink
Merge tag 'v1.7.0-rc2' into 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Tokarev committed Nov 26, 2013
2 parents 5e34b71 + 7457fe9 commit 915397d
Show file tree
Hide file tree
Showing 23 changed files with 171 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ ifdef INSTALL_BLOBS
BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \
acpi-dsdt.aml q35-acpi-dsdt.aml \
ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \
ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin \
pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.91
1.6.92
9 changes: 7 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ for opt do
;;
--cxx=*) CXX="$optarg"
;;
--iasl=*) iasl="$optarg"
;;
--source-path=*) source_path="$optarg"
;;
--cpu=*) cpu="$optarg"
Expand Down Expand Up @@ -325,6 +323,9 @@ query_pkg_config() {
pkg_config=query_pkg_config
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"

# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
ARFLAGS="${ARFLAGS-rv}"

# default flags for all hosts
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
Expand Down Expand Up @@ -649,6 +650,8 @@ for opt do
;;
--cxx=*)
;;
--iasl=*) iasl="$optarg"
;;
--objcc=*) objcc="$optarg"
;;
--make=*) make="$optarg"
Expand Down Expand Up @@ -3695,6 +3698,7 @@ echo "C compiler $cc"
echo "Host C compiler $host_cc"
echo "C++ compiler $cxx"
echo "Objective-C compiler $objcc"
echo "ARFLAGS $ARFLAGS"
echo "CFLAGS $CFLAGS"
echo "QEMU_CFLAGS $QEMU_CFLAGS"
echo "LDFLAGS $LDFLAGS"
Expand Down Expand Up @@ -4276,6 +4280,7 @@ echo "HOST_CC=$host_cc" >> $config_host_mak
echo "CXX=$cxx" >> $config_host_mak
echo "OBJCC=$objcc" >> $config_host_mak
echo "AR=$ar" >> $config_host_mak
echo "ARFLAGS=$ARFLAGS" >> $config_host_mak
echo "AS=$as" >> $config_host_mak
echo "CPP=$cpp" >> $config_host_mak
echo "OBJCOPY=$objcopy" >> $config_host_mak
Expand Down
9 changes: 9 additions & 0 deletions hw/core/qdev-properties-system.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
goto err;
}

if (ncs[i]) {
ret = -EINVAL;
goto err;
}

ncs[i] = peers[i];
ncs[i]->queue_index = i;
}
Expand Down Expand Up @@ -301,6 +306,10 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque,
*ptr = NULL;
return;
}
if (*ptr) {
error_set_from_qdev_prop_error(errp, -EINVAL, dev, prop, name);
return;
}

hubport = net_hub_port_find(id);
if (!hubport) {
Expand Down
26 changes: 25 additions & 1 deletion hw/display/tcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
#include "qemu-common.h"
#include "ui/console.h"
#include "ui/pixel_ops.h"
#include "hw/loader.h"
#include "hw/sysbus.h"

#define TCX_ROM_FILE "QEMU,tcx.bin"
#define FCODE_MAX_ROM_SIZE 0x10000

#define MAXX 1024
#define MAXY 768
#define TCX_DAC_NREGS 16
Expand All @@ -43,6 +47,8 @@ typedef struct TCXState {
QemuConsole *con;
uint8_t *vram;
uint32_t *vram24, *cplane;
hwaddr prom_addr;
MemoryRegion rom;
MemoryRegion vram_mem;
MemoryRegion vram_8bit;
MemoryRegion vram_24bit;
Expand Down Expand Up @@ -529,14 +535,31 @@ static int tcx_init1(SysBusDevice *dev)
{
TCXState *s = TCX(dev);
ram_addr_t vram_offset = 0;
int size;
int size, ret;
uint8_t *vram_base;
char *fcode_filename;

memory_region_init_ram(&s->vram_mem, OBJECT(s), "tcx.vram",
s->vram_size * (1 + 4 + 4));
vmstate_register_ram_global(&s->vram_mem);
vram_base = memory_region_get_ram_ptr(&s->vram_mem);

/* FCode ROM */
memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE);
vmstate_register_ram_global(&s->rom);
memory_region_set_readonly(&s->rom, true);
sysbus_init_mmio(dev, &s->rom);

fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, TCX_ROM_FILE);
if (fcode_filename) {
ret = load_image_targphys(fcode_filename, s->prom_addr,
FCODE_MAX_ROM_SIZE);
if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
fprintf(stderr, "tcx: could not load prom '%s'\n", TCX_ROM_FILE);
return -1;
}
}

/* 8-bit plane */
s->vram = vram_base;
size = s->vram_size;
Expand Down Expand Up @@ -598,6 +621,7 @@ static Property tcx_properties[] = {
DEFINE_PROP_UINT16("width", TCXState, width, -1),
DEFINE_PROP_UINT16("height", TCXState, height, -1),
DEFINE_PROP_UINT16("depth", TCXState, depth, -1),
DEFINE_PROP_HEX64("prom_addr", TCXState, prom_addr, -1),
DEFINE_PROP_END_OF_LIST(),
};

Expand Down
6 changes: 2 additions & 4 deletions hw/i386/acpi-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static inline void *acpi_data_push(GArray *table_data, unsigned size)

static unsigned acpi_data_len(GArray *table)
{
#if GLIB_CHECK_VERSION(2, 14, 0)
#if GLIB_CHECK_VERSION(2, 22, 0)
assert(g_array_get_element_size(table) == 1);
#endif
return table->len;
Expand All @@ -436,9 +436,7 @@ static void acpi_align_size(GArray *blob, unsigned align)
/* Align size to multiple of given size. This reduces the chance
* we need to change size in the future (breaking cross version migration).
*/
g_array_set_size(blob, (ROUND_UP(acpi_data_len(blob), align) +
g_array_get_element_size(blob) - 1) /
g_array_get_element_size(blob));
g_array_set_size(blob, ROUND_UP(acpi_data_len(blob), align));
}

/* Get pointer within table in a safe manner */
Expand Down
7 changes: 0 additions & 7 deletions hw/i386/pc_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };

static bool has_pvpanic;
static bool has_pci_info;
static bool has_acpi_build = true;

Expand Down Expand Up @@ -229,10 +228,6 @@ static void pc_init1(QEMUMachineInitArgs *args,
if (pci_enabled) {
pc_pci_device_init(pci_bus);
}

if (has_pvpanic) {
pvpanic_init(isa_bus);
}
}

static void pc_init_pci(QEMUMachineInitArgs *args)
Expand All @@ -250,13 +245,11 @@ static void pc_compat_1_6(QEMUMachineInitArgs *args)
static void pc_compat_1_5(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
has_pvpanic = true;
}

static void pc_compat_1_4(QEMUMachineInitArgs *args)
{
pc_compat_1_5(args);
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
}
Expand Down
7 changes: 0 additions & 7 deletions hw/i386/pc_q35.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
/* ICH9 AHCI has 6 ports */
#define MAX_SATA_PORTS 6

static bool has_pvpanic;
static bool has_pci_info;
static bool has_acpi_build = true;

Expand Down Expand Up @@ -216,10 +215,6 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
if (pci_enabled) {
pc_pci_device_init(host_bus);
}

if (has_pvpanic) {
pvpanic_init(isa_bus);
}
}

static void pc_compat_1_6(QEMUMachineInitArgs *args)
Expand All @@ -232,13 +227,11 @@ static void pc_compat_1_6(QEMUMachineInitArgs *args)
static void pc_compat_1_5(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
has_pvpanic = true;
}

static void pc_compat_1_4(QEMUMachineInitArgs *args)
{
pc_compat_1_5(args);
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
}
Expand Down
5 changes: 0 additions & 5 deletions hw/misc/pvpanic.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp)
isa_register_ioport(d, &s->io, s->ioport);
}

void pvpanic_init(ISABus *bus)
{
isa_create_simple(bus, TYPE_ISA_PVPANIC_DEVICE);
}

#define PVPANIC_IOPORT_PROP "ioport"

uint16_t pvpanic_port(void)
Expand Down
2 changes: 1 addition & 1 deletion hw/net/e1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ mac_writereg(E1000State *s, int index, uint32_t val)

s->mac_reg[index] = val;

if (index == RA || index == RA + 1) {
if (index == RA + 1) {
macaddr[0] = cpu_to_le32(s->mac_reg[RA]);
macaddr[1] = cpu_to_le32(s->mac_reg[RA + 1]);
qemu_format_nic_info_str(qemu_get_queue(s->nic), (uint8_t *)macaddr);
Expand Down
5 changes: 4 additions & 1 deletion hw/net/rtl8139.c
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,10 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val)

switch (addr)
{
case MAC0 ... MAC0+5:
case MAC0 ... MAC0+4:
s->phys[addr - MAC0] = val;
break;
case MAC0+5:
s->phys[addr - MAC0] = val;
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);
break;
Expand Down
8 changes: 8 additions & 0 deletions hw/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent);
static char *pcibus_get_dev_path(DeviceState *dev);
static char *pcibus_get_fw_dev_path(DeviceState *dev);
static int pcibus_reset(BusState *qbus);
static void pci_bus_finalize(Object *obj);

static Property pci_props[] = {
DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
Expand All @@ -73,6 +74,7 @@ static const TypeInfo pci_bus_info = {
.name = TYPE_PCI_BUS,
.parent = TYPE_BUS,
.instance_size = sizeof(PCIBus),
.instance_finalize = pci_bus_finalize,
.class_init = pci_bus_class_init,
};

Expand Down Expand Up @@ -375,6 +377,12 @@ int pci_bus_num(PCIBus *s)
return s->parent_dev->config[PCI_SECONDARY_BUS];
}

static void pci_bus_finalize(Object *obj)
{
PCIBus *bus = PCI_BUS(obj);
vmstate_unregister(NULL, &vmstate_pcibus, bus);
}

static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)
{
PCIDevice *s = container_of(pv, PCIDevice, config);
Expand Down
49 changes: 44 additions & 5 deletions hw/ppc/ppc_booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,23 @@ static uint8_t booke_get_wdt_target(CPUPPCState *env, ppc_tb_t *tb_env)
static void booke_update_fixed_timer(CPUPPCState *env,
uint8_t target_bit,
uint64_t *next,
struct QEMUTimer *timer)
QEMUTimer *timer,
int tsr_bit)
{
ppc_tb_t *tb_env = env->tb_env;
uint64_t delta_tick, ticks = 0;
uint64_t tb;
uint64_t period;
uint64_t now;

if (!(env->spr[SPR_BOOKE_TSR] & tsr_bit)) {
/*
* Don't arm the timer again when the guest has the current
* interrupt still pending. Wait for it to ack it.
*/
return;
}

now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
tb = cpu_ppc_get_tb(tb_env, now, tb_env->tb_offset);
period = 1ULL << target_bit;
Expand Down Expand Up @@ -165,8 +174,15 @@ static void booke_update_fixed_timer(CPUPPCState *env,

if (*next == now) {
(*next)++;
} else {
/*
* There's no point to fake any granularity that's more fine grained
* than milliseconds. Anything beyond that just overloads the system.
*/
*next = MAX(*next, now + SCALE_MS);
}

/* Fire the next timer */
timer_mod(timer, *next);
}

Expand Down Expand Up @@ -200,7 +216,8 @@ static void booke_fit_cb(void *opaque)
booke_update_fixed_timer(env,
booke_get_fit_target(env, tb_env),
&booke_timer->fit_next,
booke_timer->fit_timer);
booke_timer->fit_timer,
TSR_FIS);
}

static void booke_wdt_cb(void *opaque)
Expand All @@ -220,15 +237,35 @@ static void booke_wdt_cb(void *opaque)
booke_update_fixed_timer(env,
booke_get_wdt_target(env, tb_env),
&booke_timer->wdt_next,
booke_timer->wdt_timer);
booke_timer->wdt_timer,
TSR_WIS);
}

void store_booke_tsr(CPUPPCState *env, target_ulong val)
{
PowerPCCPU *cpu = ppc_env_get_cpu(env);
ppc_tb_t *tb_env = env->tb_env;
booke_timer_t *booke_timer = tb_env->opaque;

env->spr[SPR_BOOKE_TSR] &= ~val;
kvmppc_clear_tsr_bits(cpu, val);

if (val & TSR_FIS) {
booke_update_fixed_timer(env,
booke_get_fit_target(env, tb_env),
&booke_timer->fit_next,
booke_timer->fit_timer,
TSR_FIS);
}

if (val & TSR_WIS) {
booke_update_fixed_timer(env,
booke_get_wdt_target(env, tb_env),
&booke_timer->wdt_next,
booke_timer->wdt_timer,
TSR_WIS);
}

booke_update_irq(cpu);
}

Expand All @@ -247,12 +284,14 @@ void store_booke_tcr(CPUPPCState *env, target_ulong val)
booke_update_fixed_timer(env,
booke_get_fit_target(env, tb_env),
&booke_timer->fit_next,
booke_timer->fit_timer);
booke_timer->fit_timer,
TSR_FIS);

booke_update_fixed_timer(env,
booke_get_wdt_target(env, tb_env),
&booke_timer->wdt_next,
booke_timer->wdt_timer);
booke_timer->wdt_timer,
TSR_WIS);
}

static void ppc_booke_timer_reset_handle(void *opaque)
Expand Down
Loading

0 comments on commit 915397d

Please sign in to comment.